Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[PIC]: skpnc and skpc?

496 views
Skip to first unread message

Tan Chun Chiek

unread,
Jun 6, 2002, 1:40:38 AM6/6/02
to PIC...@mitvma.no.spam.mit.edu
Hi,
I have come across SKPNC and SKPC in some 16F84 ASM codes, apparently =
they look like instructions to me, but a lookup on the datasheet reveals =
nothing about these 2 instructions. Can anyone help? Thanks

Regards,
Tan Chun Chiek

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


Dmitriy A. Kiryashov

unread,
Jun 6, 2002, 1:57:20 AM6/6/02
to PIC...@mitvma.cut.mit.edu
skpnc == btfsc STATUS,C
skpc == btfss STATUS,C
skpndc btfsc ... ,DC
skpdc btfss ...,DC
skpnz
skpz
etc...

see at MPLAB help file for those built-in definitions.

WBR Dmitry.


Tan Chun Chiek wrote:
>
> Hi,

> I have come across SKPNC and SKPC in some 16F84 ASM codes, apparently they look like instructions to me, but a lookup on the datasheet reveals nothing about these 2 instructions. Can anyone help? Thanks

Lyle Hazelwood

unread,
Jun 6, 2002, 1:59:10 AM6/6/02
to PIC...@mitvma.nothis.mit.edu
I can take a good guess as to their meaning.
These are probably macros that define as something like:

SKPNC
Skip if No Carry

SKPC
Skip if Carry

On a 16F87X, these would be

BTFSS STATUS,C ;Bit Test F, Skip if Set STATUS, CARRY FLAG

BTFSC STATUS,C ;Bit Test F, Skip if Clear STATUS, CARRY FLAG

In both cases, the state of the carry flag decides whether you will skip the
next instruction.

If it compiles successfully, one of the included files must have defined
their meaning.
As my experience with PIC's is limited to the mid-range devices, I could be
completely wrong. This is just a guess.

I have been wrong before, and I'm sure I'll find a chance to be wrong again.
Please search your included files for SKPNC and SKPC to get confirmation
of my guesses.

Breathe Deep,
Lyle

Bob Barr

unread,
Jun 6, 2002, 2:27:11 AM6/6/02
to PIC...@mitvma.extra.mit.edu
On Thu, 6 Jun 2002 13:52:57 +0800, Tan Chun Chiek wrote:

>Hi,
>I have come across SKPNC and SKPC in some 16F84 ASM codes, apparently they look like instructions to me,
>but a lookup on the datasheet reveals nothing about these 2 instructions. Can anyone help? Thanks
>

These are assembler pseudo-ops that are listed in the MPASM manual.
See DS33014G, Appendix B, Table B.11 There are quite a number of
others listed there as well.

Regards, Bob

0 new messages