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.
ideas for delaying os
Re:ideas for delaying os
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.
The method you suggest is only handy for games.
(hmm, maybe you could post it, looking if they are accurate )
Re:ideas for delaying os
This nasm code is just a quick bit of code to try ,To try it for a real comparison it needs to be run before windows,linux etc
eg: in your own code,If so take out the dos bits first.
Put your print code where "Do some thing in here" is,
On starting up press any key and time it till it prints,Try it on differant pc's.
To 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).
As this code stands,it should give a 1 second delay.
ASHLEY4.
eg: in your own code,If so take out the dos bits first.
Put your print code where "Do some thing in here" is,
On starting up press any key and time it till it prints,Try it on differant pc's.
To 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).
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
ASHLEY4.
Re:ideas for delaying os
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).
But your code seems to be short but powerful (damn, it's a Dutch sentence, but literally translated to English.
My opinion about your code is not negative.