piclist 1998\10\03\022458a >
Thread: how to compare number - (DS1624)
www.piclist.com/techref/index.htm?key=how+compare+number
flavicon
face BY : Michael Hagberg email (remove spam text)



if i read it correctly you want to know this.

if (17.0 <= x ) and ( x <= 19.6 ) then TRUE else FALSE

   movf    MSB,w
   sublw    .16        ; 16 - MSB = ?
   btfsc    status,c
   goto    return_false    ; MSB is 16 or less

   movf    MSB,w
   sublw    .19        ; 19 - MSB
   btfss    status,c
   goto    return_false    ; MSB it greater than 19
   btfss    status,z
   goto    return_true

   movf    LSB,w
   sublw    .6        ; 6 - LSB
   btfss    status,c
   goto    return_false
   goto    return_true

this code is not debugged (and assume it's buggy) but will give you an idea
of how to start.

michael

You may leave the list at any time by writing "SIGNOFF PICLIST" in the
   body of a message to KILLspamLISTSERVspamBeGonespamMITVMA.MIT.EDU.

{Original Message removed}
<000601bdee8d$b6af8ec0$873ce6cf@michael> 7bit

See also: www.piclist.com/techref/index.htm?key=how+compare+number
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) how to compare number - (DS1624)

month overview.

new search...