PDA

Click to See Complete Forum and Search --> : Simple math


Dec 20th, 2000, 11:41 PM
I have just got the hour using function 2c of int 21h, and the hour is in ch. Now what i want to do is find out if the hour is above 12, and if it is, subtract twelve from it, any ideas on how to do that?

itay222
Jan 1st, 2001, 11:17 AM
what am i missing here?

cmp ch, 12
jb dontsub (or jl... it has been a long time)
sub ch, 12
dontsub:

Cahlel
Jan 29th, 2001, 10:32 AM
I'm pretty sure that they both work, JB and JL that is