;************************************************************* ;Name: TIME_DELAY ; ;Author: Dan Kohn ; ;Date: 10/30/2005 ; ;Revised: 10/31/2005 ; PUSHA does not work on Toshiba XT Compatable ; laptop. Replaced with individual push and pops. ; ;Function: Wait for aprox 5 seconds then return to the ; calling code ; ;On Call: NONE ; ;On Return: All Registers Restored time_delay: push ax ;put all reg on stack for restore push bx push cx push dx mov ah,00 ;get system time int 1ah ;(CX:DX = number of clock ;ticks since midnigh) ;[18.20648 ticks = 1 sec) add dx,005ah ;add 90 ticks (~5 sec) mov bx,dx ;store for compare t_loop: mov ah,00 ;loop until system time > Last int 1ah ;time + 5 sec cmp bx,dx jg t_loop pop dx ;restore all registers pop cx pop bx pop ax RET