Dwayne Reid wrote: > > 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 Clever! Never thought of using that one! :o) > > 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! Absolutely! And may I ask is there any gain from making these one-inst mnemonics as macros and not just using #defines? I use: #define NEGW sublw d'0' ; negate w -Roman -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu