NAME    DAVID

;    DAVID'S MS-FORTRAN Runtime DOS INTERFACE.

;       DGROUP, DATA   segment    class DATA
;
DATA    SEGMENT PUBLIC 'DATA'
DATA    ENDS

DGROUP  GROUP  DATA
CODE    SEGMENT 'CODE'
        ASSUME  CS:CODE,DS:DGROUP,SS:DGROUP
PUBLIC  DOSFN

;DOSFN:  Call DOS Operating System
;
DOSFN   PROC    FAR
        POP     SI
        POP     DI
        POP     BX
        POP     ES             ;ES,BX := addr of 2nd param
        MOV     DX,ES:[BX]
        POP     BX
        POP     ES
        MOV     AX,ES:[BX]
        MOV     AH,AL          ;must be in high half
        PUSH    DI
        PUSH    SI
        PUSH    BP             ;have to save this one
        INT     33             ;onward to DOS
        ;
        ; Carry will be set if dos error.
        ;
        AND     AX,00FFH
        POP     BP             ;restore frame pointer
        RET                    ;return (DOS ret in AX)
        DOSFN   ENDP
        CODE    ENDS

END
