I've a little problem by converting a number to an ascii value. First of all I read the current date and time and save it:
Code: Select all
get_dtime:
mov ah, 0x02
int 0x1A
mov byte [hour], ch
mov byte [minute], cl
mov byte [second], dh
mov ah, 0x04
int 0x1A
mov byte [century], ch
mov byte [year], cl
mov byte [month], dh
mov byte [day], dl
ret
Code: Select all
convert_dtime:
mov ax, [day]
mov bl, 0x10
div bl
add al, 0x30
add ah, 0x30
mov byte [day_1], al
mov byte [day_2], ah
mov ax, [month]
mov bl, 0x10
div bl
add ah, 0x30
add al, 0x30
mov byte [month_1], al
mov byte [month_2], ah
ret
but instead of this I'm getting04.01
What I'm doing wrong? Where is my mistake? I'm not able to find it04.p1
THX

