;Copyright 2000 - Mark McDonald All rights reserved
; DECLARE: FUNCTION ISCLP() AS INTEGER
; DESC:    Returns true if the Caps Lock key is depressed.
; EXAMP:   IF ISCLP THEN GOTO ....
; ISCLP()
;     Is Caps Lock key Pressed.
;     Returns 1 if CapsLock is pressed.
;     Returns 0 if not.
;     EXAMPLE:  T = ISCLP   0

MCODE Segment Byte
        Assume  CS: MCODE

        Public  ISCLP

ISCLP Proc Far
        push    ES                      ;

        xor     AX,AX                   ; clear AX
        mov     ES,AX                   ; set ES to BIOS data segment
        test    Byte Ptr ES: [418h],64  ; is Caps key bit on?
        jz      Exit                    ; no, exit
        inc     AX                      ; return true (1)
Exit:
        pop     ES                      ;
        retf
ISCLP EndP
MCODE EndS
        End