Searching \ for '[PIC]: Common Comparison Macros' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/devices.htm?key=pic
Search entire site for: 'Common Comparison Macros'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: Common Comparison Macros'
2001\03\07@003514 by James Cameron

flavicon
face
On Fri, Mar 02, 2001 at 10:39:05AM -0800, Barry Gershenfeld wrote:
> But my C code is always larger.  Why?  Because coding in
> assembler is so intricate that I often resist adding
> a feature here and there or a "superfluous" double-check
> on a value.  In C such lines are easy to add and I know
> I won't be hand stepping past the BTFSS to see if I got
> it the wrong way again...

Been there ... I wonder how other people address this issue of trying
to remember which way around a BTFSS or BTFSC instruction should go?

I've been thinking of making some simple macros for comparing 8-bit
quantities against file registers.  Anyone got any?

http://www.piclist.com/techref/microchip/compcon.htm quite accurately
defines for me which way is which ... but having to refer to that each
time seems suboptimal.

--
James Cameron    spam_OUTquozlTakeThisOuTspamus.netrek.org     http://quozl.netrek.org/

--
http://www.piclist.com hint: To leave the PICList
.....piclist-unsubscribe-requestKILLspamspam@spam@mitvma.mit.edu


2001\03\07@005317 by Tony Nixon

flavicon
picon face
James Cameron wrote:
> Been there ... I wonder how other people address this issue of trying
> to remember which way around a BTFSS or BTFSC instruction should go?
>
> I've been thinking of making some simple macros for comparing 8-bit
> quantities against file registers.  Anyone got any?

8 and 16 bit

http://www.picnpoke.com/projects/compares.txt

http://www.picnpoke.com/projects/compares.asm

--
Best regards

Tony

mICro's
http://www.picnpoke.com
salesspamKILLspampicnpoke.com

--
http://www.piclist.com hint: To leave the PICList
.....piclist-unsubscribe-requestKILLspamspam.....mitvma.mit.edu


2001\03\07@052929 by Alan B. Pearce

face picon face
>Been there ... I wonder how other people address this issue of trying
>to remember which way around a BTFSS or BTFSC instruction should go?

Is this not what the pseudo instructions in MPLAB are for?

--
http://www.piclist.com hint: To leave the PICList
EraseMEpiclist-unsubscribe-requestspam_OUTspamTakeThisOuTmitvma.mit.edu


2001\03\07@083404 by Drew Vassallo

picon face
> >Been there ... I wonder how other people address this issue of trying
> >to remember which way around a BTFSS or BTFSC instruction should go?
>
>Is this not what the pseudo instructions in MPLAB are for?

The pseudo instructions (macros) like "skpc", "skpnc", etc. only substitute
btfsc, btfss, and goto instructions where indicated.  They don't determine
>, <, >=, <=, etc. for you.

There's a great set of conditions for comparisons in the PICLIST archives.
Search around for it in the techref/conditional routines section.

--Andrew
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

--
http://www.piclist.com hint: To leave the PICList
piclist-unsubscribe-requestspamspam_OUTmitvma.mit.edu


2001\03\07@090522 by Olin Lathrop

face picon face
> Been there ... I wonder how other people address this issue of trying
> to remember which way around a BTFSS or BTFSC instruction should go?
>
> I've been thinking of making some simple macros for comparing 8-bit
> quantities against file registers.  Anyone got any?

Check out my macros SKIP_WLE and SKIP_WGT.  They skip depending on the
result of a subtract.  Go to http://www.embedinc.com/pic and look in file
STD.INS.ASPIC.


*****************************************************************
Olin Lathrop, embedded systems consultant in Devens Massachusetts
(978) 772-3129, @spam@olinKILLspamspamembedinc.com, http://www.embedinc.com

--
http://www.piclist.com hint: To leave the PICList
KILLspampiclist-unsubscribe-requestKILLspamspammitvma.mit.edu


More... (looser matching)
- Last day of these posts
- In 2001 , 2002 only
- Today
- New search...