; regstartml.dsm
; 8086 C Runtime Startup

; L. Stewart, October 4, 1982  10:36 PM
; L. Stewart, February 23, 1983  3:16 PM, SSLimit, INT 5


SBASE	EQU	00H
SPIN	EQU	0D3FEH
SLIM	EQU	0D020H

SPACE	SEGMENT

C←GROUP GROUP SPACE, C←CODE, C←DATA

; 	DB	2 DUP(?)

SPACE	ENDS

C←CODE SEGMENT

EXTRN	←MonMain:NEAR
EXTRN	←SSLimit:NEAR

ASSUME CS:C←CODE, DS:C←DATA
←cstart:
	MOV	AX,SBASE
	MOV	SS,AX
	MOV	ES,AX
	MOV	DS,AX
	MOV	AX,SPIN
	MOV	SP,AX
	MOV	BX,SLIM
	CALL	←SSLimit
	CALL	←MonMain
;	MOV	BX,0FFF9H
; boot the machine
	INT	5

C←CODE ENDS
	END