; ZEILENASSEMBLER FUER LARA
; NOCH NICHT FERTIGGESTELLT
;
ASS:; LINEASSEMBLER
CALL	GET16
JP	Z,WRONG
LD	(ASSADR),HL
ASSLOO:CALL	LINEF
CALL	ZWBYTO	; ADRESSE AUSGEBEN
CALL	BLNOUT	; " "
LD	(IX+4),15	; MAXIMAL ANGENOMMENE ZEICHEN
CALL	GETTXT
JP	NC,EDVECT	; ESC
LD	A,C
OR	A
JP	Z,EDVECT

LD	HL,TXTBUF
LD	A,(HL)
CP	"L"
JP	NZ,NOTLD
INC	HL
LD	A,(HL)
CP	"D"
INC	HL
JP	NZ,NOTLD
LD	A,(HL)
CP	"I"	; LDI...
JR	Z,NOTLOG
CP	"D"
JR	Z,NOTLOG
CALL	GETBLN
LD	E,%01000000	; CODE FUER LD r,r'
CALL	GETREG
R8:
RLA
RLA
RLA
OR	E
LD	E,A
CALL	GETKOM
R18:CALL	GETREG
OR	E
JP	TOMEM	; IN SPEICHER SCHREIBEN

NOTLD:
LD	HL,LOGTAB
LD	B,8
CLOG:
LD	DE,TXTBUF
CALL	COMPARE
JR	Z,LOGFOU
DJNZ	CLOG
JR	NOTLOG
LOGFOU:LD	A,8
SUB	B
RLA
RLA
RLA
EX	DE,HL
OR	%10000000
LD	E,A
JR	R18

NOTLOG:
LD	A,7
CALL	#BB5A
LD	HL,BEFTAB
CL1:
LD	A,(HL)
CP	#FF
JR	Z,NOTF1
LD	B,A
INC	HL
LD	DE,TXTBUF
CALL	COMPAR
JR	NZ,CL1
LD	A,B
CP	#76
JR	Z,TOMEM	; HALT
CP	#40
JR	C,TOMEM
CP	#C0
JR	NC,TOMEM
PUSH	AF
LD	A,#ED
CALL	BYTOME	; IN SPEICHER
POP	AF
JR	TOMEM
NOTF1:
LD	A,7
CALL	#BB5A
JP	WRONG
BLNKOM:PUSH	HL	; SUCHT " " ODER ","
LD	C,0
DEC	HL
BKL:INC	HL
INC	C
LD	A,(HL)
CP	" "
JR	Z,KF
CP	","
JR	NZ,BKL
KF:POP	HL
RET
JP	EDIT
GETREG:
PUSH	DE
LD	A,(HL)
PUSH	HL
LD	HL,REGTAB
LD	BC,HLREG-REGTAB
LD	D,C
CPIR
JR	Z,RF	; GEFUNDEN
POP	HL
LD	A,(HL)
CP	"("
LD	C,3	; "(" SCHON GESCHEHEN
CALL	COMPAR
JP	NZ,WRONG
POP	HL
INC	HL	; (HL),(HL) MOEGLICH !
INC	HL
INC	HL
PUSH	HL
LD	A,%110
JR	RF+3
RF:LD	A,D
SUB	C
DEC	A
POP	HL
INC	HL
POP	DE
RET

COMPAR:
PUSH	BC
LD	C,-1
COMLOO:LD	A,(DE)
LD	B,(HL)	; WERT AUS TABELLE
RES	7,B
CP	B
JR	Z,$+3
INC	C	; MISSERFOLG
INC	DE
INC	HL
LD	A,(DE)
OR	A
JR	NZ,COMLOO
LD	A,-1
CP	C	; C=-1 => Z^
POP	BC
RET	; Z^

TOMEM:CALL	BYTOME
JP	ASSLOO
BYTOME:LD	HL,(ASSADR)
CALL	SCHREI
INC	HL
LD	(ASSADR),HL
RET
ASSADR:DEFS	2

GETKOM:LD	A,","
JR	GETBLN+2
GETBLN:LD	A," "
CP	(HL)
INC	HL
JP	NZ,WRONG
RET


D	A," "
�CP	(HL)
�INC	HL
�JP	NZ,WRONG
�RET
�