;	Code and Data Interface for MP/M-86 PLM RSPs
;	August 10, 1981

cgroup	group	code
dgroup  group   dats 
	public	xdos,mon1,mon2,mon3,mon4
	public rsplink,buff,fcb,fcb16
	extrn  plmstart:near

assume   cs:cgroup,ds:dgroup

dats	segment 'DATA'
org	0
rsphdr_len	equ	16
pd_len		equ	30H
uda_len		equ	100H
rsp_top		equ	0
rsp_pd		equ	rsp_top + rsphdr_len
rsp_uda		equ	rsp_pd + pd_len
rsp_bottom	equ	rsp_uda + uda_len
	org	rsp_top
				;RSP header
rsplink	dw	0		;becomes system data page paragraph
sdatvar dw	0
ncopies db	0
	dw	0,0,0,0, 0
	db	0
	org	rsp_pd
pd	dw	0,0		;link fields
	db	0		;status
	db	190		;priority
	dw	3		;flags - system and keep
	db	'MPMSTAT '	;name
	dw	rsp_uda/10h	;uda paragraph
	db	0,0		;disk,user
        db	0,0		;ldisk,luser
	dw	0		;puremem - not re-entrant
				;rest of pd

org	rsp_uda			;start of uda
uda	dw	0
	dw	offset dma
	dw	0,0,0,0, 0,0,0,0, 0,0,0,0
	dw	0,0,0,0, 0,0,0,0, 0,0,0,0
	dw	offset stk_top

org	rsp_bottom
dma	db	0
buff	equ	dma
org	offset $ + 128

stk	dw	0CCCCH,0CCCCH,0CCCCH,0CCCCH,  0CCCCH,0CCCCH,0CCCCH,0CCCCH
        dw      0CCCCH,0CCCCH,0CCCCH,0CCCCH,  0CCCCH,0CCCCH,0CCCCH,0CCCCH
        dw      0CCCCH,0CCCCH,0CCCCH,0CCCCH,  0CCCCH,0CCCCH,0CCCCH,0CCCCH
        dw      0CCCCH,0CCCCH,0CCCCH,0CCCCH,  0CCCCH,0CCCCH,0CCCCH,0CCCCH
        dw      0CCCCH,0CCCCH,0CCCCH,0CCCCH,  0CCCCH,0CCCCH,0CCCCH,0CCCCH
        dw      0CCCCH,0CCCCH,0CCCCH,0CCCCH,  0CCCCH,0CCCCH,0CCCCH,0CCCCH
        dw      0CCCCH,0CCCCH,0CCCCH,0CCCCH,  0CCCCH,0CCCCH,0CCCCH,0CCCCH
        dw      0CCCCH,0CCCCH,0CCCCH,0CCCCH,  0CCCCH,0CCCCH,0CCCCH,0CCCCH

stk_top	dw	plmstart
	dw	0,0		;segment and flags - unknown
fcb	dw	0,0,0,0, 0,0,0,0
fcb16	dw	0,0,0,0, 0,0,0,0
cr	db	0
rr	dw	0
rovfl	db	0

datsend equ	offset $
dats ends

code	segment public 'CODE'
        org     datsend

	db	'COPYRIGHT (C) 1981,'
	db	' DIGITAL RESEARCH '
	db	'654321'
	db	' MP/M-86 2.0 10/5/81'

xdos	proc	
	push	bp
	mov	bp,sp
	mov	dx,[bp+4]
	mov	cx,[bp+6]
	int	224
	pop	bp
	ret	4
xdos	endp

mon1	equ	xdos
mon2	equ	xdos
mon3	equ	xdos
mon4    equ     xdos
code	ends
end
