piclist 2001\01\29\231451a >
Thread: Code Challenge: Range check and convert Hex
www.piclist.com/techref/microchip/ios.htm?key=rang
flavicon
face BY : Nikolai Golovchenko email (remove spam text)



Three instructions less:

   movlw   -'0'
   btfsc   temp, 6
    movlw  -'A'+10
   addwf   temp, w    ;w = 0:F if hex valid
   andlw 0xF0
   skpz
    goto Bad          ;leave with unmodified temp
   movlw   -'0'       ;repeat the stuff
   btfsc   temp, 6
    movlw  -'A'+10
   addwf   temp, f    ;temp is converted hex

If ascii conversion is in a routine, that would save another
instruction.

Nikolai

---- Original Message ----
From: j newton <spameplus1TakeThisOuTspamSAN.RR.COM>
Sent: Monday, January 29, 2001 23:52:16
 To: PICLISTEraseMEspamspamMITVMA.MIT.EDU
Subj: [PIC:] Code Challenge: Range check and convert Hex

{Quote hidden}

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


<1012835856.20010130061400@yahoo.com> 7bit

In reply to: <000d01c08a3d$bedbfc20$0600a8c0@efplus.com>
See also: www.piclist.com/techref/microchip/ios.htm?key=rang
Reply You must be a member of the piclist mailing list (not only a www.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) Code Challenge: Range check and convert Hex

month overview.

new search...