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

MCODE Segment Byte
        Assume  CS: MCODE

        Public  isinsp

isinsp Proc Far
        push    ES                      ;

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