piclist 2001\06\09\225915a >
Thread: instructions not in the instruction set !
piclist.com/techref/microchip/devices.htm?key=pic
flavicon
face BY : Dwayne Reid email (remove spam text)



At 12:44 AM 6/10/01 +1000, Roman Black wrote:

>There are a few custom designed mnemonics that are not
>official Microchip ones, but which are really handy,
>I got these from Olin,
>
>SKPWGT   skip if w greater than
>SKPWLE   skip if w less or equal
>SKPWEQ   skip if w equal
>SKPWNE   skip if w not equal

I've got a few more that I find useful:

12 bit core only:

tstw            MACRO           ;test w, valid Z; C & DC unchanged
    xorlw       0
    endm

comw            MACRO           ;complement W, valid Z; C & DC unchanged
    xorlw       0xFF
    endm


12 bit and 14 bit core parts:

decw            MACRO                   ;decrement w, valid Z, C & DC trashed
    addlw       -1
    endm                                ;C & DC =1 if w>0 after decrement

negw            MACRO                   ;negate w
    sublw       0
    endm                                ;valid z; C & DC trashed

And you are right: Olin's 1 line macros were (are) a great idea - thanks,
Olin!

dwayne



Dwayne Reid   <spamdwaynerspam_OUTspamspamplanet.eon.net>
Trinity Electronics Systems Ltd    Edmonton, AB, CANADA
(780) 489-3199 voice          (780) 487-6397 fax

Celebrating 17 years of Engineering Innovation (1984 - 2001)

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Do NOT send unsolicited commercial email to this email address.
This message neither grants consent to receive unsolicited
commercial email nor is intended to solicit commercial email.

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email TakeThisOuTlistservTakeThisOuTspamTakeThisOuTmitvma.mit.edu with SET PICList DIGEST in the body


<4.3.2.7.2.20010609140832.00bcb8d0@pop.telusplanet.net>

In reply to: <3B223667.157A@ezy.net.au>
See also: piclist.com/techref/microchip/devices.htm?key=pic
Reply You must be a member of the piclist mailing list (not only a piclist.com member) to post to the piclist. This form requires JavaScript and a browser/email client that can handle form mailto: posts.
Subject (change) instructions not in the instruction set !

month overview.

new search...