FLOADASM;Programm FLOAD 0000H 00D7H
;--------------------------
;
;Laderoutine, die bei Systemstart der
;CAOS-Betriebsart bereitgestellt wird.
;
;			` ml 13.09.1990
;---------------------------------------
ARGN	EQU 0B781H
ARG1	EQU ARGN+1
NUMVX	EQU 0B797H
PV1	EQU 0F003H
WAIT	EQU 14H
INLIN	EQU 17H
ERRM	EQU 19H
AHEX	EQU 1CH
OSTR	EQU 23H
;--------------------------
	ORG 0
	DEFM '            '
;000CH
	CALL 0F018H	;IRM ON
	LD HL,0
	CALL 0F00FH	;UP relativ
	DEFW 0024H	;Diff. --> 36H
	CALL 0F01BH	;IRM OFF
	RET
;001BH
	DEFW 7F7FH
	DEFM 'FLOAD'
	DEFB 1
	CALL PV1
	DEFB OSTR
	DEFM 'Name :'
	DEFB 0
	CALL PV1
	DEFB INLIN
	EX (SP),HL
	LD (NUMVX),HL
	EX (SP),HL
	LD HL,6
	ADD HL,DE	;6. Posit.
	LD E,0CH	;Anzahl
	LD BC,82F3H	;Portadr.
NAMOUT	LD A,M		;Name
	OUT (C),A
	INC HL
	INC B
	DEC E
	JR NZ,NAMOUT
	LD A,9
	LD B,80H
	OUT (C),A
NRDY	PUSH BC
	LD A,1
	CALL PV1
	DEFB WAIT
	POP BC
	IN A,(C)
	BIT 0,A
	JR NZ,NRDY	;nicht fertig
	BIT 7,A
	JR NZ,ERR	;Fehler
	LD BC,90F2H	;Portadr.
	IN A,(C)
	CP 02H
	JR C,ERROR	; <  2 Argumente
	CP 0AH
	JR NC,ERROR	; > 10 Argumente
	INC B		;91
	IN L,(C)
	INC B		;92
	IN H,(C)	;   Anf-Adr.
	INC B		;93
	IN E,(C)
	INC B		;94
	IN D,(C)	;   End-Adr.
	CP 03H
	JR C,NSTART	;ohne Startadr.
	PUSH HL
	INC B		;95
	IN L,(C)
	INC B		;96
	IN H,(C)	;   Start-Adr.
	EX (SP),HL
NSTART	PUSH AF
	LD A,(ARGN)
	AND A
	JR Z,ARG0
	LD BC,(ARG1)	;Offset
	ADD HL,BC
	POP AF
	JR C,ONST	;ohne Startadr.
	EX (SP),HL
	ADD HL,BC
	EX (SP),HL
ONST	EX DE,HL
	ADD HL,BC
	EX DE,HL
	PUSH AF
ARG0	POP AF
NBLOCK	LD A,1
	LD BC,80F3H	;Portadr. Daten
	OUT (C),A
DNRDY	PUSH BC
	LD A,1
	CALL PV1
	DEFB WAIT
	POP BC
	IN A,(C)
	BIT 0,A
	JR NZ,DNRDY
	BIT 7,A
	JR Z,NERR
ERR	LD BC,81F3H	;Portadr. Fehler
	IN A,(C)
	CALL PV1
	DEFB AHEX
ERROR	CALL PV1
	DEFB ERRM
	POP HL
	LD HL,(NUMVX)
	JP (HL)
NERR	DEC C		;F2
BLW	INI		;Daten --> (HL)
	INC B		;B wie vorher
	INC B		;B+1
	PUSH HL
	SBC HL,DE
	POP HL
	RET NC		;wenn ENDE
	LD A,B
	AND A
	JR NZ,BLW	;80H Byte
	JR NBLOCK	;neuen Block
;00D7H
lf`[VQLHD@<9630MELO1§(>2’·MELO2§(>2’·НрЙ"—·* ·%."”·э*—·э~хеэе*”·" ·бх