
; INT 21h Standard Functions

        PUBLIC  MAXCALL
        PUBLIC  MAXCOM
        PUBLIC  DISPATCH

glf_    MACRO  name
        EXTRN name:NEAR
        DW  CSOFFSET name
        ENDM

DISPATCH    LABEL WORD          ;AH= V86CODE= MVDM..../SVC=
 glf_ $ABORT                    ;00h MsProc
 glf_ $STD_CON_INPUT            ;01h CpmIo2
 glf_ $STD_CON_OUTPUT           ;02h CpmIo2
 glf_ $STD_AUX_INPUT            ;03h CpmIo2
 glf_ $STD_AUX_OUTPUT           ;04h CpmIo2
 glf_ $STD_PRINTER_OUTPUT       ;05h CpmIo2
 glf_ $RAW_CON_IO               ;06h CpmIo
 glf_ $RAW_CON_INPUT            ;07h CpmIo
 glf_ $STD_CON_INPUT_NO_ECHO    ;08h CpmIo    DemSvc/Sleep
 glf_ $STD_CON_STRING_OUTPUT    ;09h CpmIo
 glf_ $STD_CON_STRING_INPUT     ;0Ah CpmIo
 glf_ $STD_CON_INPUT_STATUS     ;0Bh CpmIo2
 glf_ $STD_CON_INPUT_FLUSH      ;0Ch CpmIo2
 glf_ $DISK_RESET               ;0Dh Misc     DemFile2/DiskReset
 glf_ $SET_DEFAULT_DRIVE        ;0Eh GetSet   DemFile2/SetDefaultDrive
 glf_ $FCB_OPEN                 ;0Fh FcbIo2   DemFcb2/FcbOpen
 glf_ $FCB_CLOSE                ;10h FcbIo    DemFcb2/FcbClose
 glf_ $DIR_SEARCH_FIRST         ;11h Search   DemFile2/FindFirstFcb
 glf_ $DIR_SEARCH_NEXT          ;12h Search   DemFile2/FindNextFcb
 glf_ $FCB_DELETE               ;13h FcbIo    DemPath2/DeleteFcb
 glf_ $FCB_SEQ_READ             ;14h FcbIo2   DemFcb2/FcbIo
 glf_ $FCB_SEQ_WRITE            ;15h FcbIo2   DemFcb2/FcbIo
 glf_ $FCB_CREATE               ;16h FcbIo2   DemFcb2/FcbOpen
 glf_ $FCB_RENAME               ;17h FcbIo    DemPath2/RenameFcb
 glf_ NO_OP                     ;18h MsCode
 glf_ $GET_DEFAULT_DRIVE        ;19h GetSet
 glf_ $SET_DMA                  ;1Ah GetSet   DemFile2/SetDTA
 glf_ $SLEAZEFUNC               ;1Bh Misc     DemFile2/GetDriveFreeSpace
 glf_ $SLEAZEFUNCDL             ;1Ch Misc     DemFile2/GetDriveFreeSpace
 glf_ NO_OP                     ;1Dh MsCode
 glf_ NO_OP                     ;1Eh MsCode
 glf_ $GET_DEFAULT_DPB          ;1Fh Misc     DemMisc2/GetDPB
 glf_ NO_OP                     ;20h MsCode
 glf_ $FCB_RANDOM_READ          ;21h FcbIo2   DemFcb2/FcbIo
 glf_ $FCB_RANDOM_WRITE         ;22h FcbIo2   DemFcb2/FcbIo
 glf_ $GET_FCB_FILE_LENGTH      ;23h FcbIo    DemFcb2/FcbLength
 glf_ $GET_FCB_POSITION         ;24h FcbIo
VAL1                            =      ($-DISPATCH)/2 - 1
 glf_ $SET_INTERRUPT_VECTOR     ;25h GetSet
 glf_ $CREATE_PROCESS_DATA_BLOCK;26h Misc     DemFile2/DupJFT & DemSvc/SetCurrentPDB
 glf_ $FCB_RANDOM_READ_BLOCK    ;27h FcbIo2   DemFcb2/FcbIo
 glf_ $FCB_RANDOM_WRITE_BLOCK   ;28h FcbIo2   DemFcb2/FcbIo
 glf_ $PARSE_FILE_DESCRIPTOR    ;29h Parse    DemFile2/MakeFCB
 glf_ $GET_DATE                 ;2Ah Time     DemSvc/QueryDate
 glf_ $SET_DATE                 ;2Bh Time     DemSvc/SetDate
 glf_ $GET_TIME                 ;2Ch Time     DemSvc/QueryTime
 glf_ $SET_TIME                 ;2Dh Time     DemSvc/SetTime
 glf_ $SET_VERIFY_ON_WRITE      ;2Eh GetSet   DemSvc/SetWriteVerify
 glf_ $GET_DMA                  ;2Fh GetSet
 glf_ $GET_VERSION              ;30h GetSet   DemSvc/GetVersion
 glf_ $Keep_Process             ;31h MsProc
 glf_ $GET_DPB                  ;32h Misc     DemMisc2/GetDPB
 glf_ $SET_CTRL_C_TRAPPING      ;33h MsDisp
 glf_ $GET_INDOS_FLAG           ;34h Misc
 glf_ $GET_INTERRUPT_VECTOR     ;35h GetSet
 glf_ $GET_DRIVE_FREESPACE      ;36h GetSet   DemFile2/GetDriveFreeSpace
 glf_ $CHAR_OPER                ;37h GetSet
 glf_ $INTERNATIONAL            ;38h GetSet   DemNls/GetCountryInfo
 glf_ $MKDIR                    ;39h Path     DemPath2/CreateDir
 glf_ $RMDIR                    ;3Ah Path     DemPath2/DeleteDir
 glf_ $CHDIR                    ;3Bh Path     DemPath2/SetCurrentDir
 glf_ $CREAT                    ;3Ch File     DemFile2/Open & DemFile2/Close
 glf_ $OPEN                     ;3Dh File     DemFile2/Open & DemFile2/Close
 glf_ $CLOSE                    ;3Eh Handle   DemFile2/Close
 glf_ $READ                     ;3Fh Handle   DemFile2/Read
 glf_ $WRITE                    ;40h Handle   DemFile2/Write
 glf_ $UNLINK                   ;41h File     DemPath2/Delete
 glf_ $LSEEK                    ;42h Handle   DemFile2/ChgFilePtr
 glf_ $CHMOD                    ;43h File     DemFile2/ChMod
 glf_ $IOCTL                    ;44h Ioctl    DemIoc2/Ioctl
                                ;4400h ioctl_getset_data    DemIoc2/Ioctl demiocGetDevData
                                ;4401h ioctl_getset_data    DemIoc2/Ioctl demiocSetDevData
                                ;4402h ioctl_control_string DemIoc2/Ioctl demiocReadHandle
                                ;4403h ioctl_control_string DemIoc2/Ioctl demiocWriteHandle
                                ;4404h ioctl_get_device     DemIoc2/Ioctl demiocReadBlock
                                ;4405h ioctl_get_device     DemIoc2/Ioctl demiocWriteBlock
                                ;4406h ioctl_status                       demiocInputStatus
                                ;4407h ioctl_status                       demiocOutputStatus
                                ;4408h ioctl_rem_media      DemIoc2/Ioctl demiocRemovableMedia
                                ;4409h ioctl_redir_block    DemIoc2/Ioctl demiocRedirBlock
                                ;440Ah ioctl_handle_redir   DemIoc2/Ioctl demiocRedirHandle
                                ;440Bh Set_Retry_Parameters DemIoc2/Ioctl demiocSetRetries
                                ;440Ch GenericIoctlHandle   DemIoc2/Ioctl demiocGenericHandle
                                ;440Dh GenericIoctl         DemIoc2/Ioctl demiocGenericBlock & DemIoc2/GetDriveInfo
                                ;440Eh ioctl_drive_owner    DemIoc2/Ioctl demiocGetLogDrive
                                ;440Fh ioctl_drive_owner    DemIoc2/Ioctl demiocSetLogDrive
                                ;4410h query_handle_support               demiocQueryHandle
                                ;4411h query_device_support               demiocQueryBlock
 glf_ $DUP                      ;45h Handle   DemFile2/Dup
 glf_ $DUP2                     ;46h Handle   DemFile2/Dup
 glf_ $CURRENT_DIR              ;47h Path     DemPath2/QueryCurrentDir
 glf_ $ALLOC                    ;48h Alloc
 glf_ $DEALLOC                  ;49h Alloc
 glf_ $SETBLOCK                 ;4Ah Alloc
 glf_ $EXEC                     ;4Bh MsProc   DemPath2/SetTitle & DemSvc/GetVersion & DemSvc/SpecialEntries
                                ;4B00h
                                ;4B01h
                                ;4B03h
                                ;4B05h
 glf_ $EXIT                     ;4Ch MsProc
 glf_ $WAIT                     ;4Dh MsProc
 glf_ $FIND_FIRST               ;4Eh Search   DemFile2/FindFirst
 glf_ $FIND_NEXT                ;4Fh Search   DemFile2/FindNext
 glf_ $SET_CURRENT_PDB          ;50h MsDisp   DemSvc/SetCurrentPDB
 glf_ $GET_CURRENT_PDB          ;51h MsDisp
 glf_ $GET_IN_VARS              ;52h Misc
 glf_ $SETDPB                   ;53h Misc
 glf_ $GET_VERIFY_ON_WRITE      ;54h GetSet
 glf_ $DUP_PDB                  ;55h Misc     DemFile2/DupJFT & DemSvc/SetCurrentPDB
 glf_ $RENAME                   ;56h File     DemPath2/Rename
 glf_ $FILE_TIMES               ;57h Handle   DemFile2/FileTimes
                                ;57xxh        DemFile2/ExtInfo
                                ;5714h        DemFile2/demCopyEas
 glf_ $AllocOper                ;58h Alloc
 glf_ $GetExtendedError         ;59h GetSet
 glf_ $CreateTempFile           ;5Ah File     DemFile2/CreateTemp
 glf_ $CreateNewFile            ;5Bh File     DemFile2/CreateNew
 glf_ $LockOper                 ;5Ch Lock     DemFile2/LockOper
 glf_ $ServerCall               ;5Dh SrvCall
                                ;5D00h SRV_CALL
                                ;5D01h COMMIT_ALL
                                ;5D02h CLOSE_NAME
                                ;5D03h CLOSE_UID
                                ;5D04h CLOSE_UID_PID
                                ;5D05h GET_LIST
                                ;5D06h GET_DOS_DATA
                                ;5D07h SPOOL_OPER
                                ;5D08h SPOOL_OPER
                                ;5D09h SPOOL_OPER
                                ;5D0Ah $setExtendedError
 glf_ $UserOper                 ;5Eh Macro
 glf_ $AssignOper               ;5Fh Macro
                                ;5F32h QnmPipeInfo     DemNmp2/QNmpInfo
                                ;5F33h QNmpHandState   DemNmp2/QNmpHandState
                                ;5F34h SetNmpHandState DemNmp2/SetNmpHandState
                                ;5F35h PeekNmPipe      DemNmp2/PeekNmp
                                ;5F36h TransactNmPipe  DemNmp2/TransactNmp
                                ;5F37h CallNmPipe      DemNmp2/CallNmp
                                ;5F38h WaitNmPipe      DemNmp2/WaitNmp
                                ;5F39h RawReadNmPipe   DemNmp2/RawReadNmp
                                ;5F3Ah RawWriteNmPipe  DemNmp2/RawWriteNmp
 glf_ $NameTrans                ;60h Macro2   DemFile2/NameTrans
 glf_ $JSA                      ;61h File     DemSvc/JSA            dos5={MsCode.asm "NO_OP"}
 glf_ $Get_Current_PDB          ;62h MsDisp
 glf_ $ECS_Call                 ;63h GetSet
 glf_ $Set_Printer_Flag         ;64h MsDisp   DemPath2/Generic
 glf_ $GetExtCntry              ;65h GetSet
 glf_ $GetSetCdPg               ;66h GetSet   DemNls/SetCodePage
 glf_ $ExtHandle                ;67h Handle   DemMisc2/ExtHandle
 glf_ $Commit                   ;68h Handle   DemFile2/Commit
 glf_ $GSetMediaID              ;69h Misc     DemPath2/GSetMediaID
 glf_ $Commit                   ;6Ah Handle   DemFile2/Commit
 glf_ NO_OP                     ;6Bh MsCode
 glf_ $Extended_Open            ;6Ch File     DemFile2/Open & DemFile2/Close
 glf_ $MKDIR2                   ;6Dh Path     DemPath2/CreateDir    dos5={romfind.asm "$ROM_FIND_FIRST"}
 glf_ $EnumAttrib               ;6Eh Path     DemFile2/EnumAttrib   dos5={romfind.asm "$ROM_FIND_NEXT"}
 glf_ $QMaxEASize               ;6Fh Path     DemFile2/QMaxEASize   dos5={*none*}
VAL2    =       ($-DISPATCH)/2 - 1
MAXCALL =       VAL1
MAXCOM  =       VAL2
