windows - How can I create a sleep function in 16bit MASM Assembly x86? -


I am trying to create a sleep / delay process in the 16bit MASM assembly x86 that is, print a letter on the screen Every 500ms I've done the research, it seems that there are three ways to achieve this - I would like to use one that uses the CPU clock pocket.

Please note that I'm running Windows XP on Mac through VMWire Fusion OS X Snow Leopard - I'm not sure that it affects anything.

Can someone point me in the right direction, or can I provide a piece of code that I can do? Thanks!

The code I get should print 'A' on screen every moment, but it does not work (I want to use milliseconds in any way).

  Top: MOV AH, 2C INT 21 MOV BH, DH; DH is the second GETSEC current :; Loops BAH MOV AH, 2C INT21 CMP BH to the last second is not equal to the last in DH; Comparison of Loop Exit and 'A' JNE Printa JMP Gatessek Printata: MOV AH, 02 MOV DL, 41 IN 21 JMP Top  

EDGE: After the advice of GJ , Here's a method just call it

  Daily Proxy Timer: MOV AH, 00 H INT 1 AH CMP DX, YAITTM JB Timer Aid DX, 3, 1-18, Where short is fast and 18 is closer to 1 second MOV WAIT_TIME, DX REET DAY Actually you can use the ROM BIOS 1 AH Function 00H , 'Read the current clock calculation' or you can read the $ 40 address: Doward at $ 6 address but you have to make sure to read the atom. This has increased by approximately MS-DOS approximately 18.2 Hz. 

Read for more information:


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

php - Multiple Select with Explode: only returns the word "Array" -

php - jQuery AJAX Post not working -