Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Incrementing time represented as NBCD format
#4
Here's my best shot

Code:
function nbcdTimeIncr ( byval t as integer ) as integer
    t1 = t + &ha6a7
    m1 = t  and &h11110
    m2 = t1 and &h11110
    
    nbcdTimeIncr =  t1 - ((((not (m1 xor m2)) and &h11110) shr 4)*&hf and &ha6a6)
end function

Add AND &hffff if you care that the upper 16 bits are zero or not.
oship me and i will give you lots of guurrls and beeea
Reply


Messages In This Thread
Incrementing time represented as NBCD format - by Blitz - 12-06-2006, 03:18 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)