home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Du Jour
/
SoftwareDuJour.iso
/
BUSINESS
/
DBASE
/
DBAPG.ARC
/
DWAIT.ASM
< prev
next >
Wrap
Assembly Source File
|
1984-08-05
|
896b
|
23 lines
; Subroutine.: dWAIT.ASM
; Author.....: Raymond Weisling
; Date.......: 5/28/83, 6/10/83
; Notice.....: Copyright 1983, Raymond Weisling, All Rights Reserved.
; Notes......: Wait for console key or time-out delay.
;
ORG 42000 ; dBASE II FREE AREA
LOOP: LXI H,COUNT ; COUNTER ADDRESS
DCR M ; REDUCE COUNTER BY ONE
JNZ CHECK ; IF NOT ZERO, CHECK CONSOLE FOR KEY
INR L ; POINT TO USER DELAY VALUE
DCR M ; REDUCE DELAY BY ONE EVERY 35 MSEC
RZ ; RETURN IF ZERO
CHECK: MVI C,6 ; CONSOLE I/O FUNCTION
MVI E,0FFH ; SET CONSOLE INPUT REQUEST FLAG
CALL 5 ; BDOS ADDRESS, READ CONSOLE STATUS
CPI 0 ; TEST RESULT RETURNED
JZ LOOP ; LOOP AGAIN IF NO KEY WAS HIT,
RET ; ELSE QUIT IMMEDIATELY
COUNT DB 0
USER DB 0 ; FILLED BY dBASE II POKE, LAST BYTE
END