;
;  This will becom the normal DOS entry point
;
;       Rev 02.41 11/02/82   blc   ROMable version.
;       This module has to agree with the IOSROM
;       except EXECTBL.
;
most    equ     0             ; 0 = not MOST
                              ; 1 = MOST -- see the CP module.
        nam     IOSRAM
        ent     dosep
        ext     dos
;
        ram
dosep:
        jmp     dos
        jmp     dos
        jmp     dos
;
; -------------------------------------------------
;       REV 02.41 10/28/82   blc
;	USER REGISTERS
;
        ent     urreg,schsw,sysbot,sysold,sysopi
        ext     ucb,sdvt,sdt
;
        ram
URREG:
      	DW	UCB	; PTR TO USER CONTROL BLOCK
SCHSW:
        DB	0	; RESCHEDULE SWITCH
	DW	SDVT,SDT
SYSBOT:
       	DW	DOSEP	; BOTTOM OF SYSTEM
	DW	OPLINK	; OPI LINKAGE TABLE
sysold:
       	dw	dosep					;02.20
sysopi:
       	dw	dosep					;02.20
;
; --------------------------------------------------
;	OPERATOR INTERFACE LINKAGE
;	TO OPERATING SYSTEM PROPER
;		REV 02.00 3/12/80 RLR
;               REV 02.41 10/27/82 BLC
;
        ENT     OPLINK                                 ;02.41
        ent     opcall,opdisk,batdsk,opicl             ;02.41
        ent     dirlsx,batfcb,opihl                    ;02.41
;
     	ext	bye,bootnm			       ;02.40
        ext     opires,opi1  ; 02.41
;
        ram                  ; 02.41
OPLINK:
	dw	opires	; opi status + batch flag	 02.20
OPCALL:
       	DB	0	; FLAG FOR OPCALL
	DW	0	; BATCH FILE RECORD PTR
;	LINE DELETED 					;02.37
OPDISK:
       	DB	1	; OPI DISK LOCATION
batdsk:
        DB	1	; batch default disk 		 02.10
opicl:
        dw	opi1	; opi load/cp entry address	 02.20
	dw	opi1					;02.20
dirlsx:
       	dw	0	; will be address of DIR	 02.20
;
;	other lines deleted				 02.20
;	JMP BYE DELETED					 02.37
;			lines deleted			 02.20
;			BATCH CONTROL FILE FCB
BATFCB:
       	DB	0,'$$@@    CMD',0,0,0,0			;02.37
	DS	16
	DB	0
;
	jmp	bye	; Linkage to BYE routine		;02.40
	dw	bootnm	; Boot filename so users can fiddle	;02.40
opihl:
      	dw	0	; HL returned from user programs	;02.40
;
; -------------------------------------------------
        ent     dpbcpm,dpbrsv                   ;02.41
;
;	cp/m disk descriptor code added at	 02.37
;
dpbcpm:	dw	26	; # sec/track				;02.40
	db	3,7,0	; tells cluster size, etc.
	dw	242	; number of clusters -1
	dw	63	; number of dir entries -1
	dw	-1	; fake allocation bits
	dw	1	; cksum records
dpbrsv:	dw	2	; fake reserved tracks			;02.40
;
        ds      256-($-dosep)      ;fill out block.
        eject
;
;----------------------------------------------------
;	cp/m compatible jump table here!!!!!!
;
        ent     wboot,cstat,c1stat,cind,c1ind
        ent     coutw,loutw,poutw,rin,r1in
        ent     lrdy,l1rdy,coutd,coutz,c1outd
        ent     lout,loutz,l1out,pout,poutz,p1out
;
        ext     rboot,syabt,home,seldsk,settrk
        ext     setsec,setdma,read,write,sectrn
;
        ram
	JMP	RBOOT	; COLD BOOT
WBOOT:	JMP	SYABT
;			DEVICE I/O
CSTAT:	JMP	0		;02.37
C1STAT	EQU	$-2		;02.37
CIND:	JMP	0		;02.37
C1IND	EQU	$-2		;02.37
COUTW:	JMP	COUTZ		;02.37
LOUTW:	JMP	LOUTZ		;02.37
POUTW:	JMP	POUTZ		;02.37
RIN:	JMP	0		;02.37
R1IN	EQU	$-2		;02.37
;			DISK I/O
	JMP	HOME
	JMP	SELDSK
	JMP	SETTRK
	JMP	SETSEC
	JMP	SETDMA
	JMP	READ
	JMP	WRITE
LRDY:	jmp	0		;02.37
L1RDY	EQU	$-2		;02.37
	jmp	sectrn		;cp/m 2.0	02.20
;
; CBIOS OUTPUT CALLS ARE FROM 'C' REG
;
COUTD:	MOV	C,A		;02.37
	JMP	COUTW		;02.37
;
COUTZ:	MOV	A,C		;02.37
	JMP	0		;02.37
C1OUTD	EQU	$-2		;02.37
LOUT:	MOV	C,A		;02.37
	JMP	LOUTW		;02.37
;
LOUTZ:	MOV	A,C		;02.37
	JMP	0		;02.37
L1OUT	EQU	$-2		;02.37
POUT:	MOV	C,A		;02.37
	JMP	POUTW		;02.37
;
POUTZ:	MOV	A,C		;02.37
	JMP	0		;02.37
P1OUT	EQU	$-2		;02.37
;
        ifc     most            ;02.41
exectbl:
        ds      30
        endc
;
        end
