OG Xbox Forums => Hardware Forums => General Hardware/Technical Chat => Topic started by: rjm2k on May 21, 2003, 03:44:00 PM
Title: 80x86 Assembly Programming Gurus
Post by: rjm2k on May 21, 2003, 03:44:00 PM
It's been a long time since I had to do any assembler, so I might be on the wrong track here, but as far as I can remember:-
PROC WAIT_1 FAR pusha push es mov dx, [word 40H:006EH] 'Move the word at this address into DX mov [startDisplay], dx 'Move the contents of DX into the address startDisplay
continue: mov dx, [word 40H:006EH] 'Move the word at this address into DX (nb, DX now = startDisplay sub dx, [startDisplay] 'submit startDisplay from DX, which should give 0 cmp dx, 12H 'compare dx with 12h je return 'if dx = 12 (which it can't because it's 0) goto return jmp continue 'go back to continue, which performs EXACTLY the same steps again with the same outcome
return: pop es popa ret 4 ENDP WAIT_1
Title: 80x86 Assembly Programming Gurus
Post by: mazir on May 21, 2003, 04:05:00 PM
Maybe I should add that the address 40H:006EH gets one added to it ever 1/18.2 seconds. It's the real time clock interrupt.
Sorry I didn't mention this earlier. Thanks for the reply.
Title: 80x86 Assembly Programming Gurus
Post by: rjm2k on May 22, 2003, 12:17:00 AM
QUOTE (mazir @ May 22 2003, 12:05 AM)
Maybe I should add that the address 40H:006EH gets one added to it ever 1/18.2 seconds. It's the real time clock interrupt.
Sorry I didn't mention this earlier. Thanks for the reply.
Maybe it's a timing issue, it could be skipping 12. Try using jump greater if there is one.