
We are not talking about under XP,LINUX,for which we have set the Hz etc.
ASHLEY4.
Anyway, it would be more inaccurate than using the timer interrupt or than calibrating the processor.ASHLEY4 wrote: I may be wrong (did i really say that),But the vertical retrace timing is more standard at boot time (no driver),
We are not talking about under XP,LINUX,for which we have set the Hz etc.
ASHLEY4.
Code: Select all
BITS 16
ORG 100h
SECTION .text
START:
xor ah,ah
int 16h
mov word[count],0
ddf:
call FullVertWait
cmp word [count],70
jne ddf
;Do some thing in here
xor ah, ah
int 16h
mov ax, 04c00h
int 21h
;**************************
FullVertWait:
MOV DX,3DAh
Vr:
IN AL,DX
TEST AL,8
JNZ Vr ;wait until Verticle Retrace starts
Nvr:
IN AL,DX
TEST AL,8
JZ Nvr ;wait until Verticle Retrace Ends
ADD word[count],1
RET
;**************************
SECTION .data
count dw 0
Yes, indeedTo me this is better code for people who are making a small os and need a simple delay for printing to screen etc,(eg. noncritecal).