home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / pascal / library / dos / murutil / lockps.asm < prev    next >
Encoding:
Assembly Source File  |  1988-02-04  |  1.4 KB  |  46 lines

  1.     PAGE    57,132
  2.     TITLE    LOCKPS -- Disables/Enables PrtSc.
  3.     NAME    LOCKPS
  4. ;
  5. ;    This routine toggles the "print-screen  operation  in  progress"
  6. ;    bit in  word 500H.   When this bit is set,  DOS assumes  that  a
  7. ;    print-screen is already under way and won't start  another  one.
  8. ;    By toggling this bit ON, you effectively inhibit PrtSc until you
  9. ;    toggle it OFF.
  10. ;
  11. ;    Program by Harry M. Murphy  --  4 February 1988.
  12. ;
  13. CR    EQU    0DH        ;Carriage Return code.
  14. DOS    EQU    21H        ;DOS interrupt.
  15. LF    EQU    0AH        ;Line Feed code.
  16. TAB    EQU    09H        ;Tab code.
  17. ;
  18. LOCKPS SEGMENT 'CODE'
  19.     ORG    100H
  20.     ASSUME    CS:LOCKPS,DS:LOCKPS,ES:NOTHING
  21. ;
  22. START:    XOR    AX,AX            ;Clear ES
  23.     MOV    ES,AX            ;  to zero
  24.     MOV    BX,0500H        ;BX ==> PrtSc status.
  25.     MOV    AL,BYTE PTR ES:[BX]    ;Get PrtSc status in AL.
  26.     CMP    AL,1            ;If locked, jump to
  27.     JE    UNLOK            ;  unlock PrtSc.
  28. ;
  29. LOK:    MOV    AL,1            ;Otherwise, get locked status
  30.     MOV    DX,OFFSET LOCKED    ;  in AL, point to LOCKED
  31.     JMP    SHORT EXIT        ;    message and jump to EXIT.
  32. ;
  33. UNLOK:    XOR    AL,AL            ;Clear locked status in AL and
  34.     MOV    DX,OFFSET UNLOCK    ;  point to UNLOCKED message.
  35. ;
  36. EXIT:    MOV    BYTE PTR ES:[BX],AL    ;Set LOCKED/UNLOCKED status,
  37.     MOV    AX,0900H        ;  display the
  38.     INT    DOS            ;    message
  39.     MOV    AX,4C00H        ;      and terminate
  40.     INT    DOS            ;        this process.
  41. ;
  42. LOCKED    DB    TAB,'>>>  PrtSc is now locked.',CR,LF,'$'
  43. UNLOCK    DB    TAB,'>>>  PrtSc is now unlocked.',CR,LF,'$'
  44. LOCKPS    ENDS
  45.     END    START
  46.