home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / magazine / pcmagazi / 1992 / 12 / pause.scr < prev    next >
Text File  |  1992-06-01  |  2KB  |  58 lines

  1. A 0100
  2. DB   FF,FF,FF,FF
  3. DW   8000,003A,0045
  4. DB   "PAUSE",20,20,20
  5. DB   0,0,0,0
  6. DB   0D,0A,"Press any key to continue . . .",0D,0A,0
  7. CS:                             ;Device driver strategy routine
  8. MOV  WORD PTR [12],BX
  9. CS:
  10. MOV  WORD PTR [14],ES
  11. RETF
  12. PUSHF                           ;Device driver interrupt routine
  13. PUSH AX                         ;Save registers
  14. PUSH SI
  15. PUSH DI
  16. PUSH DS
  17. PUSH BP
  18. PUSH CS                         ;Point DS to the code segment
  19. POP  DS
  20. LES  DI,[12]                    ;Point ES:DI to request header
  21. ES:
  22. CMP  BYTE PTR [DI+2],0          ;Exit if command code is not 0
  23. JNZ  016A
  24. CALL 0177                       ;Call Pause routine
  25. ES:
  26. MOV  BYTE PTR [DI+0D],0         ;Zero unit count for return
  27. ES:
  28. MOV  WORD PTR [DI+0E],0         ;Zero break address so the
  29. ES:                             ;  driver will not remain in
  30. MOV  WORD PTR [DI+10],CS        ;  memory
  31. ES:
  32. MOV  WORD PTR [DI+3],100
  33. POP  BP                         ;Restore registers and exit
  34. POP  DS
  35. POP  DI
  36. POP  SI
  37. POP  AX
  38. POPF
  39. RETF
  40. MOV  SI,16                      ;Pause routine
  41. CLD                             ;Clear direction flag
  42. LODSB                           ;Read a character
  43. OR   AL,AL                      ;Exit if it's 0
  44. JZ   0186
  45. MOV  AH,0E                      ;Display the character
  46. INT  10
  47. JMP  017B                       ;Go back for more
  48. MOV  AH,0                       ;Pause until a key is
  49. INT  16                         ;  pressed
  50. RET                             ;Return to caller
  51.  
  52. N PAUSE.SYS
  53. RCX
  54. 8B
  55. W
  56. Q
  57.  
  58.