CSEG    SEGMENT PARA PUBLIC 'CODE'              ;Start CODE segment
        ASSUME  CS:CSEG,DS:CSEG,ES:CSEG,SS:CSEG ;Set by DOS Loader
                ORG     100H                    ;COM file format

ENTPT:          JMP     MAIN

SUPPORT_MSG     DB      "This BIOS supports extended keys$"
NO_SUP_MSG      DB      "This BIOS does not support extended keys$"

MAIN    PROC    NEAR

                XOR     AX,AX
                MOV     ES,AX
        ASSUME  ES:NOTHING

                MOV     DX,OFFSET NO_SUP_MSG
                MOV     AH,12H
                INT     16H
                CMP     AL,BYTE PTR ES:[417H]
                JNE     NO_SUPPORT

                XOR     BYTE PTR ES:[417H],80H
                MOV     AH,12H
                INT     16H
                CMP     AL,BYTE PTR ES:[417H]
                JNE     NO_SUPPORT

                MOV     DX,OFFSET SUPPORT_MSG
NO_SUPPORT:
                XOR     BYTE PTR ES:[417H],80H
                MOV     AH,9
                INT     21H

                MOV     AH,4CH                  ;Terminate program
                INT     21H                     ;Thru DOS
MAIN    ENDP
CSEG    ENDS

        END     ENTPT
