home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
magazine
/
pcmagazi
/
1992
/
12
/
pause.scr
< prev
next >
Wrap
Text File
|
1992-06-01
|
2KB
|
58 lines
A 0100
DB FF,FF,FF,FF
DW 8000,003A,0045
DB "PAUSE",20,20,20
DB 0,0,0,0
DB 0D,0A,"Press any key to continue . . .",0D,0A,0
CS: ;Device driver strategy routine
MOV WORD PTR [12],BX
CS:
MOV WORD PTR [14],ES
RETF
PUSHF ;Device driver interrupt routine
PUSH AX ;Save registers
PUSH SI
PUSH DI
PUSH DS
PUSH BP
PUSH CS ;Point DS to the code segment
POP DS
LES DI,[12] ;Point ES:DI to request header
ES:
CMP BYTE PTR [DI+2],0 ;Exit if command code is not 0
JNZ 016A
CALL 0177 ;Call Pause routine
ES:
MOV BYTE PTR [DI+0D],0 ;Zero unit count for return
ES:
MOV WORD PTR [DI+0E],0 ;Zero break address so the
ES: ; driver will not remain in
MOV WORD PTR [DI+10],CS ; memory
ES:
MOV WORD PTR [DI+3],100
POP BP ;Restore registers and exit
POP DS
POP DI
POP SI
POP AX
POPF
RETF
MOV SI,16 ;Pause routine
CLD ;Clear direction flag
LODSB ;Read a character
OR AL,AL ;Exit if it's 0
JZ 0186
MOV AH,0E ;Display the character
INT 10
JMP 017B ;Go back for more
MOV AH,0 ;Pause until a key is
INT 16 ; pressed
RET ;Return to caller
N PAUSE.SYS
RCX
8B
W
Q