Searching \ for '2's Complement compare for 12 bit data - HELPPPPPP' 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/mems.htm?key=data
Search entire site for: '2's Complement compare for 12 bit data - HELPPPPPP'.

Truncated match.
PICList Thread
'2's Complement compare for 12 bit data - HELPPPPPP'
1995\07\03@213848 by nino.benci

flavicon
picon face
I am having trouble in writing code for the PIC16C71 to compare two
12bit 'signed' numbers. Once the comparison is done I need to save
the lesser of the 12bit number, for example;

       LOADA   word1       ;get 12 bit signed value into acca
       CMPA    word2       ;compare word1 to word2
       BLE     savewd1     ;if word1 << word2 then save word1
       STORA   word2       ;if word1 >> word2, save word1 -> word2
       RETN
savewd1:
       STORA   rseln       ;save word1 value
       RETN

Excuse the mnemonics chosen. I hope that its clear as to what I need
to do. Any pointers would be appreciated.

Nino Benci
************************************************************************
* Nino Benci - Chief Technical Officer       *                         *
* Monash University - Physics                *     Profound message    *
* Wellington Rd, Clayton. 3168               *      to be inserted     *
* Victoria, Australia.                       *       in the near       *
* TEL - 61 3 9905 3649, FAX - 61 3 9905 3637 *          future         *
* EMAIL - spam_OUTnino.benciTakeThisOuTspamsci.monash.edu.au       *                         *
************************************************************************

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