
; Update to LSDOS 6.3.1 2022-09-16 dpm
			
; This routine LOADs a Load Module Format file.

			ORG     zspace.LOAD$

zLOAD		LD	B,0		;LRL=256
		LD	HL,SFLAG$
		SET	0,(HL)		;Don"t set "file open"
		LD	HL,SBUFF$	;Set buffer to system
		CALL	zOPEN		;Open the file
		PUSH	DE		;Save FCB pointer
		CALL	Z,LOADER	;Load if no OPEN error
		POP	DE		;Restore FCB pointer
		RET	Z		;Back if no error
		LD	L,A		;Xfer the error code
		LD	H,0
		OR	0C0h		;Set RETurn & abbrev
		CP	0D8h		;Change "file not in dir"
		RET	NZ		;to "program not found"
		ADD	A,7
		RET