◄Map► ◄Up► ◄Contents► ◄Index► ◄Back► ──────────────────────────────────────────────────────────────────────────── ;* Pause - Waits for specified number of clocks to elapse, then returns. ;* ;* Shows: BIOS Interrupt - 1Ah, Function 0 (Real-Time Clock Driver) ;* Operators - LOCAL [] ;* ;* Params: Duration - Desired duration in clocks, where ;* 18 clocks = approx 1 second ;* ;* Return: None Pause PROC, Duration:WORD LOCAL tick:DWORD sub ah, ah int 1Ah ; Get Clock Count in CX:DX add dx, Duration ; Add pause time to it adc cx, 0 mov WORD PTR tick[0], dx ; Result is target time; mov WORD PTR tick[2], cx ; keep in local variable .REPEAT int 1Ah ; Poll clock until target time .UNTIL (dx >= WORD PTR tick[0]) || (cx >= WORD PTR fileinfo.time[2]) ret Pause ENDP -♦-