On 2/14/08, the following code fragment was covered

 

mov ah, 2ch

int 21h ; ch = hr, cl = min, dh = sec

mov bh, dh ; save the seconds

mov ah, 9h

mov dx, OFFSET timcvr

int 21h

mov al, ch

call Putdec ; it is 10 o'clock

 

BUT 2569 is printed.

Why?

 

Winner: Dan

 


Page Information

  • 6 months ago [history]
  • View page source
  • You're not logged in
  • Recent comments:
    Richard Glass:correct.
    Dan:Although the hour '10' was placed into the al, the ah remains untouched still holding '9' from "mov ah, 9h". Come time for displaying the hour, the ax contains the binary: 00001010 00001001 (10 9) and the 16 bit number read from that is 2569.
  • No tags yet learn more

Wiki Information

Recent PBwiki Blog Posts