Delay program using int 21h with ah = 2Ch

Viewed 918

I'm working on a project for school in assembly 8086 (using DOSBox), and I was trying to delay my program for 0.5 second.

I tried to create a loop which compares the current time to the initial time, using int 21h, function 2Ch with the hundredths value in DL, but it seems to be too slow...

mov ah, 2Ch
int 21h
mov al, dl ;hundredths
mov bx, 0
wait_loop:
    one_hun:
        int 21h
        cmp al, dl
        je one_hun
    mov al, dl
    inc bx
    cmp bx, 50
    jne wait_loop
1 Answers
Related