;Copyright 2000 - Mark McDonald All rights reserved
; DECLARE: FUNCTION isnl() AS INTEGER
; DESC:    Returns true if Num Lock is on.
; EXAMP:   IF isnl THEN GOTO ...

MCODE Segment Byte
        Assume  CS: MCODE

        Public  isnl

isnl Proc Far
        push    ES                      ;
        xor     AX,AX                   ; clear AX
        mov     ES,AX                   ; set ES to BIOS data segment
        test    Byte Ptr ES: [417h],32  ; is num lock on?
        jz      Exit                    ; no, exit
        inc     AX                      ; return true (1)
Exit:
        pop     ES                      ;
        retf
isnl EndP
MCODE EndS
        End