home *** CD-ROM | disk | FTP | other *** search
- PAGE 57,132
- TITLE LOCKPS -- Disables/Enables PrtSc.
- NAME LOCKPS
- ;
- ; This routine toggles the "print-screen operation in progress"
- ; bit in word 500H. When this bit is set, DOS assumes that a
- ; print-screen is already under way and won't start another one.
- ; By toggling this bit ON, you effectively inhibit PrtSc until you
- ; toggle it OFF.
- ;
- ; Program by Harry M. Murphy -- 4 February 1988.
- ;
- CR EQU 0DH ;Carriage Return code.
- DOS EQU 21H ;DOS interrupt.
- LF EQU 0AH ;Line Feed code.
- TAB EQU 09H ;Tab code.
- ;
- LOCKPS SEGMENT 'CODE'
- ORG 100H
- ASSUME CS:LOCKPS,DS:LOCKPS,ES:NOTHING
- ;
- START: XOR AX,AX ;Clear ES
- MOV ES,AX ; to zero
- MOV BX,0500H ;BX ==> PrtSc status.
- MOV AL,BYTE PTR ES:[BX] ;Get PrtSc status in AL.
- CMP AL,1 ;If locked, jump to
- JE UNLOK ; unlock PrtSc.
- ;
- LOK: MOV AL,1 ;Otherwise, get locked status
- MOV DX,OFFSET LOCKED ; in AL, point to LOCKED
- JMP SHORT EXIT ; message and jump to EXIT.
- ;
- UNLOK: XOR AL,AL ;Clear locked status in AL and
- MOV DX,OFFSET UNLOCK ; point to UNLOCKED message.
- ;
- EXIT: MOV BYTE PTR ES:[BX],AL ;Set LOCKED/UNLOCKED status,
- MOV AX,0900H ; display the
- INT DOS ; message
- MOV AX,4C00H ; and terminate
- INT DOS ; this process.
- ;
- LOCKED DB TAB,'>>> PrtSc is now locked.',CR,LF,'$'
- UNLOCK DB TAB,'>>> PrtSc is now unlocked.',CR,LF,'$'
- LOCKPS ENDS
- END START