CF41ASM;	CAOS 4.1 ROM F
 
	ORG	0F000H
 
	JP	PWRON
	JP	PV1	;m. DEFB nr
	JP	PV2	;(ARGC)=nr
	JP	PV3	;E=nr
	JP	PV4	;E=nr, IRM e/a
	JP	RCALL	;m. DEFW offset
	JP	BYE	;JUMP-Einsprung
	JP	PV5	;E=nr
	JP	IRMON
	JP	IRMOF
	PUSH	BC	;PV6, (ARGC)=nr
	CALL	IRMON
	CALL	PV2
	JR	PV51
 
PV5	PUSH	BC
	CALL	IRMON
	CALL	PV3
PV51	CALL	IRMOF
	POP	BC
	RET
 
PV4	PUSH	AF
	IN	A,88H
	SET	2,A
	OUT	88H	;IRM ein
	POP	AF
	CALL	PV3
SCROFF	PUSH	AF
	IN	A,88H
	RES	2,A
	OUT	88H	;IRM aus
	POP	AF
	RET
 
PV1	DI
	PUSH	HL
	POP	HL
	POP	HL
	INC	HL	;nr }bergeben
	PUSH	HL
	DEC	HL	;(HL)=nr
	DEC	SP
	DEC	SP
	EI
	PUSH	AF
	PUSH	DE
	LD	E,M
PV22	LD	D,0
	LD	HL,(SUTAB)
	ADD	HL,DE
	ADD	HL,DE	;HL=Poa. in Tab.
	LD	E,M
	INC	HL
	LD	D,M
	EX	DE,HL
	POP	DE
	POP	AF
EXRT	EX	(SP),HL
	RET		;UP anspringen
 
PV2	AND	A	;VR: F
PV21	PUSH	HL
	PUSH	DE
	PUSH	BC
	PUSH	HL
	LD	HL,POPS3;Returnadresse
	EX	(SP),HL	;kellern
	PUSH	HL
	PUSH	AF
	PUSH	DE
	JR	C,PV22	;falls PV3
	LD	A,(ARGC);sonst E
	LD	E,A	;beschaffen
	JR	PV22
 
PV3	SCF		;VR: F
	JR	PV21
 
IRMON	POP	BC	;R}ckkehradr.
	PUSH	IY
	LD	IY,0	;SP in IY merken
	ADD	IY,SP	;(kein UP ver-
	DI		;{ndert IY!)
	LD	(IX+11),A
	IN	A,88H
	SET	2,A	;IRM ein
	SET	5,A	;LED ein
	OUT	88H
	LD	SP,(SYSP)
	EI
	LD	A,(IX+11)
	PUSH	BC
	RET		;wie JP (BC)
 
IRMOF	POP	BC	;analog IRMON
	LD	(IX+11),A
	IN	A,88H
	RES	2,A
	RES	5,A
	DI
	OUT	88H
	LD	SP,IY
	EI
	LD	A,(IX+11)
	POP	IY
	PUSH	BC
	RET
 
RCALL	;Relativer UP-Aufruf
	EX	(SP),HL	;VR: DE
	LD	E,M
	INC	HL
	LD	D,M
	INC	HL	;DE=offset
	EX	DE,HL
	ADD	HL,DE	;zur Absolut-
	EX	DE,HL	;adr. addieren
	EX	(SP),HL
	PUSH	DE
	RET		;wie JP (DE)
 
POPS3	POP	BC	;f}r PV2..6
	POP	DE
	POP	HL
	RET
 
PWRON	;Einschalt-Init
	LD	SP,1C4H
	XOR	A
	LD	B,A
	LD	C,A
PWR1	LD	(BC),A	;Speicher
	DEC	C	;l|schen
	JR	NZ,PWR1
	DJNZ	PWR1
	LD	C,80H	;Module
PWR2	OUT	(C),A	;abschalten
	DJNZ	PWR2
	CALL	SYSI	;IRM init. usw.
	XOR	A
PWR3	LD	(WINNR),A
	CALL	WCOPY	;Fenstervektor-
	INC	A	;speicher init.
	CP	0AH
	JR	C,PWR3
	CALL	ESC3
	LD	A,0CH	;Zweitbild
	CALL	CRT	;l|schen
	CALL	ESC1
	CALL	CON	;M003 suchen,
	CALL	V24INI	;einschalten,
	CALL	COFF	;Tab. kopieren
	JR	PWR4
 
BYE	;Tasten-RESET
	LD	SP,1C4H
	CALL	SYSI	;IRM init usw.
	;
PWR4	LD	A,(0A800H)
	DEC	A	;M003 vorh.?
	JR	NZ,PWR5
	CALL	CON
	CALL	V24OC	;Druckerinit
	CALL	UMINIT	;SIO B f}r
	CALL	COFF	;Interrupt
PWR5	LD	BC,880H	;ROM-Modul mit
	IN	A,(C)	;Strukturbyte
	DEC	A	;01?
	JR	NZ,MEN0	;nein
	LD	A,43H
	OUT	(C),A	;ein ab 4000H
	LD	(0B808H),A
	LD	A,(IX+4)
	AND	0FCH	;RAM 4 aus
	LD	(IX+4),A
	OUT	86H
	JP	4000H	;anspringen
 
	DEFW	7F7FH
	DEFM	'MENU'
	DEFB	1
	POP	HL	;Stack clear
MEN0	CALL	OSTR
	DEFB	0CH	;CLS,CUD
	DEFB	0AH
	DEFM	'* KC-CAOS 4.1 *'
	NOP
MENU	LD	HL,0C000H	;**46**
	LD	C,L
	LD	B,L	;BC=0
MEN1	CALL	CRLF
MEN2	CALL	OSTR
	DEFB	2
	DEFM	'%'	;CLLN,Promt
	NOP
	CALL	BRKT
	JR	C,LOOP3
	LD	A,(IX+9)
MEN3	CPIR
	JP	PO,LOOP3;ausgesucht
	CPI		;2tes mal?
	JR	NZ,MEN3
MEN4	LD	A,M
	CP	2	;Epilog?
	JR	C,MEN1
	CP	'0'	;<30h?
	JR	C,MEN2
	CP	'`'	;=60h, Kleinb.?
	JR	NC,MEN2
	CALL	OCHR
	INC	HL
	DEC	BC
	JR	MEN4
 
LOOP1	POP	HL
LOOP2	CALL	ERRM
LOOP	CALL	OSTR		;**12**
	DEFM	'%'	;Prompt
	NOP
LOOP3	CALL	INLIN
	INC	DE	;Zeichen danach
	LD	A,(DE)
	CP	' '
	JR	Z,LOOP
	AND	A
	JR	Z,LOOP
	CALL	MSUCH
	JR	NC,LOOP2;nicht gef.
	PUSH	HL
	CALL	GARG	;Argumente
	JR	C,LOOP1
	LD	HL,LOOP	;R}ckkehradr.
	EX	(SP),HL	;kellern
	LD	A,M	;A=Epilog
	INC	HL	;}bergeben
	PUSH	HL
	AND	A
	CALL	LARG
	RET	NZ	;A=1: nach (HL)
	JP	SCROFF	;A=0: IRM aus,
			;dann nach (HL)
 
MSUCH	LD	HL,0C000H
	LD	B,L
	LD	C,L	;BC=0
	LD	A,(IX+9)
ZSUCH	CPIR			;**1D**
	SCF
	CCF
	RET	PO	;nicht gef.
	CPI
	JR	NZ,ZSUCH
	PUSH	AF
	PUSH	DE
ZS1	LD	A,(DE)
	CP	'!'	;keine SPC und
	JR	C,ZS3	;Steuerzeichen
	INC	DE
	CPI
	JR	Z,ZS1
ZS2	POP	DE
	POP	AF
	JR	ZSUCH
	;
ZS3	LD	A,M
	CP	2	;Epilog?
	JR	C,ZS4	;ja
	CP	' '
	JR	C,ZS2
	INC	HL
	JR	ZS3
	;
ZS4	POP	AF
	POP	AF
	SCF
	RET		;gefunden
 
WTUP	DEC	A	;UP f}r WAIT
	RET	Z
	PUSH	AF
	POP	AF
	JR	WTUP
 
WAIT	LD	B,A		;**14**
	XOR	A
WAIT1	CALL	WTUP
	DJNZ	WAIT1
	RET
 
BNROST	LD	A,(IX+2);Blocknummer u.
AHOSTR	CALL	AHEX	;RG A und folg.
OSTR	EX	(SP),HL	;ZK	 **23**
OSTR1	LD	A,M	;ausgeben
	INC	HL
	AND	A	;bis 00-Byte
	JP	Z,EXRT
	CALL	OCHR
	JR	OSTR1
 
NORM	CALL	NIN		;**13**
NOUT	LD	HL,ZEI0	;**20**
SOUT	PUSH	HL		;**1E**
	LD	HL,(OUTAB)
	EX	(SP),HL
	LD	(OUTAB),HL
	POP	HL
	RET
 
NIN	LD	HL,ZEI4	;**21**
SIN	PUSH	HL		;**1F**
	LD	HL,(INTAB)
	EX	(SP),HL
	LD	(INTAB),HL
	POP	HL
	RET
 
INTB	PUSH	HL		;**16**
	LD	HL,(INTAB)
	JR	INTA1
OCHR	PUSH	HL		;**24**
	LD	HL,(OUTAB)
INTA1	PUSH	DE	;s.a. PV1
	PUSH	BC	;(sehr {hnlich)
	LD	E,M
	LD	D,0
	LD	HL,(SUTAB)
	PUSH	AF
	ADD	HL,DE
	ADD	HL,DE
	POP	AF
	LD	E,M
	INC	HL
	LD	D,M
	EX	DE,HL
	CALL	JPHL
POP3	POP	BC
	POP	DE
	POP	HL
	RET
 
KBD	PUSH	HL		;**04**
	PUSH	DE
	PUSH	BC
KBD1	BIT	6,(IX+8);F-Taste aktiv?
	JR	NZ,KBD12;ja
KBD2	LD	DE,(CURSO)
	CALL	DABR
	XOR	A	;Dummy
	CP	M	;hinter Cursor?
	JR	Z,KBD5	;ja-Strich
	LD	E,A	;nein-Klotz,E=0
KBD3	CALL	CUCP
	INC	E	;Klotz e/a-Merk
	LD	B,0FH	;F00h mal
KBD4	CALL	KBDZ	;abfragen
	JR	C,KBD7
	DEC	BC
	LD	A,B
	OR	C
	JR	NZ,KBD4
	JR	KBD3	;dann Cursor
			;wieder weg usw.
KBD5	CALL	PADR0
	SET	1,L	;vorletzte
	SET	2,L	;Cursorzeile
	LD	A,M
	LD	B,A	;merken
	XOR	7FH
	LD	M,A
KBD6	CALL	KBDZ	;abfragen
	JR	NC,KBD6
	LD	M,B	;r}cksetzen
	JR	KBD8
 
KBD7	BIT	0,E	;Klotz ein?
	CALL	NZ,CUCP	;ja-wgnehmen
KBD8	LD	D,A
	BIT	5,(IX+8);Click ein?
	LD	BC,307H
	CALL	NZ,CLIK
	LD	A,D
	LD	HL,STBT
	BIT	4,M	;ESC aktiv?
	JR	Z,KBD9
	LD	DE,(CURSO)
	CALL	CRT1
	LD	(CURSO),DE
	JR	KBD2
 
KBD9	CP	1BH	;ESC?
	JR	NZ,KBD10
	SET	4,M	;ja
	JR	KBD2
 
KBD10	CP	0F1H	;F-Taste?
	JR	C,POP3
	SET	6,(IX+8);ja-merken
	AND	0FH
	LD	B,A
	LD	HL,0B900H
KBD11	LD	A,M	;Pos. in F-
	AND	A	;puffer best.
	INC	HL
	JR	NZ,KBD11
	DJNZ	KBD11
	JR	KBD13
 
KBD12	CALL	BRKT	;Abbruch?
	JR	C,KBD15
	LD	HL,(FTAST);Zeiger auf
KBD13	LD	A,M	;n{chstes CHR
	CP	1BH	;ESC?
	JR	NZ,KBD14
	INC	HL
	LD	(FTAST),HL
	LD	HL,STBT
	SET	4,M	;ESC merken
	JP	KBD1
 
KBD14	INC	HL
	LD	(FTAST),HL;Zeiger rett.
	AND	A	;Null-Ende?
	JR	NZ,KBD16
KBD15	RES	6,(IX+8);ja-inaktiv
	JP	KBD2
 
KBD16	LD	HL,STBT
	B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ALL	OSTR		;**2C**
	DEFW	0A0DH
	NOP
	RET
 
HOME	LD	A,10H		;**2D**
	JR	SPAC0
 
AHEX	PUSH	AF		;**1C**
	RRA		;Tetradentausch
	RRA
	RRA
	RRA
	CALL	AHEX0	;erst rufen,
	POP	AF	;dann hinein-
			;laufen
AHEX0	AND	0FH	;Maske
	ADD	90H	;}bliche
	DAA		;Routine
	ADC	40H	;f}r die
	DAA		;Hexausgabe
	JR	SPAC0
 
HLDE	CALL	HLDE1		;**1B**
HLDE1	CALL	HLHX
	EX	DE,HL
	RET
 
RHEX0	INC	DE
RHEX	LD	A,(DE)		;**18**
	CP	' '	;Trennzeichen
	JR	Z,RHEX0	;}bergehen
	XOR	A
	LD	HL,NUMVX+1
	LD	M,A
	DEC	HL	;HL=NUMVX
	LD	M,A
	DEC	HL	;HL=NUMNX
	LD	M,A	;alles nullsetz.
RH1	LD	A,(DE)
	OR	A	;Ende-Dummy?
	RET	Z
	CP	' '	;Ende-Space?
	RET	Z
	SUB	'0'
	RET	C
	CP	0AH
	JR	C,RH2
	SUB	7
	AND	0DFH	;klein>gro~
	CP	0AH
	RET	C
	CP	10H
	CCF
	RET	C
RH2	INC	DE
	INC	M	;NUMNX erh|hen
	INC	HL
	RLD		;Tetrade
	INC	HL	;durchschieben
	RLD
	DEC	HL
	DEC	HL	;RLD setzt auch
	JR	Z,RH1	;Z-Flag!
	DEC	DE	;Fehler: Zahl
	SCF		;zu gro~
	RET
 
GARG	CALL	CON		;**22**
	CALL	GARGC
	JP	COFF
 
SYSI	LD	DE,HCADR
	LD	HL,KCTAB
	LD	BC,34H
	LDIR		;1. St}ck
	LD	C,0CH
	LD	E,L3TAB
	LDIR		;2. St}ck
	LD	HL,103H	;RAM0,IRM,
	LD	(0B800H),HL
	LD	HL,301H	;ROMC,RAM8,
	LD	(0B802H),HL
	LD	A,3	;RAM4
	LD	(0B804H),A
	LD	A,1
	;
SIXD	LD	HL,ISRTAB	;**31**
	LD	(MIXIT),A
	LD	E,0E2H
	LD	D,A
	LD	BC,0EH	;Interrupttab.
	LDIR		;kopieren
	PUSH	DE
	POP	IX
	LD	(IX+8),88H
	LD	(IX+1),28H;Grundstellung
	LD	(IX+4),63H;der Merker
	LD	(IX+14),KTAB
	LD	(IX+0FH),0FCH	;H(KTAB)
	LD	(IX+9),7FH
	PUSH	AF
	PUSH	DE
	PUSH	HL
	DI
	IM	2
	LD	A,(MIXIT)
	LD	I,A
	LD	D,9
	LD	HL,IOTAB
	CALL	INIME	;Kan{le init.
	POP	HL
	POP	DE
	POP	AF
	;
KPUFF	LD	(IX+5),0
	LD	(IX+6),0B7H
	RET
 
INIEA	PUSH	BC		;**43**
	LD	C,M	;1. Byte=Adr.
	INC	HL
	LD	B,M	;2. Byte=Anz.
	INC	HL
	OTIR
	POP	BC
	RET
 
INIME	DI
INIME1	CALL	INIEA
	DEC	D	;D Kan{le
	JR	NZ,INIME1
	EI
	RET
 
IOTAB	DEFB	8AH
	 DEFB	1
	  DEFB	0E4H	;Int-Vektor
	DEFB	88H
	 DEFB	1
	  DEFB	0FH	;Datenbyte
	DEFB	8AH
	 DEFB	2
	  DEFB	0FH	;Byte-Out
	  DEFB	3	;DI
	DEFB	8BH
	 DEFB	3
	  DEFB	0E6H	;Int-Vektor
	  DEFB	0FH	;Byte-Out
	  DEFB	83H	;EI
	DEFB	89H
	 DEFB	1
	  DEFB	0FFH	;Datenbyte
	DEFB	8CH
	 DEFB	1
	  DEFB	0E8H	;Int-Vektor CTC
	DEFB	8EH
	 DEFB	2
	  DEFB	47H	;DI,Z{hler,Reset
	  DEFB	0CH	;Zeitkonst.
	DEFB	84H
	 DEFB	1
	  DEFB	28H	;Ausgabebyte
	DEFB	86H
	 DEFB	1
	  DEFB	63H	;Ausgabebyte
;
	DEFW	7F7FH
	DEFM	'SAVE'
	DEFB	1
	CP	2	;mind. 2 Arg.
	JP	C,ERRM
	CALL	OSTR
	DEFM	'NAME :'
	NOP
	CALL	INLIN
	LD	HL,6
	ADD	HL,DE	;Beginn Name
	;
SAVE	LD	DE,0B700H	;**36**
	LD	BC,11	;Name nach
	LDIR		;Puffer
	XOR	A
	LD	(DE),A
	LD	HL,ARGN	;alle Arg.
	LD	E,10H	;mit ARGN
	LD	C,15H
	LDIR		;nach Puffer
	CALL	ISRO
	LD	HL,(ARG1)
SAV1	LD	(IX+5),L
	LD	(IX+6),H
	CALL	OSTR
	DEFB	2	;CLLN
	NOP
	CALL	BNROST	;Blocknummer
	NOP
	LD	BC,0A0H
	CALL	BRKT
	JP	C,CSROI
	LD	DE,80H
	ADD	HL,DE
	LD	DE,(ARG2)
	SBC	HL,DE	;Ende erreicht?
	JP	NC,CSRO
	CALL	MBO
	JR	SAV1
 
LARG	LD	BC,(ARG3)	;**15**
	LD	DE,(ARG2)
	LD	HL,(ARG1)
	LD	A,(ARGN)
	RET
 
LUP	;LOAD-Unterprogramm
	;PA: CY=1 BRK gedr}ckt
	INC	(IX+3)	;erwarteter Blk
LUP1	CALL	MBI
	JR	NC,LUP3
	CALL	OSTR
	DEFW	909H
	DEFB	9
	DEFM	' '
	NOP
	CALL	BNROST
	DEFM	' ?'	;fehlerhaft
	DEFB	1EH
	NOP
	CALL	KBD
	CP	3	;BRK?
	SCF
	RET	Z
	CP	0AH	;CUD?
	JR	NZ,LUP1
LUP3	LD	A,(IX+2)
	LD	B,(IX+3)
	DEC	B	;Block 01 erw.?
	JR	Z,LUP6
	INC	B	;richtige
	CP	B	;Blocknummer?
	JR	Z,LUP5
	INC	A	;Block FF?
	JR	Z,LUP5
LUP4	CALL	BNROST
	DEFM	'*'	;falsche Nr.
	DEFB	19H
	NOP
	JR	LUP1
 
LUP5	CALL	BNROST
	DEFM	'> '	;korrekter Blk.
	DEFB	19H
	NOP
	RET
 
LUP6	DEC	A	;Block 01?
	JR	NZ,LUP4
	CALL	CRLF	;keine Nr,
	LD	HL,0B700H
	LD	B,11	;sondern Name
LUP7	LD	A,M	;ausgeben
	INC	HL
	CALL	CRT
	DJNZ	LUP7
	JP	SPACE
 
NOMC	CALL	OSTR	;wenn kein MC
	DEFM	'???'
	NOP
CLJP	JP	CSROI
;
	DEFW	7F7FH
	DEFM	'VERIFY'
	DEFB	1
VERIF	RES	0,(IX+7)	;**11**
	JR	LOAD0
;
	DEFW	7F7FH
	DEFM	'LOAD'
	DEFB	1
LOAD	SET	0,(IX+7)	;**10**
LOAD0	CALL	ISRI1
	LD	(IX+3),0
	CALL	LUP
LOAD1	JR	C,CLJP	;bei BRK
	BIT	0,(IX+7)
	JR	Z,LOAD4
	LD	L,10H
	LD	A,(IX+7)
	AND	0E3H
	LD	(IX+7),A
	LD	A,M	;Anzahl Arg.
	SLA	A
	SLA	A	;2* schieben
	AND	1CH	;Maske
	OR	(IX+7)
	LD	(IX+7),A
	LD	A,M	;Anzahl Arg.
	SUB	2
	CP	9	;MC?
	JR	NC,NOMC
	LD	BC,(0B715H)
	LD	DE,(0B713H)
	LD	HL,(0B711H)
	LD	A,(ARGN)
	AND	A	;Ladeoffset?
	JR	Z,LOAD3
	PUSH	BC
	LD	BC,(ARG1)
	ADD	HL,BC	;Aadr,Eadr
	EX	DE,HL	;umrechnen
	ADD	HL,BC
	EX	DE,HL
	BIT	4,(IX+7);4..7 Args?
	JR	NZ,LOAD2;nein
	EX	(SP),HL
	ADD	HL,BC	;Sadr umrechnen
	EX	(SP),HL
LOAD2	POP	BC	;Sadr merken
LOAD3	LD	(ARG2),BC
	CALL	HLDE	;Aadr,Eadr ausg.
LOAD4	CALL	CRLF
	EX	DE,HL
	;Load-Hauptschleife
LOAD5	CALL	LUP
	JR	C,LOAD1	;BRK
	BIT	0,(IX+7)
	JR	Z,LOAD7	;wenn VERIFY
	PUSH	HL
	SBC	HL,DE
	LD	BC,80H
	SBC	HL,BC
	ADD	HL,BC
	JR	NC,LOAD6
	LD	C,L
LOAD6	LD	HL,0B700H ;MC in Spei-
	LDIR		;cher kopieren
	POP	HL
LOAD7	INC	(IX+2)	;Blocknr. FF?
	JR	NZ,LOAD5
	;
CSRI	CALL	CSROI
	LD	A,(IX+7);kein Autostart
	AND	3	;wenn VERIFY,
	DEC	A	;Bit 1(IX+7)=1
	RET	NZ
	LD	A,(IX+7)
	AND	1CH	;und bei nur 2
	CP	0CH	;Ladeargumenten
	LD	(IX+7),0
	RET	C
	LD	HL,(ARG2)
	JP	(HL)	;Ansprung
;
	DEFW	7F7FH
	DEFM	'COLOR'
	DEFB	1
COLR	CALL	CON		;**0F**
	CALL	COLRC
	JP	COFF
 
CSTBT	PUSH	HL		;**42**
	LD	HL,STBT
	SET	3,M
	CALL	OCHR	;Steuerzeichen
	RES	3,M	;darstellen
	POP	HL
	RET
;
	DEFW	7F7FH
	DEFM	'DISPLAY'
	DEFB	1
DISP	CALL	CON		;**3B**
	CALL	DISPC
JPOFF	JP	COFF
;
LDAME	CALL	COFF	;f}r DISPC
	LD	A,M	;und MODIC
JCON	JP	CON
;
	DEFW	7F7FH
	DEFM	'MODIFY'
	DEFB	1
MODI	CALL	CON		;**2E**
	CALL	MODIC
	JR	JPOFF
 
LDMAE	CALL	COFF	;f}r MODIC
	LD	M,A
	JR	JCON
;
	DEFW	7F7FH
	DEFM	'WINDOW'
	DEFB	1
	AND	A	;kein Arg?
	JR	Z,WINAK	;Aufruf No. 0
	DEC	A	;1 Arg?
	JR	Z,WINAKI	;AufrufL
	LD	H,L
	LD	L,C
	LD	D,E
	LD	A,(ARG49)
	LD	E,A
	LD	A,(ARGN)
	CP	4
	JR	NZ,WIN1
	JR	C,WIN3
	XOR	A
	JR	WIN2
 
WIN1	LD	A,(ARG49+2);Init No. A
WIN2	CALL	WININ
WIN3	JP	C,ERRM
	RET
 
WININ	CALL	CON		;**3C**
	CALL	WININC
	JP	COFF
 
WINAKI	LD	A,L
WINAK	CALL	WCOPY		;**3D**
	LD	(WINNR),A
	CALL	PART	;Fenster A
	RET	C	;holen
	EX	DE,HL
	LD	DE,WINON
	JR	WCOP1
 
PART	;Testet A und berechnet Pos.
	;in Fenstervektorspeicher =DE
	ADD	0F6H
	RET	C
	ADD	A
	LD	E,A
	ADD	A
	ADD	A
	ADD	E
	LD	E,A
	LD	D,0B9H
	AND	A
	RET
 
WCOPY	;Fenster (WINNR) retten
	PUSH	AF
	LD	A,(WINNR)
	CALL	PART
	JP	C,IAD2
	POP	AF
	LD	HL,WINON
WCOP1	LD	BC,10
	LDIR
	RET
 
NCHAR	INC	HL
KEYUP	LD	A,M	;f}r KEY
	AND	A
	RET	Z
	CALL	CSTBT
	JR	NCHAR
;
	DEFW	7F7FH
	DEFM	'KEY'
	DEFB	1
	CP	1
	RET	NZ
	LD	A,L
KEY	AND	A	;**3A**
	RET	Z
	CP	0DH	;nur F-Tasten
	RET	NC	;1..C
	LD	B,A
	LD	HL,0B900H
KEY1	LD	A,M	;B Dummys
	INC	HL	;ausz{hlen
	AND	A
	JR	NZ,KEY1
	DJNZ	KEY1
	CALL	KEYUP	;Belegung
			;pr{sentieren
KEY2	PUSH	AF
	DEC	HL
KEY3	POP	AF
KEY4	CALL	INTB
	CP	13H	;STOP-Ende
	JP	Z,CRLF
	PUSH	AF
	LD	B,0
	DEC	A	;CLR?
	JR	NZ,KEY5
	LD	A,M	;leere Belegung
	AND	A	;nicht l|schen
	JR	Z,KEY3
	LD	D,H	;DE=Ziel
	LD	E,L
	PUSH	HL
	INC	HL	;HL=Quelle
	LD	A,9CH
	SUB	L	;L{nge, B=0
	LD	C,A	;Pufferrest
	LDIR		;vorziehen
	POP	HL
	POP	AF
	CALL	OCHR
	JR	KEY2
 
KEY5	LD	A,(0B99AH);vorletztes
	AND	A	;Zeichen<>0?
	JR	NZ,KEY3;ja-voll!
	PUSH	HL
	LD	A,9BH
	SUB	L
	LD	C,A	;L{nge, B=0
	LD	HL,0B99AH
	LD	DE,0B99BH;Pufferrest
	LDDR		;hinterziehen
	POP	HL
	POP	AF
	INC	HL	;Zeichen
	LD	M,A	;eintragen
	CALL	CSTBT	;& anzeigen
	JR	KEY4
;
	DEFW	7F7FH
	DEFM	'KEYLIST'
	DEFB	1
K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	2
	DI
	OUT	84H	;Farbebene
	LD	A,B
	OR	M	;setzen
	BIT	4,D	;Farbe t}rkis?
	JR	NZ,HIR2
	XOR	B	;l|schen
HIR2	LD	M,A
	LD	A,C
	OUT	84H
	EI
	JR	POP4
 
LINE	CALL	CON		;**3E**
	CALL	LINEC
	JR	COF
 
MBOUT	CALL	CON		;**38**
	CALL	MBOC
	JR	COF
 
MBIN	CALL	CON		;**37**
	CALL	MBIC
	JR	COF
 
JIOERR	CALL	COFF	;Sprung zu
	LD	HL,(IOERR);?IO ERROR
	CALL	IRMOF
	JP	(HL)
;
	DEFW	7F7FH
	DEFM	'MODUL'
	DEFB	1
ESC5	CALL	CON
	CALL	MODULC
COF	JP	COFF
;
	DEFW	7F7FH
	DEFM	'SYSTEM'
	DEFB	1
ESC6	CALL	CON
	CALL	SYSTC
	JR	COF
 
BASPV	;BASIC-I/O-Verteiler
	PUSH	HL
	PUSH	BC
	CALL	IRMON
	BIT	5,E
	PUSH	DE
	JR	NZ,BASBYE
	INC	HL
	INC	HL
	BIT	7,E
	JR	NZ,BSA2
	PUSH	HL
	LD	A,E
	AND	7
	LD	HL,BUPTAB
	ADD	L
	LD	L,A
	LD	A,D
	LD	D,E
	LD	E,M
	POP	HL
	CALL	PV3
	POP	DE
	LD	D,A
	LD	A,E
	AND	4FH
	XOR	43H
	JR	NZ,BSA1
	CALL	OSTR
	DEFM	'VERIFY ?(Y):'
	NOP
	CALL	KBD
	CP	'Y'
	CALL	Z,VERIF
BSA1	LD	A,D
	RES	3,E
	CALL	IRMOF
	POP	BC
	POP	HL
	RET
 
BUPTAB	DEFW	2416H
	DEFW	3837H
	DEFW	0206H
	DEFW	0307H
 
BSA2	CALL	KBDS
	POP	DE
	LD	D,A
	JR	NC,BSA1
	RES	7,E
	JR	BSA1
 
BASBYE	LD	A,(35EH)
	AND	A
	JR	Z,BASB1
	CALL	IRMOF
	CALL	0C641H	;NEW
	CALL	IRMON
BASB1	IN	A,88H
	AND	5FH	;BASIC-ROM aus
	OUT	88H
	JP	LOOP
 
ZKOUT	LD	A,M		;**45**
	INC	HL
	AND	A
	RET	Z
	CALL	OCHR
	JR	ZKOUT
 
TON	CALL	LARG		;**35**
TON1	BIT	1,(IX+8);noch alter Ton?
	JR	NZ,TON1
TON2	PUSH	BC
	LD	C,8CH	;CTC0
	CALL	TON4	;starten
	INC	C	;CTC1
	EX	DE,HL
	CALL	TON4	;starten
	POP	BC
	LD	A,C	;Lautst{rke
	XOR	1FH	;da nullaktiv
	OR	81H	;maskieren
	LD	C,A
	LD	A,B
	AND	A	;Dauerton?
	JR	Z,TON3
	RES	7,C	;nein, Blink aus
	SET	1,(IX+8);neuer Ton
	LD	A,0C7H	;EI,Z{hler 50 Hz
	OUT	8EH	;CTC2
	LD	A,B	;Dauer
	OUT	8EH
TON3	LD	B,60H
	IN	A,89H
	AND	B	;RAM8 maskieren
	OR	C
	OUT	89H	;Lst. ausgeben
	RET
 
TON4	;CTC (C) programmieren mit HL
	LD	A,L
	AND	A	;Ton?
	LD	L,3
	JR	Z,TON6	;nein
	LD	L,A
	LD	A,7	;Zeitgeber
	BIT	0,H	;Vorteiler?
	JR	Z,TON5	;nein
	OR	20H
TON5	OUT	(C),A
TON6	OUT	(C),L
	RET
 
ESC1	LD	HL,0B200H
	LD	(VRAM),HL
	LD	A,(IX+1)
	AND	0F8H
OUT84	OUT	84H
	LD	(IX+1),A
	RET
 
ESC2	LD	HL,0AD00H
	LD	(VRAM),HL
	LD	A,(IX+1)
	OR	5
	JR	OUT84
 
ESC3	LD	HL,0AD00H
	LD	(VRAM),HL
	LD	A,(IX+1)
	AND	0FEH
	OR	4
	JR	OUT84
 
ESC4	LD	HL,0B200H
	LD	(VRAM),HL
	LD	A,(IX+1)
	OR	1
	AND	0F9H
	JR	OUT84
 
ESC7	LD	HL,STBT
	LD	A,M
	XOR	4
	LD	M,A
	RET
 
ESC9	LD	A,(IX+1)
	XOR	2
	JR	OUT84
 
ESCA	IN	A,89H
	XOR	80H	;Blinkbit
	OUT	89H
	LD	A,(IX+1)
	XOR	8
	JR	OUT84
;
	DEFW	7F7FH
	DEFM	'V24OUT'
	DEFB	1
V24OUT	CALL	CON		;**47**
	CALL	V24OC
	LD	A,0DH
	CALL	PRINT
	LD	A,0AH
	CALL	PRINT
COF1	JP	COFF
 
HCPGM	;Reaktion auf ShCLR
	CALL	CON
	CALL	HCPGMC
	JR	COF1
;
	DEFW	7F7FH
	DEFM	'V24DUP'
	DEFB	1
V24DUP	CALL	CON		;**48**
	CALL	V24DC
	JR	COF1
 
INIDUP	CALL	CON
	CALL	UMINIT
	JR	COF1
 
ECHO	CALL	CRT
PRINT	PUSH	AF
	LD	A,(HCPZ)
	BIT	7,A
	JR	Z,PRINT3;Drucker
	AND	0F0H	;Schreibmasch.
	CP	90H
	JR	Z,S3004
	CP	0A0H
	JR	NZ,PRINT3
	POP	AF	;S6005
	PUSH	HL
	PUSH	BC
	LD	HL,ZIBM
	LD	BC,7
	CPIR
	JR	NZ,PRINT2
	LD	C,6
	ADD	HL,BC
	LD	A,M
	JR	PRINT2
 
S3004	POP	AF
	CP	7EH
	JR	NZ,PRINT4
	LD	A,83H	;~
	JR	PRINT4
 
PRINT2	POP	BC
	POP	HL
	PUSH	AF
PRINT3	POP	AF
PRINT4	CP	9	;CUR
	JR	Z,PRINT5
	PUSH	AF
	LD	A,(STBT)
	BIT	3,A
	JR	Z,OFILT1
	POP	AF
	CP	7FH	;und 7Fh
	JR	NZ,PRINT6
PRINT5	LD	A,20H	;nach SPC
PRINT6	CP	20H	;und Steuerzei-
	JR	NC,OFILT;chen nach '_'
	LD	A,'_'	;wandeln
OFILT	;Ausgabe ohne Filter
	PUSH	AF
OFILT1	PUSH	BC
	CALL	LCSO
	LD	A,0AH
	ADD	C
	LD	C,A
	IN	A,(C)
	BIT	2,A	;bereit?
	JR	NZ,OFILT2
	LD	A,1
	CALL	WAIT	;nein-warten
	POP	BC
	JR	OFILT1
OFILT2	POP	BC
	POP	AF
	PUSH	BC
	PU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