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

  1.     PAGE    57,132
  2.     TITLE    CAPSLOCK -- Toggles Caps Lock Bit.
  3.     NAME    CAPSLOCK
  4. ;
  5. ;    This routine toggles the  Caps Lock  bit  in  word  417H.   Its
  6. ;    primary use is to make the Caps Lock Status key on the keyboard
  7. ;    agree with the actual status of the Caps Lock bit.
  8. ;
  9. ;    Program by Harry M. Murphy,  5 January 1987.
  10. ;
  11. CR    EQU    0DH        ;Carriage Return code.
  12. DOS    EQU    21H        ;DOS interrupt.
  13. LF    EQU    0AH        ;Line Feed code.
  14. TAB    EQU    09H        ;Tab code.
  15. ;
  16. CAPSLOCK SEGMENT 'CODE'
  17.     ORG    100H
  18.     ASSUME    CS:CAPSLOCK,DS:CAPSLOCK,ES:NOTHING
  19. ;
  20. START:    XOR    AX,AX            ;Clear ES
  21.     MOV    ES,AX            ;  to zero
  22.     MOV    BX,0417H        ;BX ==> keybord status.
  23.     XOR    BYTE PTR ES:[BX],40H    ;Toggle Caps Lock bit.
  24.     MOV    AH,09H            ;Display
  25.     MOV    DX,OFFSET MSG        ;  "toggled"
  26.     INT    DOS            ;    message and
  27.     MOV    AX,4C00H        ;      terminate
  28.     INT    DOS            ;        this process.
  29. ;
  30. MSG:    DB    TAB,'>>>  Caps Lock bit toggled.',CR,LF,'$'
  31. CAPSLOCK ENDS
  32.     END    START
  33.