BUCH1/3DASM ORG 200H
;***************************************
;*					*
;* KC85/3  27.03.1989			*
;*					*
;* S.WEHNER / TEIL 1			*
;*					*
;* PROGRAMM 'BUCHHALTUNG'		*
;*					*
;***************************************
;
 JP LININ
 JP RVVN
 JP DADD
 JP DSUB
 JP PRUNU
 JP DRUVO
 JP OK
 JP MODU
 JP TAEI
 JP UNTS
 JP SA1
 JP SA2
 JP SA3
 JP SA4
 JP SA5
 JP SA6
 JP SA7
 JP SA8
 JP SA9
 JP SA10
 JP LOE
 JP LOE1
 JP FRNR
 JP SA0
 JP BERL
 JP KPA
 JP UPEW1
 JP UPEW10
 JP UPEW2
 JP UPEW3
 JP UPEW5
 JP UPEW9
 JP UPSA
 JP WZRS
 JP UPDAT
 JP UPAUS
 JP SUM
 JP RNR
 JP ERNR
 JP SUCH
 JP AUS
 JP RMARK1
 JP DEIN
 JP KWDAT
 JP INZ
 JP KOM
STBT EQU 0B7A2H
OUTAB EQU 0B7B9H
UOUT1 EQU 0B7BDH
SIO EQU 08H
CTC EQU 0CH
LF EQU 0AH
CRR EQU 0DH
SEL EQU 0DD9H
FELD EQU 0DDDH
FELD1 EQU 0DEEH
POS EQU 0B7A0H
FEA EQU 0B79DH
FEE EQU 0B79FH
FAR EQU 0B7A3H
VERT EQU 0F003H
ZAE EQU 0DDAH
ZA1 EQU 0DDBH
ZA2 EQU 0DDCH
ASATZ EQU 0DD7H
SATZ EQU 4000H
BER EQU 28AH
 DEFM '                                '
 DEFM '                                '
 DEFM '                                '
 DEFM '                     '
ATAB EQU 0D90H
LOP EQU 0D92H
TAB EQU 0D93H
RES EQU 0D9BH
OP1 EQU 0DABH
OP2 EQU 0DBBH
DSUB CALL MAR23
 JP NZ,MAR2B
MAR1 CALL MAR13
 LD (BER+16H),A
 JP NC,MAR2
 LD A,(BER+3H)
 CPL
 ADD A,01H
 LD (BER+3H),A
MAR2 LD HL,(BER+8H)
 LD A,(BER+4H)
 CALL MAR17A
 JP MAR2A
DADD CALL MAR23
 JP NZ,MAR1
MAR2B CALL MAR13
MAR2A LD HL,BER+30H
 LD DE,BER+40H
 LD BC,BER+51H
 LD A,(BER+4H)
 CALL MAR6
 LD (BER+2H),A
 LD HL,BER+42H
 LD A,(BER+3H)
 CALL MAR3
 LD HL,(ATAB)
 LD E,M
 INC HL
 LD D,M
 LD HL,BER+42H
 LD BC,10H
 LDIR
 LD A,(BER+2H)
 SCF
 JP MAR9
MAR12 LD A,01H
 OR A
 JP MAR9
MAR25 LD A,01H
 JP MAR8
MAR25A LD A,02H
MAR8 CP A
MAR9 LD HL,(BER+0EH)
 LD SP,HL
 PUSH AF
 SUB A
 LD (BER+1FH),A
 POP AF
 RET
MAR3 LD B,A
 LD C,0FH
MAR4 LD A,30H
 OR M
 LD M,A
 INC HL
 DEC C
 JP NZ,MAR4
 LD A,(BER+2H)
 CP 01H
 LD A,M
 JP NZ,MAR5
 AND 0FH
 JP NZ,MAR5
 LD B,30H
MAR5 OR B
 LD M,A
 RET
MAR6 LD (BER+1DH),A
 LD (BER+1EH),A
 OR A
 PUSH AF
MAR10  POP AF
 LD A,(DE)
 ADC A,90H
 ADD M
 DAA
 PUSH AF
 AND 0FH
 LD (BC),A
 DEC BC
 DEC DE
 DEC HL
 LD A,(BER+1DH)
 DEC A
 LD (BER+1DH),A
 JP NZ,MAR10
 POP AF
 JP NC,MAR11
 LD A,(BER+16H)
 OR A
 JP NZ,MAR11
 LD A,(BER+1EH)
 CP 10H
 JP Z,MAR12
 LD A,01H
 LD (BC),A
 LD A,(BER+1EH)
 INC A
 RET
MAR11 INC BC
 LD H,B
 LD L,C
 LD A,(BER+1EH)
 CALL MAR19
 RET
MAR13 LD A,(BER+1H)
 LD B,A
 LD A,(BER)
 CP B
 JP NZ,MAR14
 LD HL,BER+21H
 CALL MAR17
 EX DE,HL
 LD HL,BER+31H
 LD A,B
 CALL MAR17
 LD A,B
 CALL MAR18
 LD A,(BER)
 LD B,A
MAR14 LD HL,BER+21H
 LD DE,BER+31H
 JP NC,MAR15
 EX DE,HL
 LD (BER+5H),A
 LD C,A
 LD A,B
 LD (BER+4H),A
 JP MAR16
MAR15 LD (BER+4H),A
 LD C,A
 LD A,B
 LD (BER+5H),A
MAR16 LD (BER+6H),HL
 EX DE,HL
 LD (BER+8H),HL
 RET
MAR17 LD B,A
 PUSH DE
 LD A,10H
 SUB B
 LD E,A
 LD D,00H
 ADD HL,DE
 POP DE
 RET
MAR17A CALL MAR17
MAR17B LD A,M
 CPL
 ADD A,0AH
 LD M,A
 INC HL
 DEC B
 JP NZ,MAR17B
 DEC HL
 INC M
 RET
MAR18 LD A,(DE)
 CP M
 RET NZ
 INC HL
 INC DE
 DEC B
 JP NZ,MAR18
 RET
MAR19 LD B,A
 SUB A
MAR20 CP M
 JP NZ,MAR21
 INC HL
 DEC B
 JP NZ,MAR20
 INC B
MAR21 LD A,B
 RET
MAR23 LD (ATAB),HL
 LD HL,0002H
 ADD HL,SP
 LD (BER+0EH),HL
 SUB A
 LD (BER+16H),A
 LD A,0
 LD (BER+20H),A
 LD HL,BER+20H
 LD DE,BER+21H
 LD BC,52H
 LDIR
 CALL MAR24
 JP NC,MAR25
 LD HL,BER+21H
 ADD HL,BC
 EX DE,HL
 LD C,A
 LD B,0
 PUSH BC
 LDIR
 POP BC
 LD B,C
 LD A,C
 LD HL,BER+30H
 CALL MAR26
 JP NC,MAR25
 LD (BER),A
 LD A,B
 LD (BER+3H),A
 LD (BER+11H),A
 CALL MAR24
 JP NC,MAR25A
 LD HL,BER+31H
 ADD HL,BC
 EX DE,HL
 LD C,A
 LD B,0
 PUSH BC
 LDIR
 POP BC
 LD B,C
 LD A,C
 LD HL,BER+40H
 CALL MAR26
 JP NC,MAR25A
 LD (BER+1H),A
 LD A,B
 LD HL,BER+3H
 CP M
 RET
MAR24 LD HL,(ATAB)
 LD E,M
 INC HL
 LD D,M
 INC HL
 LD A,M
 OR A
 RET Z
 CP 11H
 RET NC
 LD A,10H
 SUB M
 LD C,A
 LD A,M
 LD B,00H
 INC HL
 LD (ATAB),HL
 SCF
 RET
MAR26 OR A
 JP Z,MAR27
 CP 11H
 JP NC,MAR27
 LD (LOP),A
 LD C,A
 LD A,M
 AND 0F0H
 CP 0D0H
 JP Z,MAR28
 CP 30H
 JP Z,MAR28
 CP 0C0H
 JP NZ,MAR27
 LD A,30H
MAR28 LD (BER+10H),A
 LD A,M
 AND 0FH
 OR 30H
 JP MAR30
MAR33 DEC C
 JP Z,MAR31
 DEC HL
 LD A,M
MAR30 CP 30H
 JP C,MAR32
 CP 3AH
 JP NC,MAR32
 AND 0FH
 LD M,A
 JP MAR33
MAR32 CP 2AH
 JP Z,MAR34
 CP 20H
 JP NZ,MAR27
MAR34 LD E,A
 LD A,(LOP)
 SUB C
 LD B,A
MAR35 LD M,00
 DEC C
 JP Z,MAR31
 DEC HL
 LD A,M
 CP E
 JP Z,MAR35
MAR27 XOR A
 RET
MAR31 LD A,(LOP)
 CALL MAR19
 LD C,B
 LD A,(BER+10H)
 LD B,A
 LD A,C
 SCF
 RET
LININ LD A,C
 LD (S11),A
LEO PUSH HL
 CALL TAEI
 CP 10H
 JP Z,HMENU
 POP HL
 CP 8
 JP NZ,LE1
 LD A,(S11)
 CP C
 JP Z,LEO
 INC C
 LD A,8
 CALL VERT
 DEFB 0
 DEC HL
 JP LEO
LE1 CP 9
 JP NZ,LE2
 CALL VERT
 DEFB 0
 INC HL
 DEC C
 RET Z
 JP LEO
LE2 CP 20H
 RET C
 LD M,A
 CALL 0F003H
 DEFB 0
 INC HL
 DEC C
 JP NZ,LEO
 RET
S11 DEFB 0
S12 DEFB 0
RVVN LD B,0
 PUSH AF
 LD A,C
 OR A
 JP NZ,RVVNW
 POP AF
 RET
RVVNW POP AF
 PUSH DE
 PUSH  BC
 PUSH AF
 SUB C
 OR A
 JP NZ,RVVN2
 POP AF
 POP BC
 POP DE
 RET
RVVN2 LD C,A
 POP AF
 PUSH HL
 PUSH DE
 POP HL
 LD E,A
 LD D,0
 DEC DE
 ADD HL,DE
 PUSH HL
 POP DE
 POP HL
 DEC HL
 LDDR
 POP BC
 POP HL
MARK LD M,30H
 INC HL
 DEC C
 JP NZ,MARK
 RET
PRUNU LD A,M
 CP 30H
 RET C
 CP 3AH
 JP NC,PRUF
 INC HL
 DJNZ PRUNU
 SCF
 CCF
 RET
PRUF SCF
 RET
DRUVO LD A,B
 SUB C
 DEC A
 LD B,A
DRU0 LD A,M
 CP 30H
 JP NZ,DRU1
 PUSH HL
 PUSH DE
 POP HL
 LD M,20H
 PUSH HL
 POP DE
 POP HL
 INC HL
 INC DE
 DJNZ DRU0
 LD A,M
 PUSH HL
 PUSH DE
 POP HL
 LD M,A
 INC HL
 LD M,2EH
 PUSH HL
 POP DE
 POP HL
 INC HL
 INC DE
 PUSH BC
 JP DRU2
DRU1 PUSH BC
 LD C,B
 INC C
 LD B,0
 LDIR
 PUSH HL
 PUSH DE
 POP HL
 LD M,2EH
 PUSH HL
 POP DE
 INC DE
 POP HL
DRU2 POP BC
 LD B,0
 LDIR
 RET
OK CALL VERT
 DEFB 23H
 DEFM 'OK J/N'
 DEFB 0
 RET
TAEI CALL VERT
 DEFB 4
 RET
UNTS LD HL,200H
 LD (POS),HL
 LD B,40
UNTS1 LD A,5FH
 CALL VERT
 DEFB 0
 DJNZ UNTS1
 RET
SA1 CALL VERT
 DEFB 23H
 DEFM 'RECHNUNGSNUMMER: '
 DEFB 0
 RET
SA2 CALL VERT
 DEFB 23H
 DEFM 'ANSCHRIFT: '
 DEFB 0
 RET
SA3 CALL VERT
 DEFB 23H
 DEFM 'F-DATUM: '
 DEFB 0
 RET
SA4 CALL VERT
 DEFB 23H
 DEFM 'R-DATUM: '
 DEFB 0
 RET
SA5 CALL VERT
 DEFB 23H
 DEFM 'RECHNUNGSBETRAG: '
 DEFB 0
 RET
SA6 CALL VERT
 DEFB 23H
 DEFM 'EINGANGSDATUM: '
 DEFB 0
 RET
SA7 CALL VERT
 DEFB 23H
 DEFM 'EINZAHLUNGSDATUM: '
 DEFB 0
 RET
SA8 CALL VERT
 DEFB 23H
 DEFM 'EINZAHLUNGSWERT: '
 DEFB 0
 RET
SA9 CALL VERT
 DEFB 23H
 DEFM 'MAHNUNGSDATUM: '
 DEFB 0
 RET
SA10 CALL VERT
 DEFB 23H
 DEFM 'ENTER '
 DEFB 0
 RET
LOE LD HL,8000H
 LD DE,8001H
 LD BC,27FFH
 LDIR
 LD A,39H
 LD (0A800H),A
 LD HL,0A800H
 LD DE,0A801H
 LD BC,9FFH
 LDIR
 LD A,39H
 LD (FAR),A
 RET
LOE1 LD A,4
 LD (FEA),A
 LD A,28
 LD (FEE),A
 LD A,20H
 LD (FAR),A
 LD A,0CH
 CALL VERT
 DEFB 0
 RET
SA0 CALL VERT
 DEFB 23H
 DEFM 'OFFENER BETRAG: '
 DEFB 0
 RET
BERL LD HL,BER
 LD B,75H
LBER LD M,20H
 INC HL
 DJNZ LBER
 LD HL,00H
 LD (BER+24),HL
 LD (BER+25),HL
 LD (BER+46),HL
 LD (BER+57),HL
 RET
KPA CALL BERL
 LD HL,(ASATZ)
 LD DE,89
 ADD HL,DE
 LD (TAB),HL
 LD A,10
 LD (TAB+2),A
 LD HL,(ASATZ)
 LD DE,111
 ADD HL,DE
 LD A,M
 CP 20H
 JP NZ,KPA1
 SCF
 RET
KPA1 LD (TAB+3),HL
 LD A,10
 LD (TAB+5),A
 LD HL,OP1
 LD (TAB+6),HL
 LD HL,TAB
 CALL DSUB
 SCF
 CCF
 RET
UPEW1 LD HL,(ASATZ)
 PUSH HL
 LD C,8
 CALL LININ
 POP HL
 LD B,8
 CALL PRUNU
 RET
UPEW10	LD HL,(ASATZ)
 LD DE,121
 ADD HL,DE
 PUSH HL
 LD C,1
 CALL LININ
 POP HL
 CP 0DH
 RET Z
 PUSH HL
 LD B,1
 CALL PRUNU
 POP HL
 LD A,M
 SUB 30H
 LD M,A
 RET
UPEW2 LD C,69
 LD HL,(ASATZ)
 LD DE,8
 ADD HL,DE
 CALL LININ
 RET
UPEW3 LD C,6
 LD HL,(ASATZ)
 ADD HL,DE
 PUSH HL
 CALL LININ
 POP HL
 PUSH HL
 LD B,6
 CALL PRUNU
 POP HL
 RET
UPEW5 LD C,10
 LD HL,(ASATZ)
 ADD HL,DE
 PUSH HL
 CALL LININ
 EX DE,HL
 POP HL
 PUSH HL
 EX DE,HL
 LD A,10
 CALL RVVN
 POP HL
 PUSH HL
 LD B,10
 CALL PRUNU
 POP HL
 RET
UPEW9 PUSH HL
 LD C,6
 CALL LININ
 POP HL
 PUSH HL
 LD B,6
 CALL PRUNU
 POP HL
 RET
UPSA CALL VERT
 DEFB 23H
 DEFM 'RECHNUNGSNR. NICHT VORHANDEN!'
 DEFW  0D0AH
 DEFB 0
 RET
WZRS LD A,CRR
 CALL SD1
 LD A,LF
 CALL SD1
 RET
SUM LD A,(S12)
 INC A
 LD (S12),A
 RET
MODU LD A,(S12)
 CP 1
 JP Z,MOD1
 CP 2
 JP Z,MOD2
 CP 3
 JP Z,MOD3
 CP 4
 JP Z,MOD4
 RET
MOD1 LD A,2
 LD L,0CH
 LD D,0C3H
 CALL VERT
 DEFB 26H
 RET
MOD2 LD A,2
 LD L,0CH
 LD D,083H
 CALL VERT
 DEFB 26H
 RET
MOD3 LD A,2
 LD L,0CH
 LD D,043H
 CALL VERT
 DEFB 26H
 RET
MOD4 LD A,2
 LD L,0CH
 LD D,003H
 CALL VERT
 DEFB 26H
 RET
RNR LD A,0
 LD (ZAE),A
 CALL ERNR
 CALL SADRA
ABFR2 CALL LOE1
 LD HL,0F00H
 LD (POS),HL
 CALL VERT
 DEFB 23H
 DEFM 'WEITERE ZAHLUNGSEINGAENGE?'
 DEFB 0
 LD HL,1100H
 LD (POS),HL
 CALL OK
 CALL TAEI
 CP 4EH
 JP Z,HMENU
 CP 4AH
 JP NZ,ABFR2
 CALL LOE1
 JP RNR
ERNR LD HL,0A03H
 LD (POS),HL
 CALL SA1
 LD A,0
 LD (ZAE),A
 LD HL,FELD
 LD C,8
 PUSH HL
 CALL LININ
 POP HL
 LD B,8
 CALL PRUNU
 JP C,ERNR
ERNR1 LD HL,0C12H
 LD (POS),HL
 CALL OK
 CALL TAEI
 CP 4EH
 JP Z,ERNR
 CP 4AH
 JP NZ,ERNR1
 LD B,8
 SUB A
 LD (S12),A
 LD (ZAE),A
 CALL SUM
 CALL MODU
 LD HL,SATZ
 LD (ASATZ),HL
 LD DE,0000H
 CALL SUCH
 RET
SADRA JP NC,FRNR
 CALL AUS
RMARK CALL TAEI
 CP 4EH
 JP Z,FRMAR
 CP 4AH
 JP NZ,RMARK
 CALL ZEING
 SCF
 RET
FRMAR SCF
 CCF
 RET
FRNR LD HL,1400H
 LD (POS),HL
 CALL UPSA
 CALL SA10
 CALL TAEI
 SCF
 CCF
 RET
ZEING CALL LOE1
EGD LD HL,0A02H
 LD (POS),HL
 CALL SA6
 LD DE,99
 CALL UPEW3
 JP C,EGD
 PUSH HL
 LD HL,0A11H
 LD (POS),HL
 POP HL
 CALL UPDAT
EZD LD HL,0C02H
 LD (POS),HL
 CALL SA7
 LD DE,105
 CALL UPEW3
 JP C,EZD
 PUSH HL
 LD HL,0C14H
 LD (POS),HL
 POP HL
 CALL UPDAT
ZEW LD HL,0E02H
 LD (POS),HL
 CALL SA8
 LD HL,(ASATZ)
 LD DE,111
 ADD HL,DE
 LD A,M
 CP 20H
 JP NZ,ZEW1
 LD B,10
 PUSH HL
ZEW2 LD M,30H
 INC HL
 DJNZ ZEW2
 POP HL
ZEW1 LD (TAB+3),HL
 PUSH HL
 LD HL,OP1
 LD (TAB),HL
 LD C,10
 CALL LININ
 LD A,10
 LD (TAB+5),A
 LD (TAB+2),A
 EX DE,HL
 LD HL,OP1
 EX DE,HL
 LD A,10
 CALL RVVN
 LD HL,OP1
 LD B,10
 CALL PRUNU
 LD HL,OP1
 LD BC,0E13H
 CALL KOM
 POP HL
 JP C,ZEW
 PUSH HL
 JP EIN2
ZEW3 LD HL,RES
 LD (TAB+6),HL
 LD HL,TAB
 CALL DADD
 POP HL
 PUSH HL
 LD DE,NOL
 LD BC,10
 LDIR
 POP HL
 EX DE,HL
 LD HL,RES+6
 LD BC,10
 LDIR
 CALL KPA
 LD HL,OP1+6
 LD B,10
 CALL PRUNU
 RET NC
 LD HL,(ASATZ)
 LD DE,111
 ADD HL,DE
 EX DE,HL
 LD HL,NOL
 LD BC,10
 LDIR
 JP ZEW
EIN2 LD HL,1300H
 LD (POS),HL
 CALL OK
 CALL TAEI
 POP HL
 CP 4EH
 JP Z,EGD
 PUSH HL
 CP 4AH
 JP Z,ZEW3
SUCH LD HL,(ASATZ)
 ADD HL,DE
VERGL EX DE,HL
 LD HL,FELD
 LD B,8
VERG LD A,(DE)
 LD C,A
 LD A,M
 CP C
 JP NZ,ERH
 INC DE
 INC HL
 DJNZ VERG
 LD A,(ZAE)
 INC A
 LD (ZAE),A
 SCF
 RET
ERH LD A,(ZAE)
 INC A
 LD (ZAE),A
 CP 128
 JP NZ,ER1
 CALL SUM
 CALL MODU
 SUB A
 LD (ZAE),A
 LD A,(S12)
 CP 5
 RET Z
 LD HL,3F80H
 LD (ASATZ),HL
ER1 LD HL,(ASATZ)
 LD DE,128
 ADD HL,DE
 LD (ASATZ),HL
 LD A,M
 CP 20H
 JP NZ,VERGL
 SCF
 CCF
 RET
AUS CALL LOE1
 LD HL,0100H
 LD (POS),HL
 LD HL,(ASATZ)
 CALL SA1
 LD B,8
 CALL UPAUS
 LD HL,0300H
 LD (POS),HL
 LD HL,(ASATZ)
 LD DE,8
 ADD HL,DE
 CALL SA2
 LD B,69
 CALL UPAUS
 LD HL,0600H
 LD (POS),HL
 LD HL,(ASATZ)
 LD DE,77
 ADD HL,DE
 CALL SA3
 CALL UPDAT
 LD HL,0800H
 LD (POS),HL
 LD HL,(ASATZ)
 LD DE,83
 ADD HL,DE
 CALL SA4
 CALL UPDAT
 LD HL,0A00H
 LD (POS),HL
 LD HL,(ASATZ)
 LD DE,89
 ADD HL,DE
 CALL SA5
 LD BC,0A11H
 CALL KOM
 LD HL,0C00H
 LD (POS),HL
 LD HL,(ASATZ)
 LD DE,99
 ADD HL,DE
 CALL SA6
 CALL UPDAT
 LD HL,0E00H
 LD (POS),HL
 LD HL,(ASATZ)
 LD DE,105
 ADD HL,DE
 CALL SA7
 CALL UPDAT
 LD HL,1000H
 LD (POS),HL
 LD HL,(ASATZ)
 LD DE,111
 ADD HL,DE
 CALL SA8
 LD BC,1011H
 CALL KOM
 LD HL,1200H
 LD (POS),HL
 CALL SA0
 CALL KPA
 LD BC,1211H
 JP NC,KPA2
 LD HL,(TAB)
 CALL KOM
 JP KPA3
KPA2 LD HL,OP1+6
 CALL KOM
KPA3 LD HL,1400H
 LD (POS),HL
 LD HL,(ASATZ)
 LD DE,122
 ADD HL,DE
 CALL SA9
 CALL UPDAT
 LD HL,1600H
 LD (POS),HL
 LD HL,(ASATZ)
 LD DE,121
 ADD HL,DE
 CALL VERT
 DEFB 23H
 DEFM 'MAHNUNGEN: '
 DEFB 0
 LD A,M
 CP 20H
 JP Z,AUSM
 ADD A,30H
AUSM CALL VERT
 DEFB 0
 LD HL,1802H
 LD (POS),HL
 CALL OK
 RET
RMARK1 CALL TAEI
 CP 4EH
 JP Z,MVERGL
 CP 4AH
 JP NZ,RMARK1
 CALL ZEING
 RET
DEIN LD HL,0C04H
 LD (POS),HL
 CALL SA3
 LD HL,SATZ
 LD (ASATZ),HL
 LD A,0
 LD (ZA1),A
 LD C,6
 LD HL,FELD
 PUSH HL
 CALL LININ
 POP HL
 PUSH HL
 LD B,6
 CALL PRUNU
 POP HL
 JP C,DEIN
 PUSH HL
 LD HL,0C0DH
 LD (POS),HL
 POP HL
 CALL UPDAT
ABFRN LD HL,0F0FH
 LD (POS),HL
 CALL OK
 CALL TAEI
 CP 4EH
 JP Z,DEIN
 CP 4AH
 JP NZ,ABFRN
 SCF
 RET
KWDAT CALL LOE1
 LD HL,0800H
 LD (POS),HL
 CALL VERT
 DEFB 23H
 DEFM 'KEIN WEITERES F-DATUM VORHANDEN!'
 DEFW 0D0AH
 DEFB 0
 CALL SA10
 CALL TAEI
 RET
INZ LD B,8
 LD C,80H
 IN A,(C)
 CP 0EEH
 JP NZ,ERR
 LD L,B
 LD A,2
 LD D,1
 LD E,D
 CALL VERT
 DEFB 26H
 LD HL,(ASATZ)
 LD DE,121
 ADD HL,DE
 LD A,M
 CP 1
 JR NZ,DS2A
 LD HL,DS1
 JR NOLA
DS2A LD HL,DS2
NOLA LD A,M
 CP 0
 JR Z,NOL1
 INC HL
 PUSH HL
 CALL VERT
 DEFB 2
 POP HL
 JR NOLA
NOL1 LD HL,0B29FH
 CALL WZRS
 LD B,24
INZ2 PUSH BC
 CALL WZRS
 LD B,40
INZ1 INC HL
 PUSH HL
 PUSH BC
 LD A,M
 CALL VERT
 DEFB 2
 POP BC
 POP HL
 DJNZ INZ1
 POP B
 DJNZ INZ2
 RET
SD1 PUSH AF
 PUSH HL
SD6 PUSH BC
 LD A,SIO+2
 LD A,C
 IN A,(C)
 BIT 2,A
 JR NZ,SD5
 LD A,1
 CALL VERT
 DEFB 14H
 POP BC
 JR SD6
SD5 POP BC
 POP HL
 POP AF
 PUSH BC
 PUSH AF
 LD A,SIO
 LD C,A
 POP AF
 OUT (C),A
 POP BC
 RET
ERR CALL VERT
 DEFB 23H
 DEFW 0D0AH
 DEFM 'DRUCKER NICHT BEREIT!'
 DEFB 0
 LD A,200
 CALL VERT
 DEFB 14H
 LD HL,1900H
 LD (POS),HL
 CALL VERT
 DEFB 23H
 DEFM '                     '
 DEFB 0
 LD HL,180BH
 LD (POS),HL
 RET
UPAUS LD A,M
 CALL VERT
 DEFB 0
 INC HL
 DJNZ UPAUS
 RET
KOM PUSH BC
 LD B,10
 LD C,2
 LD DE,FELD1
 CALL DRUVO
 POP BC
 LD H,B
 LD L,C
 LD (POS),HL
 LD B,11
 LD HL,FELD1
 CALL UPAUS
 CALL VERT
 DEFB 23H
 DEFM ' MARK'
 DEFB 0
 RET
UPDAT LD B,6
UPD LD A,B
 CP 4
 JP Z,PKT
 CP 2
 JP Z,PKT
UAUS LD A,M
 INC HL
 CALL VERT
 DEFB 0
 DJNZ UPD
 RET
PKT LD A,2EH
 CALL VERT
 DEFB 0
 JP UAUS
HMENU EQU 0DCBH
MVERGL EQU 0DCEH
ADR3 EQU 0DD1H
ERH1 EQU 0DD4H
DS1 EQU 1D66H
DS2 EQU 1E38H
NOL DEFW '          '
;
;***************************************
;                E N D E
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ