Skip to content

Instantly share code, notes, and snippets.

@WideWord
Created June 9, 2015 19:22
Show Gist options
  • Save WideWord/1d9020f6daf8ad49ee2b to your computer and use it in GitHub Desktop.
Save WideWord/1d9020f6daf8ad49ee2b to your computer and use it in GitHub Desktop.
proc get_timestamp uses bx cx dx
mov ah, 2ch
int 21h
mov ah, 0
mov al, cl
mov bx, 60
push dx
mul bx
pop dx
mov ch, 0
mov cl, dh
add ax, cx
mov bx, 100
push dx
mul bx
pop dx
mov dh, 0
add ax, dx
ret
endp
proc print_ms
mov dx, 0
mov cx, 100
idiv cx
stdcall print_int, ax
push ax
push dx
mov ah, 02h
mov dl, '.'
int 21h
pop dx
pop ax
stdcall print_int, dx
ret
endp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment