SH	HL	CALL	VADR„DūD	A,M	POP	HL	AND	A	RET NZ	SCF	RET;EOE	;;;*__*__*__*__*__*__*__*__*__*__*__*__*__;.;Ende;;********************************;*				*;*     Quelltext Assembler	*;*				*;********************************;;		(C) J.Schwarz, Leipzig;		erweitert, korregiert &;		dokumentiert:;		(C) F.Klemm, Gera;;*__*__*__*__*__*__*__*__*__*__*__*__*__;; Konstanten:;POINT	EQU	0C382HNAME	EQU	0C30AH;OUTPUT	EQU	0C355HPRCR	EQU	0C37DH;; Arbeitszellen:;	ORG  240HM40	DEFS 2M42	DEFS 2M44	DEFS 2M46	DEFS 2M48	DEFS 2	;Editor-AZ;OPT	DEFS 1	;Options (2OBIS+PL)	DEFS 1	;freiOFFS	DEFS 2	;OffsetOBJ	DEFS 2	;Std. ORGLBLEND	DEFS 2	;Markenanf.LBLANF	DEFS 2	;MarkenendeTXTP	DEFS 2	;Zeiger im PufferM78	DEFS 1M79	DEFS 1MPC	DEFS 2	;PCERRNO	DEFS 2	;ErrorsLEN	DEFS 2	;L{nge des ProgrammsNUMB	DEFS 2	;gelesene ZahlM82	DEFS 1M83	DEFS 1	;'('M84	DEFS 1	;Zahl gelesenOPER	DEFS 1	;Operation +,- ...M86	DEFS 1M87	DEFS 1ERR	DEFS 1	;Error-Nr.M89	DEFS 1	;'*'PUFFER	DEFS 64	;ASM-Puffer;;*__*__*__*__*__*__*__*__*__*__*__*__*__;	ORG 0C813H;; Ueberlesen von Leerzeichen;SPCTB	LD A,M	CP  ' '	JR Z,SPCT1	CP  CUR	RET NZSPCT1	INC HL	JR SPCTB;;*__*__*__*__*__*__*__*__*__*__*__*__*__;; zwei Marken vergleichen;LOOK 	LD A,M	CP  ' '	JR NC,LOOK5	INC HLLOOK1	PUSH HL	PUSH DE	PUSH BCLOOK2	INC HL	INC DE	LD A,(DE)	CALL LABEL	JR C,LOOK3	LD B,A	LD A,M	CALL LABEL	CP  B	JR NZ,LOOK4	JR LOOK2;LOOK3	LD A,M	CALL LABEL	JR NC,LOOK4	POP BC	POP HL	POP HL	OR A	RET;LOOK4	POP BC	POP DE	POP HL	DEC HLLOOK5	SCF	RET;;*__*__*__*__*__*__*__*__*__*__*__*__*__;; ist dieses Zeichen in Labels erlaubt;LABEL	CALL LETTR	RET NC	CP '0'	JR C,LABL1	CP '0'+10	CCF	RET NCLABL1	CP  '.'	RET Z	CP  '_'	RET Z	SCF	RET;;*__*__*__*__*__*__*__*__*__*__*__*__*__;; Ausgabe der assemblierten Zeile;OUTLN	LD A,(ERR)	CP ' '	JR Z,OUTL2	LD A,'*'	LD (M89),A	LD HL,(ERRNO)	LD A,L	ADD 1	DAA	LD L,A	LD A,H	ADC 0	DAA	LD H,AOUTL1	LD (ERRNO),HLOUTL2	LD HL,ERR	LD DE,80	LD A,(OPT)	AND 20H	JR Z,OUTL3	LD E,39OUTL3	LD A,M	INC HL	CP CR	JR Z,OUTL4	CALL OUTPUT	LD A,E	OR A	JR NZ,OUTL3OUTL4	CALL PRCROUTL5	LD HL,ERR	LD B,10HOUTL6	LD M,' '	INC HL	DJNZ OUTL6	LD M,CR	RET;;*__*__*__*__*__*__*__*__*__*__*__*__*__;; HEX-Zahlen in Puffer eintragen;PHLHX	LD HL,PUFFER	LD A,D	CALL PAHEX	LD A,EPAHEX	PUSH AF	RRA	RRA	RRA	RRA	CALL PTETR	POP AFPTETR	AND 0FH	ADD 90H	DAA	ADC 40H	DAA	LD M,A	INC HL	RET;;*__*__*__*__*__*__*__*__*__*__*__*__*__;; MAIN INTERPRET LOOP;INT00	CALL ASS01INT01	LD A,(OPT)	RLA	JR NC,INT04	PUSH HL	PUSH AF	RRA	RRA	CALL C,OUTLN	POP AF	BIT 5,A	PUSH AF	JR NZ,INT02	LD A,(ERR)	CP ' '	CALL NZ,OUTLNINT02	CALL OUTL5	CALL BRKT	JR NC,INT03	POP AF	POP HL	JR NZ,INTSV	POP HL	RET;INT03	POP AF	LD DE,(MPC)	CALL PHLHX	INC HL	LD (TXTP),HL	POP HL	PUSH HL	LD DE,ERR+10H	LD BC,30H	LDIR	EX DE,HL	LD M,CR	POP HLINT04	LD A,M	CP  BRK	JR NZ,INT00	CALL OUTL5	LD HL,OPT	LD A,M	RLA	JR NC,INTP1	AND 20H	JR NZ,INTSV	CALL PRS	DEFB CUD	DEFM 'Errors: '	DEFB 0	LD HL,(ERRNO)	CALL HLHX	CALL CRLF	LD HL,OPT	BIT 3,M	JR Z,INTEN	LD M,98H	CALL SHEAD	JR INT;INTSV	LD BC,0A0H	CALL CSRLXINTEN	POP HL	RET;INTP1	SET 7,M	CALL PRS	DEFM 'End Pass 1'	DEFB CR,CUD,0INT  	POP HL	PUSH HLASSEM	LD HL,0	LD (ERRNO),HL	LD (LEN),HL	LD (OFFS),HL	LD A,(OPT)	AND 82H	CP  82H	LD HL,POINT	CALL Z,NOMINT05	POP HL	PUSH HL	LD IY,(OBJ)	LD (MPC),IY	JP  INT01;;*__*__*__*__*__*__*__*__*__*__*__*__*__;; Assemblieren einer Zeile;ASMLN	;ASS01	CP '@'	JR NZ,ASS	INC HL	CALL ARG1P	LD (OFFS),DE	JP ASSEN;ASS	LD C,-1	CALL LETTR	JR NC,ASSLASS2	CALL SPCTB	;INLINE-Assembl	CP  CR		;f}r TEMO	JR Z,ASS3	CP  ';'	JR Z,ASS3	CALL LETTR	JR NC,ASS8	LD A,'1'	;Syntax-Error	LD (ERR),AASS3	JP  ASSEN;ASSL	INC C		;Marke	LD D,H	LD E,L	CALL LOOK1	EX DE,HL	CP  ':'	JR NZ,ASS4	INC HLASS4	LD A,(OPT)	RLA	JR C,ASS2	EX DE,HL	PUSH DE	CALL MARKE	POP DE	JR C,ASS5	DEC HL	LD M,1	EX DE,HL	JR ASS2;ASS5	PUSH DE	EX DE,HL	LD A,':'	DEC HL	CP  M	JR NZ,ASS7ASS6	LD A,M	CALL LETTR	DEC HLASS7	LD (DE),A	DEC DE	CP  ' '	JR NC,ASS6	LD HL,(MPC)	EX DE,HL	LD M,D	DEC HL	LD M,E	LD (LBLANF),HL	POP HL	JR ASS2		;Marke eingetrag;;*__*__*__*__*__*__*__*__*__*__*__*__*__;; Befehl suchen;ASS8	LD DE,0ASS9	SUB 40H	LD B,A	ADD E	LD E,A	LD A,D	ADD D	ADD B	LD D,A	INC HL	LD A,M	CALL LETTR	JR NC,ASS9	PUSH HL	CP  ' '	JR Z,ASS10	CP  CUR	JR Z,ASS10	CP  ';'	JR Z,ASS10	CP  CR	JR Z,ASS10	AND A	JP NZ,ASS19ASS10	OR A	LD HL,4B2BH	SBC HL,DE	JR Z,ASS16	;EQU	OR A	LD HL,5322H	SBC HL,DE	JR NZ,ASS11	POP HL		;DEFS	CALL ARG1P	ADD IY,DE	JP ASSEN;ASS11	OR A	LD HL,2419H	;BER	SBC HL,DE	JR NZ,ASS13	POP HL	CALL ARG1PASS12	LD A,D	OR E	JP Z,ASSEN	XOR A	CALL A_OUT	DEC DE	JR ASS12;ASS13	LD A,DASS14	LD BC,1DH	LD HL,TAB_8	CPIR	JR NZ,ASS18	LD A,3	CP  C	JR C,ASS17	LD A,DASS15	ADD E	CP  73H	JR C,ASS15	JR ASS14;ASS16	LD A,C		;EQU	OR A	LD A,'7'	JR NZ,ASS20	POP HL	CALL ARG1P	LD A,(OPT)	RLA	JR C,ASSEN	PUSH HL	LD HL,(LBLANF)	LD M,E	INC HL	LD M,D	POP HL	JR ASSEN;;*__*__*__*__*__*__*__*__*__*__*__*__*__;ASS17	LD BC,1CH	ADD HL,BC	LD D,E	LD E,MASS18	LD A,D	LD D,0	LD HL,TAB_5	ADD HL,DE	LD B,M	LD HL,TAB_6	ADD HL,DE	LD C,M	AND 7	LD D,A	LD A,C	RRCA	RRCA	RRCA	RRCA	AND 7	SUB D	JR Z,ASS21ASS19	LD A,'4'ASS20	LD (ERR),AASS21	POP HL	JR NZ,ASSEN	PUSH BC	XOR A	LD (M78),A	LD A,C	CP  4EH	JR Z,ASS22	PUSH HL	CALL TFLAG	CALL C,EDU40	DEC HL	LD A,M	INC HL	CP  2CH	CALL Z,EDU40	LD A,(M78)	OR A	CALL NZ,A_OUT	POP HLASS22	POP AF	PUSH AF	LD A,0EDH	CALL M,A_OUT	LD A,0FH	POP BC	CALL ASS25ASSEN	LD (MPC),IY	;Ende }berlesen	LD A,CR	PUSH BC	LD BC,100H	CPIR	LD A,M	CP  CUD	JR NZ,ASS24	INC HLASS24	POP BC	RET;ASS25	PUSH HL	PUSH BC	AND C	LD HL,ASS27	LD DE,TAB_3	INC A	LD B,0ASS26	PUSH AF	LD A,(DE)	INC DE	LD C,A	ADD HL,BC	POP AF	DEC A	JR NZ,ASS26	POP BC	EX (SP),HL	RET;;*__*__*__*__*__*__*__*__*__*__*__*__*__;ASS27	LD A,0CBH	CALL A_OUT	LD A,(M82)	OR A	JR Z,ASS28	LD A,(NUMB)	CALL A_OUTASS28	CALL EDU40	LD A,E	RLCA	RLCA	RLCA	ADD B	PUSH AFASS29	CALL EDU40	JR NZ,ASS30	LD A,E	DEC AASS30	POP BC	JP  ABOUT;ASS31	PUSH HL	XOR A	LD (M78),A	CALL EDU40	JR Z,EDU1	LD C,A	CALL EDU40	JR Z,EDU2	LD E,A	ADD C	CP 0FH	JP NC,EDU31	POP HL	LD A,E	ADD 40H	LD B,A	LD A,C	CALL ASBOT	LD A,(M78)	OR A	RET Z	LD A,(M79)	JR EDU3;EDU1	POP DE	LD A,(M86)	INC A	JR Z,EDU4	INC A	JR EDU3;EDU4	LD BC,(NUMB)	CALL EDU40	LD (NUMB),BC	CP 7	JR NZ,EDU5	LD A,32HEDU30	CALL A_OUT	JR EDU6;EDU5	CP 20H	LD B,22H	JR Z,EDU7	PUSH AF	LD A,0EDH	CALL A_OUT	POP AF	ADD 43H	LD B,AEDU7	LD A,B	CALL A_OUT	JR EDU6;EDU2	POP HL	CP  28H	JR NZ,EDU8	LD (M78),A	LD A,(M86)	CP  -1	JR Z,EDU8	ADD 0AHEDU3	CALL A_OUT	RET;EDU8	CALL ARITH	LD A,(M86)	CP  7	JR NZ,EDU9	LD A,(M78)	CP  28H	JR NZ,EDU9	LD A,3AH	CALL A_OUT	CALL ARITHEDU6	JP  BCOUT;EDU9	CP  6	JR Z,EDU0A	LD A,(M87)	CP  12H	LD A,(M86)	JR NC,EDU0BEDU0A	LD B,6	CALL ASBOT	CALL EDU34	CALL ARITH	LD A,EEDU33	JR EDU3;EDU0B	PUSH AF	CALL EDU40	CP  28H	LD C,1	JR NZ,EDU0C	LD C,4BH	POP AF	PUSH AF	CP  20H	JR NZ,EDU0D	LD C,0AH	JR EDU0C;EDU0D	LD A,0EDH	CALL A_OUTEDU0C	LD A,C	POP BC	CALL ABOUT	JR EDU6;EDU31	POP HL	CALL EDU40	CP  30H	JR NZ,EDU0E	LD A,0F9H	;LD SP,HL	JR EDU33;EDU0E	CP  7	JR NZ,EDU0F	CALL EDU40	ADD 10HEDU0F	PUSH AF	LD A,0EDH	CALL A_OUT	POP AFEDU10	JR EDU33;EDU32	PUSH BCEDU14	JP  ASS29;EDU41	CALL EDU40	JR NZ,EDU11	LD A,46H	ADD B	CALL A_OUT	LD A,E	JR EDU10;EDU11	CP  6	JR Z,EDU12	LD A,(M87)	CP  12	JR NC,EDU13EDU12	DEC HL	LD A,M	INC HL	CP  2CH	JR Z,EDU41	LD A,5	CP  B	LD A,(M86)	JR C,EDU15	CALL ASBOT	JR EDU34;EDU15	CALL ABOUTEDU34	LD A,(M82)	OR A	RET Z	LD A,(NUMB)EDU1A	JR EDU10;;*__*__*__*__*__*__*__*__*__*__*__*__*__;EDU13	EX DE,HL	LD HL,TAB_1	LD A,B	CPIR	LD B,M	EX DE,HL	DEC HL	LD A,M	INC HL	CP  2CH	LD A,(M86)	JP  NZ,ABOUT	LD A,B	CP  40H	JR C,EDU32	PUSH BC	LD A,0EDH	CALL A_OUT	JR EDU14;TAB_1	DEFB 5,0BH,4,3,80H,9	DEFB 88H,4AH,98H,42H;;*__*__*__*__*__*__*__*__*__*__*__*__*__;IM012	CALL ARITH	;IM 0 ... 2	LD A,E	LD DE,TAB_I	ADD E	LD E,A	LD A,(DE)	JR EDU17;TAB_I	DEFB 46H,56H,5EH;;*__*__*__*__*__*__*__*__*__*__*__*__*__;IN_ST	CALL EDU40	;IN A,n	LD C,A		;IN r,(C)	CALL EDU40	LD A,(M86)	CP  0FFH	;!!!	JR NZ,EDU18	LD A,0DBH	CALL A_OUT	LD A,EEDU17	CALL A_OUT	RET;EDU19	LD C,EEDU18	LD A,0EDH	CALL A_OUT	LD A,C	JP  ASBOT;OT_ST	CALL EDU40	;OUT n,A	LD A,(M86)	;OUT (C),r	CP  0FFH	PUSH AF	LD C,E	CALL EDU40	LD E,A	POP AF	JR NZ,EDU19	LD A,0D3H	CALL A_OUT	LD A,C	JR EDU1A;;*__*__*__*__*__*__*__*__*__*__*__*__*__;BITST	LD A,0CBH	CALL A_OUT	CALL EDU40	ADD B	LD B,A	LD A,(M82)	OR A	JR Z,EDU1B	LD A,E	CALL A_OUTEDU1B	JR EDU1C;;*__*__*__*__*__*__*__*__*__*__*__*__*__;EX_ST	CALL EDU40	LD B,0E3H	CP  28H	JR Z,EDU1C	;EX (SP),HL	LD B,0EBH	CP  10H	JR Z,EDU1C	;EX DE,HL	LD B,8	CP  30H	JR Z,EDU1C	;EX AF,AF'	LD A,'9'	JP  ERROR;EDU1C	JP  B_OUT;;*__*__*__*__*__*__*__*__*__*__*__*__*__;SKIP 	CALL TFLAG	JR NC,SKIP1	CALL EDU40	JR Z,SKIP2	LD A,(M87)	CP  3AH	LD B,0E9H	JR Z,EDU1CERR_A	LD A,'A'	LD (ERR),A	RET;SKIP1	CALL ASBOT	CALL ARITH	JP  BCOUT;SKIP2	LD A,B		;JP (cc),nn	LD B,0C3H	CP  0C2H	JR Z,SKIP3	LD B,0CDHSKIP3	LD A,B	JP  EDU30;RETST	CALL TFLAG	;RET (cc)	JP  NC,ASBOT	CALL EDU40	LD A,(M84)	OR A	JR NZ,ERR_A	LD A,0C9H	JP  A_OUT;SKIP4	CALL TFLAG	JR NC,JRKST	CALL EDU40	JR NZ,ERR_A	JR JR_ST;JRKST	LD B,20H	;JR kk,nn	CALL ASBOT	CALL ARITHEDU24	PUSH HL	PUSH IY	EX DE,HL	POP DE	SCF	SBC HL,DE	LD E,L	XOR A	RLC E	ADC H	JR Z,EDU25	LD A,'6'	LD (ERR),AEDU25	LD A,L	POP HL	CALL A_OUT	RET;JR_ST	LD A,B		;JR, DJNZ	CALL A_OUT	JR EDU24;;*__*__*__*__*__*__*__*__*__*__*__*__*__;DEFBW	CALL ARITH	;B=0: DEFW	LD C,A	LD A,EEDU26	CALL A_OUT	LD A,D	INC B	DEC B	CALL Z,A_OUT	LD A,C	CP ','	JR Z,DEFBW	RET;DEFM 	CALL SPCTB	CP  27H	JR Z,EDU27EDU28	LD A,'8'ERROR	LD (ERR),A	RET;EDU27	INC HLEDU29	LD A,M	CP  ' '	JR C,EDU28	INC HL	CP  27H	RET Z	CALL A_OUT	JR EDU29;;*__*__*__*__*__*__*__*__*__*__*__*__*__;ORGST	CALL ARG1P	PUSH DE	POP IY	RET;ARG1P	LD A,(OPT)	PUSH AF	SET 7,A	LD (OPT),A	CALL ARITH	POP AF	LD (OPT),A	RET;EDU40	CALL ARITH	LD A,(M82)	OR A	JR Z,EDR1	LD (M78),A	LD A,(NUMB)	LD (M79),AEDR1	LD A,(M83)	CP  28H	RET Z	LD A,(M86)	CP  0FFH	RET;;*__*__*__*__*__*__*__*__*__*__*__*__*__;BCOUT	LD BC,(NUMB)	LD A,C	CALL A_OUT	JR B_OUT;ASBOT	RLCA	RLCA	RLCAABOUT	ADD B	JR A_OUT;B_OUT	LD A,B;;*__*__*__*__*__*__*__*__*__*__*__*__*__;; Ausgabe eines assemblierten Bytes auf;        allen Devices;A_OUT	EXX	LD C,A	LD A,(OPT)	RLA	RLA	JR NC,OUT1	LD HL,(OFFS)	PUSH IY	POP DE	ADD HL,DE	LD M,COUT1	RRA	JR NC,OUTE	LD HL,(LEN)	INC HL	LD (LEN),HL	BIT 5,A	JR Z,OUT2	CALL OHEAD	JR OUTE;OUT2	LD A,ERR+15	LD HL,(TXTP)	CP  L	JR Z,OUTE	LD A,C	CALL PAHEX	LD (TXTP),HLOUTE	EXX	INC IY	RET;;*__*__*__*__*__*__*__*__*__*__*__*__*__;; Flagtest;TFLAG	PUSH BC	PUSH HL	CALL SPCTB	CALL LETTR	JR C,EDR5	LD D,A	LD E,20H	INC HL	LD A,M	CALL LABEL	JR C,EDR6	LD E,A	INC HL	LD A,M	CALL LABEL	JR NC,EDR5EDR6	CALL SPCTB	CP  2CH	JR NZ,EDR7	INC HLEDR7	PUSH HL	LD HL,TAB_F+15	LD BC,10HEDR8	LD A,E	CPDR	JR NZ,EDR9	LD A,D	CP  M	JR NZ,EDR8	SRL C	JR NC,EDR9	LD A,C	POP HL	POP DE	POP BC	CCF	RET;EDR9	POP HLEDR5	POP HL	POP BC	SCF	RET;TAB_F	DEFM 'NZZ NCC POPEP M ';; weitere Flags NE,EQ,GE,LT,NV,OV ?;;*__*__*__*__*__*__*__*__*__*__*__*__*__;TAB_3	DEFB 0,0	DEFB ASS31-ASS27	DEFB EDU32-ASS31	DEFB EDU41-EDU32	DEFB IM012-EDU41	DEFB IN_ST-IM012	DEFB OT_ST-IN_ST	DEFB BITST-OT_ST	DEFB EX_ST-BITST	DEFB SKIP -EX_ST	DEFB RETST-SKIP	DEFB SKIP4-RETST	DEFB DEFBW-SKIP4	DEFB DEFM -DEFBW	DEFB ORGST-DEFM;;*__*__*__*__*__*__*__*__*__*__*__*__*__;; Arithmetikroutine;ARITH	PUSH BC	XOR A	EXX	LD B,7	LD HL,NUMB-1ARI01	INC HL	LD M,A	DJNZ ARI01	DEC M	EXX	LD A,'+'	LD (OPER),A	DEC HL;ARI02	INC HLARI03	CALL SPCTB	LD A,M	CP  ';'	JR Z,ARI06	CP  ' '	JR C,ARI06	LD (M84),A	CP  27H	JP  Z,ZAHL7	CP  ','	JR Z,ARI05	CP  '('	JR Z,ARI08	CP  ')'	JR Z,ARI02	CP  '-'	JR Z,ARI07	CP  '+'	JR Z,ARI07	CP  '*'	JR Z,ARI07	CP  '/'	JR Z,ARI07	CP  '%'	JR Z,ARI07	CP  '$'	JR Z,ARI04	CP  '#'	JR NZ,ARINXARI04	LD BC,(MPC)	JP  ZAHL9;ARI05	INC HLARI06	LD DE,(NUMB)	POP BC	LD A,(M84)	OR A	RET;ARI08	LD (M83),A	JR ARI02;ARI07	LD (OPER),A	JR ARI02;ARINX	CALL LETTR	JP  NC,REG	PUSH HL	LD C,10	CALL DIGIT	JR C,ZAHL1	POP HLERR5	LD A,'5'	;keine Zahl oder	JP ERROR	;Marke;ZAHL1	LD C,10HZAHL2	CALL DIGIT	JR C,ZAHL2	POP HL	CP  11H	JR Z,ZAHL3	LD C,10ZAHL3	PUSH HL	LD HL,0ZAHL4	EX (SP),HL	CALL DIGIT	EX (SP),HL	JR C,ZAHL5	CP  11H	JR  Z,ZAHL9	CP  16	CALL C,ERR5	EX (SP),HL	DEC HL	EX (SP),HLZAHL9	JP  CALCZ;DIGIT	LD A,M	CALL LETTR	INC HL	CP  '0'+10	JR NC,DIG_1	SUB '0'DIG_1	CP  'A'	JR C,DIG_2	SUB 37HDIG_2	CP  C	RET;ZAHL5	LD E,A	XOR A	LD D,A	ADD HL,DE	EX DE,HL	LD L,A	LD B,CZAHL6	ADD HL,DE	DJNZ ZAHL6	JR ZAHL4;ZAHL7	LD BC,0;			;!!!!!ZAHL8	INC HL	LD A,M	CP 27H	JR Z,ZAHL9	CP 20H	JR C,ERR_8	LD B,C	LD C,A	JR ZAHL8;ERR_8	LD A,'8'	LD (ERR),A	DEC HLZAHL9	INC HL	PUSH HL	JR CALC;MARKE	PUSH HL	LD HL,(LBLEND)	PUSH HL	LD DE,(LBLANF)	DEC DE	OR A	SBC HL,DE	LD B,H	LD C,L	POP HL	POP DEMRK_1	LD A,(DE)	CALL LETTR	CPDR	SCF	RET PO	CALL LOOK	JR C,MRK_1	RET;ADD	ADD HL,BC	JR CALCPSUB	SBC HL,BC	JR CALCPMULT	EX DE,HL	CALL MULT16MLT1	EX DE,HL	JR CALCPDIV	CALL DIV16	JR MLT1MOD	CALL DIV16	JR CALCP;MRK_2	POP AFMRK_3	DEC DEMRK_4	DEC DE	LD H,D	LD L,E	LD A,(OPT)	RLA	CCF	CALL NC,MARKE	PUSH DE	DEC HL	LD A,M	DEC A	JR NZ,MRK_5	LD A,'2'	LD (ERR),AMRK_5	DEC HL	LD B,M	DEC HL	LD C,M	JR NC,CALC	POP HL	CALL LOOK1	PUSH DE	LD A,'3'	LD (ERR),A	LD BC,0CALC 	LD HL,OPER	LD A,M	LD M,0	LD HL,(NUMB)	CP  '+'	JR Z,ADD	CP  '-'	JR Z,SUB	CP  '*'	JR Z,MULT	CP  '/'	JR Z,DIV	CP  '%'	JR Z,MOD	LD A,'B'	LD (ERR),ACALCP	LD (NUMB),HL	POP HLCALCE	JP  ARI03;CALCZ	PUSH DE	POP BC	JR CALC;REG  	PUSH AF	INC HL	LD A,M	EX DE,HL	CALL LABEL	JR NC,REG_2	POP AF	CP  'M'	JR NZ,REG_1	LD A,28H	LD (M83),A	EX DE,HL	JR REG_7;REG_1	LD HL,TAB_R	LD BC,9	CPIR	JR NZ,MRK_4	SLA C	JR REG_3;REG_2	INC DE	LD HL,TAB_R+15	LD BC,14	CPDR	JP NZ,MRK_2	SUB 19H	LD B,A	BIT 0,C	JP  Z,MRK_2	LD A,(DE)	CALL LABEL	JP  NC,MRK_2	POP AF	CP  M	JP  NZ,MRK_3	ADD BREG_3	SUB 41H	LD B,0	EX DE,HLREG_4	LD (M87),A	CP 3AH	JR NZ,REG_6	LD A,(M83)	OR A	LD A,20H	JR Z,REG_5	XOR A	LD (M83),A	LD A,6REG_5	LD (M86),A	JR CALCE;REG_6	PUSH HL	LD HL,TAB_7	ADD HL,BC	LD A,M	POP HL	OR A	JP  P,REG_5	LD (M82),AREG_7	LD A,3AH	JR REG_4;TAB_R	DEFM 'IRBCDEHLAFSPIXIY';;*__*__*__*__*__*__*__*__*__*__*__*__*__;MULT16	LD HL,0	LD A,10H	RR  D	RR  EHE1	JR NC,HE2	ADD HL,BCHE2	RR  H	RR  L	RR  D	RR  E	DEC A	JR NZ,HE1	RET;DIV16	LD DE,-1	LD A,B	OR C	LD A,'9'	JP Z,ERRORDIV1	INC DE	SBC HL,BC	JR NC,DIV1	ADD HL,BC	RET;;*__*__*__*__*__*__*__*__*__*__*__*__*__;EOASM;Āngs