TITLE SETANSI.ASM - SET FUNCTION KEYS FOR ANSI.SYS DRIVER
NAME SET_CODE
PAGE 75,132
;
SETUP    MACRO CMDLENGTH,COMMAND
         MOV       CX,CMDLENGTH
         MOV       DX,OFFSET COMMAND
         MOV       AH,40H              ;FUNCTION='WRITE TO DEVICE'
         CALL      DOSVECTOR           ;CALL TO DOS (FAR)
         ENDM
;
SET_CODE SEGMENT PARA PUBLIC 'CODE'
         ASSUME    CS:SET_CODE,DS:SET_CODE
;
         ORG       50H                 ;INT 21H - FAR RETURN
DOS      LABEL     FAR                 ;DOS RETURN
         ORG       100H                ;
ENTPT:   JMP       SHORT START         ;START THE PROCESSOR
STRING1  DB        27,'[0;68;"DIR/P B:";13p'
STRSIZ1  EQU       $-STRING1
STRING2  DB        27,'[0;67;"DIR/P A:";13p'
STRSIZ2  EQU       $-STRING2
STRING3  DB        27,'[0;66;"A:FIX B:";13p'
STRSIZ3  EQU       $-STRING3
STRING4  DB        27,'[0;65;"CD";13p'
STRSIZ4  EQU       $-STRING4
STRING5	DB	27,'[0;25;"A:PRINT";p'
STRSIZ5	EQU	$-STRING5
STRING6	DB	27,'[0;84;"A:CLOCK";13p'
STRSIZ6	EQU	$-STRING6
;
HANDLE   EQU       1                   ;PREDEFINED FILE HANDLE FOR OUTPUT
;
DOSVECTOR LABEL    DWORD
DOSOFF   DW        DOS
DOSSEG   DW        0                   ;SEGMENT (TO BE FILLED)
;
START    PROC      NEAR                ;
         MOV       AX,CS               ;FIND WHERE THIS CODE IS
         MOV       DOSSEG,AX           ;SET VECTOR WHEN FOUND
         MOV       BX,HANDLE           ;SET THE FILE HANDLE FOR DRIVER SET
         SETUP     STRSIZ1,STRING1
         SETUP     STRSIZ2,STRING2
         SETUP     STRSIZ3,STRING3
         SETUP     STRSIZ4,STRING4
	SETUP	STRSIZ5,STRING5
	SETUP	STRSIZ6,STRING6
         RET                           ;RETURN TO DISK OPER SYSTEM
START    ENDP
SET_CODE ENDS
         END       ENTPT
