Truncated match.
PICList
Thread
'what is SKPNC and SKPZ?'
1997\01\02@112852
by
Clewer,Brian
Quite plain and simple, my question is what are the commands SKPNC and SKPZ?
I see they are used in this macro but what do they do? I don't see them on
any of my data sheets!
{Quote hidden}>>sub_word_literal: macro aaa, lll
>>
>> movlw low (~(lll) + 1)
>> addwf aaa+1, f
>> movlw high ((~(lll) + 1) & h'ffff')
>> skpnc
>> addlw 1
>> skpnc
>> skpz
>> addwf aaa, f
>> endm
Thanks in advance for any info,
Brian
1997\01\02@125738
by
fastfwd
1997\01\02@130357
by
Brian Scearce
> Quite plain and simple, my question is what are the commands SKPNC and SKPZ?
> I see they are used in this macro but what do they do? I don't see them on
> any of my data sheets!
I think they are macros themselves that do "skip on no carry" and "skip
on zero". Shorthand for "BTFSC STATUS, C" and "BTFSS STATUS, Z".
1997\01\02@130400
by
az753
{Quote hidden}>
>Quite plain and simple, my question is what are the commands SKPNC and SKPZ?
>I see they are used in this macro but what do they do? I don't see them on
>any of my data sheets!
>
>
>
>>>sub_word_literal: macro aaa, lll
>>>
>>> movlw low (~(lll) + 1)
>>> addwf aaa+1, f
>>> movlw high ((~(lll) + 1) & h'ffff')
>>> skpnc
>>> addlw 1
>>> skpnc
>>> skpz
>>> addwf aaa, f
>>> endm
>
>
>Thanks in advance for any info,
>Brian
>
>
I took the description from MPALC.TXT included with the software.
SKPZ: SKIP ON ZERO
SKPNC: SKIP ON NO CARRY
When I am not sure of an instruction, I run it with the simulator and give
values to the different bits. It is important that each instruction you are
using, you master them.
Good luck with your project.
Jean
1997\01\02@133515
by
Bob Fehrenbach
"Clewer,Brian" <brian.clewer
KILLspamTELEMATICS.COM> wrote:
>Quite plain and simple, my question is what are the commands SKPNC and SKPZ?
>I see they are used in this macro but what do they do? I don't see them on
>any of my data sheets!
These are macros that are built into MPASM. Many people find them
easier to type and more intuitive to read.
SKPNC: skip if no carry = btfsc STATUS, C
SKPZ: skip if zero = btfss STATUS, Z
--
Bob Fehrenbach Wauwatosa, WI .....bfehrenbKILLspam
.....execpc.com
1997\01\02@133724
by
Mike
>Quite plain and simple, my question is what are the commands SKPNC and SKPZ?
>I see they are used in this macro but what do they do? I don't see them on
>any of my data sheets!
>
>
>
>>>sub_word_literal: macro aaa, lll
>>>
>>> movlw low (~(lll) + 1)
>>> addwf aaa+1, f
>>> movlw high ((~(lll) + 1) & h'ffff')
>>> skpnc
>>> addlw 1
>>> skpnc
>>> skpz
>>> addwf aaa, f
>>> endm
I'm not a PIC programmer but, I imagine they mean skip no carry and skip
zero...
RGDS
Mike
There is no a'priori reason that the ultimate truth will be interesting
or even useful, those moments of frustration during philosophical debate
would be replaced by the sheer terror which accompanies true knowledge.
1997\01\02@143557
by
Gonzalo Palarea
At 04:34 PM 1/2/97 PST, you wrote:
>Quite plain and simple, my question is what are the commands SKPNC and SKPZ?
>I see they are used in this macro but what do they do? I don't see them on
>any of my data sheets!
>
SKPNC = BTFSC STATUS,C
SKPZ = BTFSS STATUS,Z
____________________
Gonzalo Palarea
EraseMEchalospam_OUT
TakeThisOuTinfovia.com.gt
1997\01\02@145718
by
Jan van der Watt
The instructions
SKPZ, SKPNZ (Skip if ZERO flag is set/ Skip if ZERO flag is clear)
SKPC, SKPNC (same, just CARRY)
are pseudo-instructions that are understood by at least the Microchip compilers.
The translate into instructions like
BTFSC STATUS,3
BTFSS STATUS,3
If you look at the STATUS register, you'll find that the ZERO flag, and the
CARRY flag (and some others I can recall off-hand) are mapped in that
register. Sometime you want to take different actions depending on what
state the STATUS flags are in, and these SKIP instructions are quite handy.
E.g., you want to decrement a memory location IF it isn't already zero.
TSTF mem_loc
SKPZ
DECF mem_loc,F
(TSTF is another pseudocode that moves the memory file to itself, BUT this
affects the ZERO flag)
Hope it helps.
Jan van der Watt
[I saW ElviS - hE sAT beTWEen me AnD BIgFoOT oN thE UFo]
1997\01\02@145724
by
Bob Blick
>Quite plain and simple, my question is what are the commands SKPNC and SKPZ?
>I see they are used in this macro but what do they do? I don't see them on
>any of my data sheets!
It's a typical redefinition of "btfsc STATUS,C" and "btfss STATUS,Z", it
makes it easier to remember which way skips and which way doesn't.
Cheers, Bob
1997\01\02@151001
by
D. R. Chicotel
|
At 04:34 PM 1/2/97 PST, you wrote:
>Quite plain and simple, my question is what are the commands SKPNC and SKPZ?
>I see they are used in this macro but what do they do? I don't see them on
>any of my data sheets!
>
SKPNC means 'Skip on No Carry' and SKPZ means 'Skip on Zero'. They are
equivalent to the following:
#define SKPNC BTFSC 3, 0 ; Skip on No Carry
#define SKPZ BTFSS 3, 2 ; Skip on Zero
The following can also be used:
#define CLRC BCF 3, 0 ; Clear Carry
#define SETC BSF 3, 0 ; Set Carry
#define SKPC BTFSS 3, 0 ; Skip on Carry
#define CLRDC BCF 3, 1 ; Clear Digit Carry
#define SETDC BSF 3, 1 ; Set Digit Carry
#define SKPDC BTFSS 3, 1 ; Skip on Digit Carry
#define SKPNDC BTFSC 3, 1 ; Skip on No Digit Carry
#define CLRZ BCF 3, 2 ; Clear Zero
#define SETZ BSF 3, 2 ; Set Zero
#define SKPNZ BTFSC 3, 2 ; Skip on Non Zero
You can embed these mnemonics in the P16Cxx.INC file and make them available
to all your programs automatically. You can probably come up with more if
you like. The problem with these short cuts is just what you discovered.
Other people who look at your code may not know how you have defined your
mneumnics and get lost. They may make your code more readable to you, but
maybe not so readable to others. It's your call whether you think this is a
good practice or not.
Hope that helps. DRC :->
1997\01\02@151007
by
Jerry Meng
At 04:34 PM 1/2/97 PST, you wrote:
>Quite plain and simple, my question is what are the commands SKPNC and SKPZ?
>I see they are used in this macro but what do they do? I don't see them on
>any of my data sheets!
>
>
>
>>>sub_word_literal: macro aaa, lll
>>>
>>> movlw low (~(lll) + 1)
>>> addwf aaa+1, f
>>> movlw high ((~(lll) + 1) & h'ffff')
>>> skpnc
>>> addlw 1
>>> skpnc
>>> skpz
>>> addwf aaa, f
>>> endm
Hi Brian,
You can check the MPASM for windows online help to get the answer.
SKPNC = btfsc status,c ;Skip on No Carry
SKPZ = btfss status,z ;Skip on Zero
Jerry Meng, BA1FB
ba1fb
spam_OUTamsat.org
http://www.srsnet.com/~ba1fb
1997\01\02@204251
by
fastfwd
D. R. Chicotel <@spam@PICLISTKILLspam
MITVMA.MIT.EDU> wrote:
> You can embed these mnemonics in the P16Cxx.INC file and make them
> available to all your programs automatically. You can probably
> come up with more if you like. The problem with these short cuts
> is just what you discovered. Other people who look at your code may
> not know how you have defined your mneumnics and get lost.
D.R.:
The pseudo-ops you listed (as well as the two that started this
thread) are all built into MPASM already... There's no need to
define them in an "include" file.
Since they're already understood by MPASM, I don't think their use is
particularly confusing.
Just my opinion... I could be wrong.
-Andy
=== Andrew Warren - KILLspamfastfwdKILLspam
ix.netcom.com ===
=== Fast Forward Engineering - Vista, California ===
=== ===
=== Custodian of the PICLIST Fund -- For more info, see: ===
=== http://www.geocities.com/SiliconValley/2499/fund.html ===
1997\01\03@073349
by
Jim Robertson
|
At 05:47 PM 1/2/97 -0800, you wrote:
{Quote hidden}>D. R. Chicotel <
RemoveMEPICLISTTakeThisOuT
MITVMA.MIT.EDU> wrote:
>
>> You can embed these mnemonics in the P16Cxx.INC file and make them
>> available to all your programs automatically. You can probably
>> come up with more if you like. The problem with these short cuts
>> is just what you discovered. Other people who look at your code may
>> not know how you have defined your mneumnics and get lost.
>
>D.R.:
>
>The pseudo-ops you listed (as well as the two that started this
>thread) are all built into MPASM already... There's no need to
>define them in an "include" file.
>
>Since they're already understood by MPASM, I don't think their use is
>particularly confusing.
>
>Just my opinion... I could be wrong.
>
>-Andy
>
But they are not understood by MPASM for use with the 17Cxx parts. I was
porting 16C5x code over to a 17Cxx part yesterday. Wish I had thought of
defining these pseudo-ops as D.R. suggested instead of spenting 10 minutes
doing a search/replace on all my skpxx instructions!
Jim
More... (looser matching)
- Last day of these posts
- In 1997
, 1998 only
- Today
- New search...