WOEBU/4DASM;***************************************
;*					*
;* KC 85/4 24.01.1989			*
;*					*
;* S.WEHNER				*
;*					*
;* PROGRAMM 'WOERTERBUCH MIT DISK'	*
;*					*
;***************************************
;
	ORG 200H
;
; VEREINBARUNGEN
;***************************************
;
KASPU EQU 0B700H	;KASSETTENPUFFER
ASATZ EQU 0B809H	;AKT.SP-ADR.
SATZ1 EQU 0B80DH	;HILFSSPEICHER
SATZ2 EQU 0B811H	;SPEICHERZELLE
KAZA EQU 0B815H		;KASPUZELLE
POS1 EQU 0B819H		;CURSORSPEICHER
POS2 EQU 0B81DH		;    - " -
STBY EQU 0B80FH		;STEUERBYTE
STB1 EQU 0B813H		;    -"-
SEL1 EQU 0B817H		;HILFSSPEICHER
SEL2 EQU 0B81BH		;MERKZELLE
SEL3 EQU 0B81FH		;  - " -
ZAE1 EQU 0B821H		;ZAEHLER FUER
			; GEFRAGTE VOK.
ZAE2 EQU 0B822H		;ZAEHLER FUER
			; NICHT GEWUSSTE
			; VOK.
VERT EQU 0F003H		;PROG.VERT. 1
FELD EQU 0100H		;NAME SAVE/LOAD
FEL1 EQU 0108H		;FREMDSPR.ADR.
ARGN EQU 0B781H		;ARG (N)
ARG1 EQU 0B782H		;ANFANGSADR.SAVE
ARG2 EQU 0B784H		;ENDEADR. SAVE
POS EQU 0B7A0H		;CURSORPOSITION
FAR EQU 0B7A3H		;FARBBYTE
FEA EQU 0B79CH		;FENSTERANFANG
FEE EQU 0B79EH		;FENSTERENDE
S11 EQU 0B823H		;LININ-SP.-ZELLE
ZAE EQU 0B825H		;WORTZAEHLER
SEL EQU 0B827H		;MERKZELLE FUER
			; MODU
ZTA EQU 0B829H		;MERKZ. ZEIGER
			; UTAB. 4.1/4.2
;
AFS 	EQU	0BA00H
UMO	EQU	0BA09H
DRU	EQU	0BA10H
WIN	EQU	0BA69H
WIN1	EQU	0BA76H
ZUSF	EQU	0BA7DH
HEH	EQU	0BA89H
NAM	EQU	0BA94H
WIN2	EQU	0BAB2H
AUSG	EQU	0BAC4H
DEU	EQU	0BAC9H
ENT	EQU	0BAEEH
LEZ	EQU	0BE1EH
ETAS	EQU	0BE2EH
CLS	EQU	0BE3BH
LININ	EQU	0BE41H
HKD4	EQU	0BE89H
DEBL	EQU	0BEDEH
EIN1	EQU	0BF03H
WDH	EQU	0BF09H
POSI	EQU	0BF25H
POSI1	EQU	0BF2EH
AUSS	EQU	0BF48H
PRINT	EQU	0BF57H
UMODU	EQU	0BF5EH
HMA1	EQU	0BF75H
EINGA	EQU	0BFCAH
AFG1	EQU	0BFD6H
DISK	EQU	0BB20H
DISK1	EQU 	0BB3FH
;
;#######################################
; VEREINBARUNGEN ENDE
;
;
; ANFANG HAUPTPROGRAMM
;***************************************
;
ZEICO DEFM '                           '
      DEFM '                           '
      DEFM '                           '
      DEFM '               '
;
MODU LD A,(SEL)
 PUSH AF
 LD A,(STBY)
 PUSH AF
 DI
 IN A,(88H)
 RES 0,A
 RES 2,A
 OUT (88H),A
 LD A,(IX+4)
 SET 7,A
 LD (IX+4),A
 OUT (86H),A
 POP AF
 CP 43H
 JR Z,RAM1
 CP 83H
 JR Z,RAM2
 CP 0C3H
 JR Z,PIXE
 IN A,(88H)
 SET 2,A
 OUT (88H),A
 LD A,(IX+1)
 SET 2,A
 RES 1,A
 LD (IX+1),A
 OUT (84H),A
 JR KOP
RAM1 LD A,(IX+1)
 RES 4,A
 LD (IX+1),A
 OUT (84H),A
 JR KOP
RAM2 LD A,(IX+1)
 SET 4,A
 LD (IX+1),A
 OUT (84H),A
 JR KOP
PIXE IN A,(88H)
 SET 2,A
 OUT (88H),A
 LD A,(IX+1)
 SET 2,A
 SET 1,A
 LD (IX+1),A
 OUT (84H),A
KOP POP AF
 CP 1
 RET Z
 LD HL,8000H
 LD DE,4000H
 LD BC,4000H
 LDIR
KOP1 LD A,(IX+4)
 RES 7,A
 LD (IX+4),A
 OUT (86H),A
 LD A,28H
 LD (IX+1),A
 OUT (84H),A
 IN A,(88H)
 SET 0,A
 SET 2,A
 OUT (88H),A
 EI
 RET
;
 DEFW 7F7FH
 DEFM 'WOEBU'
 DEFB 1
 LD HL,(0B7B0H)
 LD (ZTA),HL
 LD HL,UMAR
 LD A,M
 CP 21H
 JP Z,UMAR
AFG CALL DEBL
 CALL CLS
 LD HL,SATZ
 LD M,10H
 LD HL,502H
 LD (POS),HL
 CALL VERT
 DEFB 23H
 DEFM 'FREMDSPRACHE: '
 DEFB 0
 LD HL,FEL1
 LD C,15
 CALL LININ
 LD M,0
 JR MENU
 DEFW 7F7FH
 DEFM 'REWOEBU'
 DEFB 1
MENU CALL ZUSF
 SUB A
 LD (SEL),A
 LD HL,(ZTA)
 LD (0B7B0H),HL
 LD HL,20AH
 LD (POS),HL
 CALL HEH
 CALL VERT
 DEFB 23H
 DEFM 'HAUPTMENU ==='
 DEFW 0D0AH
 DEFM '           _________________'
 DEFB 0
 LD HL,600H
 LD (FEA),HL
 LD HL,1628H
 LD (FEE),HL
 LD A,3AH
 LD (FAR),A
 CALL CLS
 LD HL,302H
 LD (POS),HL
 CALL VERT
 DEFB 23H
 DEFM '1. EINGABE       5. UEBERSETZUNG'
 DEFW 0D0AH
 DEFW 0D0AH
 DEFW 0D0AH
 DEFM '  2. RETTEN        6. LISTEN'
 DEFW 0D0AH
 DEFW 0D0AH
 DEFW 0D0AH
 DEFM '  3. LOESCHEN      7. LERNEN'
 DEFW 0D0AH
 DEFW 0D0AH
 DEFW 0D0AH
 DEFM '  4. CAOS-MENU     8. SUCHEN'
 DEFW 0D0AH
 DEFW 0D0AH
 DEFW 0D0AH
 DEFM '                   9. LADEN'
 DEFB 0
 CALL WIN
 LD A,78H
 LD (FAR),A
 LD HL,1E02H
 LD (POS),HL
 CALL VERT
 DEFB 23H
 DEFM 'NUMMER: '
 DEFB 0
TASA CALL ETAS
 CP 31H
 JP Z,EING
 CP 39H
 JP Z,LOAD
 CP 34H
 JR Z,TASA2
 PUSH AF
 LD A,(SATZ)
 CP 10H
 JR NZ,TASA1
 POP AF
 JR TASA
TASA1 POP AF
 CP 35H
 JP Z,UEBER
 CP 36H
 JP Z,LIS
 CP 32H
 JP Z,SAVE
 CP 37H
 JP Z,LER
 CP 38H
 JP Z,SUCH
 CP 33H
 JP Z,LOE
 JR TASA
TASA2 CALL VERT
 DEFB 0DH
EING CALL ZUSF
 LD HL,20BH
 LD (POS),HL
 CALL HEH
 CALL VERT
 DEFB 23H
 DEFM 'EINGABE'
 DEFB 0
 CALL HEH
 CALL EIN1
 LD HL,1E02H
 LD (POS),HL
 LD A,78H
 LD (FAR),A
 CALL VERT
 DEFB 23H
 DEFM 'OK << J/N >> '
 DEFB 0
 LD A,(ASATZ+1)
 CP 40H
 CALL NC,HKD4
EINGB LD HL,(ASATZ)
 LD M,3
 INC HL
 LD (ASATZ),HL
 LD (SATZ1),HL
EINGC CALL WIN
 CALL WIN1
 LD HL,(POS1)
 LD (POS),HL
 CALL EINGA
 CALL ABF
 CP 4EH
 JR NZ,EINGD
 LD HL,(SATZ1)
 LD (ASATZ),HL
 JR EINGC
EINGD CALL POSI
 LD HL,(ASATZ)
 LD M,5
 INC HL
 LD (ASATZ),HL
 LD (SATZ1),HL
EINGE CALL WIN
 CALL WIN2
 LD HL,(POS1)
 LD (POS),HL
 CALL EINGA
 CALL ABF
 CP 4EH
 JR NZ,EINGF
 LD HL,(SATZ1)
 LD (ASATZ),HL
 JR EINGE
EINGF CALL POSI1
 LD HL,(POS1)
 LD A,H
 CP 12H
 JR C,EINGB
PRUEF1 CALL WDH
 JR EINGB
ABF CALL WIN
 LD HL,(POS)
 PUSH HL
 LD HL,0E12H
 LD (POS),HL
 LD A,30H
 LD (FAR),A
 LD HL,(ASATZ)
 EX DE,HL
 LD HL,3FFFH
 XOR A
 SBC HL,DE
 LD A,H
 CALL VERT
 DEFB 1CH
 LD A,L
 CALL VERT
 DEFB 1CH
 LD HL,1E0FH
 LD (POS),HL
 CALL ETAS
AFB POP HL
 LD (POS),HL
 CP 3
 RET NZ
 LD HL,(ASATZ)
 LD M,10H
 LD (SATZ1),HL
 POP HL
 JP MENU
UEBER CALL ZUSF
 LD HL,209H
 LD (POS),HL
 CALL HEH
 CALL VERT
 DEFB 23H
 DEFM 'UEBERSETZUNG'
 DEFB 0
 CALL HEH
 SUB A
 LD (ZAE1),A
HMA CALL HMA1
 CP 31H
 JR NZ,UEA
 LD A,3
 LD (SEL1),A
 LD A,5
 JR UEB1
UEA LD A,5
 LD (SEL1),A
 LD A,3
UEB1 LD (SEL3),A
UEB CALL EIN1
UEC LD HL,SATZ
 LD (SATZ1),HL
 SUB A
 LD (SEL2),A
 CALL WIN
 LD A,(SEL1)
 CP 3
 JR NZ,UED
 CALL WIN1
 JR UEF
UED CALL WIN2
UEF LD HL,(POS1)
 LD (POS),HL
 LD HL,KASPU
 LD C,54
 CALL LININ
 LD M,10H
 CALL AFS
UE1 LD HL,(SATZ1)
 CALL UMO
 LD A,M
 CP 10H
 JP Z,UEE
 LD A,(SEL1)
 CPI
 JR Z,UE2
 LD (SATZ1),HL
 JR UE1
UE2 LD HL,KASPU
 EX DE,HL
UE3 LD HL,(SATZ1)
 INC HL
 LD (SATZ1),HL
 PUSH DE
 CALL UMO
 POP DE
 LD A,(DE)
 CP 10H
 JR Z,UE4
 CPI
 JR NZ,UEL
 INC DE
 JR UE3
UEL DEC HL
UEK LD A,M
 CP 2CH
 LD (SATZ1),HL
 JR Z,UE2
 CP 10H
 JP Z,UEE
 CALL UMO
 LD A,(SEL3)
 CPI
 JR NZ,UEK
 JR UE1
UE4 LD A,(SEL1)
 CP 3
 JR Z,UE5
 LD A,M
 CP 2CH
 JR Z,UE6
 CP 10H
 JR Z,UE6
 LD A,(SEL3)
 CPI
 JR Z,UE6
 JP UE1
UE6 LD HL,(SATZ1)
 LD A,H
 CP 3FH
 JR NZ,UE7
 LD A,(STBY)
 CP 43H
 JR Z,UE7
 SUB 40H
 LD (STBY),A
 CALL MODU
 LD HL,7FFFH
 LD (SATZ1),HL
UE7 DEC HL
 LD (SATZ1),HL
 LD A,(SEL3)
 CPI
 JR NZ,UE6
 JR UA2
UE5 LD A,M
 CP 2CH
 JR Z,UA1
 LD A,(SEL3)
 CPI
 LD (SATZ1),HL
 JR Z,UA2
 JP UE1
UA1 LD HL,(SATZ1)
 CALL UMO
 LD A,(SEL3)
 CPI
 LD (SATZ1),HL
 JR NZ,UA1
UA2 CALL POSI
 LD A,1
 LD (SEL2),A
 LD A,(SEL1)
 CP 3
 JR NZ,UEG
 CALL WIN
 CALL WIN2
 JR UEH
UEG CALL WIN
 CALL WIN1
UEH LD HL,(POS1)
 LD (POS),HL
UEI LD HL,(SATZ1)
 CALL UMO
 LD A,M
 CP 10H
 JR Z,UEE2
 CALL AUSG
 LD A,(SEL1)
 CPI
 LD (SATZ1),HL
 LD (SATZ2),HL
 JR Z,UEE2
 JR UEI
UEE2 CALL POSI1
 LD A,(ZAE1)
 CP 1
 JP Z,LOE1
 LD HL,(SATZ1)
 LD A,(SEL1)
 CP 5
 JR NZ,UEE3
UEE4 CPI
 JR Z,UEE3
 PUSH AF
 LD A,M
 CP 10H
 JR Z,UEE
 POP AF
 JR UEE4
UEE3 DEC HL
 LD (SATZ1),HL
UEE LD A,(SEL2)
 CP 1
 JR NZ,UEY
 LD A,M
 CP 10H
 JP NZ,UE1
UEE1 CALL ABF1
 LD HL,(POS1)
 LD A,H
 CP 12H
 CALL NC,WDH
 JP UEC
UEY LD A,(SEL1)
 CP 3
 JR NZ,UEX
 CALL WIN
 CALL WIN2
 JR UEQ
UEX CALL WIN
 CALL WIN1
UEQ CALL POSI
 LD HL,(POS1)
 LD (POS),HL
 LD A,44H
 LD (FAR),A
 CALL VERT
 DEFB 23H
 DEFM 'NICHT GEFUNDEN!!!!'
 DEFB 0
 CALL POSI1
 JR UEE1
LIS CALL ZUSF
 LD HL,20BH
 LD (POS),HL
 CALL HEH
 CALL VERT
 DEFB 23H
 DEFM 'LISTEN'
 DEFB 0
 CALL HEH
 CALL EIN1
 LD HL,1D02H
 LD (POS),HL
 CALL VERT
 DEFB 23H
 DEFM 'DRUCK << J/N >> '
 DEFB 0
 CALL ETAS
 CP 4AH
 JP Z,DRU
LIS1 LD HL,SATZ+1
 LD (SATZ1),HL
 CALL AFS
LIS2 CALL WIN
 CALL WIN1
 LD HL,(POS1)
 LD (POS),HL
 LD HL,(SATZ1)
LIS3 CALL UMO
 LD A,M
 INC HL
 LD (SATZ1),HL
 CP 5
 JR Z,LIS4
 CP 10H
 JR Z,LISB
 CALL AUSG
 JR LIS3
LIS4 CALL POSI
LIS5  CALL WIN
 CALL WIN2
 LD HL,(POS1)
 LD (POS),HL
LIS6 LD HL,(SATZ1)
 CALL UMO
 LD A,M
 INC HL
 LD (SATZ1),HL
 CP 3
 JR Z,LIS7
 CP 10H
 JR Z,LISB
 CALL AUSG
 JR LIS6
LIS7 CALL POSI1
 LD HL,(POS1)
 LD A,H
 CP 12H
 JR NC,WDHA
 JP LIS2
WDHA CALL ABF1
 CALL WDH
 JP LIS2
ABF1 CALL WIN
 CALL ENT
 LD HL,1E0EH
 LD (POS),HL
ABF1B CALL ETAS
 CP 3
 JR NZ,ABF1A
 POP HL
 JP MENU
ABF1A CP 0DH
 JR NZ,ABF1B
 RET
LISB CALL ABF1
 CALL WDH
 JP LIS1
LER CALL ZUSF
 LD HL,20BH
 LD (POS),HL
 CALL HEH
 CALL VERT
 DEFB 23H
 DEFM 'LERNEN'
 DEFB 0
 CALL HEH
 SUB A
 LD (ZAE1),A
 LD (ZAE2),A
 CALL HMA1
 CP 31H
 JR NZ,LER1
 LD A,3
 LD (SEL1),A
 LD A,5
 JR LER2A
LER1 LD A,5
 LD (SEL1),A
 LD A,3
LER2A LD (SEL3),A
LER2 CALL EIN1
 CALL ENT
 LD HL,402H
 LD (POS),HL
 CALL VERT
 DEFB 23H
 DEFM 'GEFRAGT: 00           FALSCH: 00'
 DEFB 0
LER4 LD HL,SATZ
 LD (SATZ1),HL
 CALL AFS
 LD HL,1D02H
 LD (POS),HL
 LD A,38H
 LD (FAR),A
 CALL VERT
 DEFB 23H
 DEFM '          '
 DEFB 0
 LD A,(ZAE1)
 ADD 1
 DAA
 LD (ZAE1),A
 PUSH AF
 AND A,0F0H
 RLCA
 RLCA
 RLCA
 RLCA
 ADD 30H
 LD HL,40BH
 LD (POS),HL
 CALL AUSG
 POP AF
 AND A,0FH
 ADD 30H
 CALL AUSG
 LD A,(SEL1)
 CP 3
 JR NZ,LER5
 CALL WIN
 CALL WIN1
 JR LER6
LER5 CALL WIN
 CALL WIN2
LER6 LD HL,(POS1)
 LD (POS),HL
 SUB A
 LD (SEL2),A
 LD HL,(SATZ1)
 CALL ZUF
LWD LD A,(SEL1)
 CP 3
 JR NZ,LER7
 CALL WIN
 CALL WIN2
 LD HL,(SATZ1)
 JR LER8
LER7 CALL WIN
 CALL WIN1
 LD HL,(SATZ1)
 DEC HL
LER9 DEC HL
 LD A,M
 CP 3
 JR Z,LEA
 LD A,H
 CP 3FH
 JR NZ,LER9
 LD A,(STBY)
 CP 43H
 JR Z,LER9
 SUB 40H
 LD (STBY),A
 CALL MODU
 LD HL,7FFFH
 JR LER9
LEA INC HL
LER8 LD (SATZ1),HL
 CALL POSI
 LD HL,(POS1)
 LD (POS),HL
 CALL LEZ
 LD HL,KASPU
 LD C,54
 CALL LININ
 LD M,10H
LERC LD DE,KASPU
LERB LD HL,(SATZ1)
 LD A,(DE)
 CP 10H
 JP Z,LERH
 LD B,A
 PUSH BC
 INC DE
 PUSH DE
 CALL UMO
 POP DE
 POP BC
 LD A,M
 INC HL
 LD (SATZ1),HL
 CP B
 JR Z,LERB
LERD CALL UMO
 LD A,M
 LD (SATZ1),HL
 CP 2CH
 JR NZ,LERC1
 INC HL
 LD (SATZ1),HL
 JR LERC
LERC1 CP 10H
 JR Z,LERE
 LD A,(SEL1)
 CPI
 JR Z,LERE
 JR LERD
LERE LD A,(SEL2)
 CP 0
 JR Z,L1
 LD HL,(POS1)
 LD (POS),HL
 CALL LEZ
 JR LEE
L1 INC A
 LD (SEL2),A
 EXX
 PUSH AF
 LD A,7
 CALL VERT
 DEFB 0
 POP AF
 EXX
 CALL WIN
 LD HL,1D02H
 LD (POS),HL
 CALL VERT
 DEFB 23H
 DEFM 'WIE BITTE?'
 DEFB 0
LEE LD HL,(POS1)
 LD (POS),HL
 LD HL,(SATZ1)
LERF LD A,(SEL3)
 CPD
 LD (SATZ1),HL
 JR NZ,LERF
 INC HL
 INC HL
 LD (SATZ1),HL
 LD A,(SEL2)
 CP 2
 JP Z,LERG
 INC A
 LD (SEL2),A
 LD A,(SEL1)
 CP 3
 JP Z,LWD
 INC HL
 LD (SATZ1),HL
 JP LWD
LERG LD A,M
 CP 10H
 JR Z,LEH1
 CALL AUSG
 EXX
 PUSH AF
 LD A,7
 CALL VERT
 DEFB 0
 POP AF
 EXX
 LD A,(SEL1)
 CPI
 JR NZ,LERG
LEH1 CALL POSI1
 CALL WIN
 LD A,(ZAE2)
 ADD 1
 DAA
 LD (ZAE2),A
 PUSH AF
 AND A,0F0H
 RLCA
 RLCA
 RLCA
 RLCA
 ADD 30H
 LD HL,420H
 LD (POS),HL
 CALL AUSG
 POP AF
 AND A,0FH
 ADD 30H
 CALL AUSG
 JR LR1
LERH LD A,M
 CP 2CH
 JR Z,LEHA
 CP 10H
 JR Z,LEHA
 LD B,A
 LD A,(SEL1)
 CP B
 JP NZ,LERD
LEHA CALL POSI1
LR1 CALL ABF1
 LD HL,(POS1)
 LD A,H
 CP 12H
 CALL NC,WDH
 JP LER4
SAVE CALL ZUSF
 LD HL,20BH
 LD (POS),HL
 CALL HEH
 CALL VERT
 DEFB 23H
 DEFM 'RETTEN'
 DEFB 0
 CALL HEH
 CALL DISK
 CP 4EH
 JR Z,KAS
 CALL DISK1
KAS LD HL,502H
 LD (POS),HL
 CALL NAM
 LD HL,700H
 LD (POS),HL
 LD HL,SATZ
 LD D,2
SAVE4 LD B,128
SAVE3 DEC B
 LD A,B
 CP 0
 CALL Z,SAVE5
 LD A,10H
 CPI
 JR NZ,SAVE3
 LD A,D
 LD (118H),A
 LD HL,FELD
 LD (IX+5),L
 LD (IX+6),H
 LD BC,100H
 CALL VERT
 DEFB 8
 CALL AUSS
 LD HL,KASPU
 LD (IX+5),L
 LD (IX+6),H
 LD HL,SATZ
SAVE2 LD BC,129
 LD DE,KASPU
SAVEA LDI
 LD A,M
 CP 10H
 JR Z,SAVE1
 DJNZ SAVEA
 LD BC,100H
 PUSH HL
 CALL VERT
 DEFB 1
 CALL AUSS
 POP HL
 JR SAVE2
SAVE1 LDI
 LD BC,100H
 CALL VERT
 DEFB 9
 CALL AUSS
 JP MENU
SAVE5 INC D
 LD B,128
 RET
LOAD CALL ZUSF
 LD HL,20CH
 LD (POS),HL
 CALL HEH
 CALL VERT
 DEFB 23H
 DEFM 'LADEN'
 DEFB 0
 CALL HEH
 CALL DISK
 CP 4EH
 JR Z,LA1
 CALL DISK1
LA1 LD HL,502H
 LD (POS),HL
 CALL NAM
 LD HL,700H
 LD (POS),HL
 LD HL,KASPU
 LD (IX+5),L
 LD (IX+6),H
 PUSH HL
 LD HL,FELD
 PUSH HL
 CALL VERT
 DEFB 0AH
 POP HL
 JR NC,LO7
 POP HL
 JP MENU
LO7 LD B,8
 LD HL,KASPU
LOAD1 LD A,M
 CALL AUSG
 INC HL
 DJNZ LOAD1
 LD HL,800H
 LD (POS),HL
 LD B,8
 LD DE,FELD
 POP HL
LOAD2 LD A,(DE)
 PUSH BC
 INC DE
 CPI
 POP BC
 JP Z,WEI
 CALL VERT
 DEFB 0BH
 CALL VERT
 DEFB 19H
 CALL ETAS
 JP MENU
WEI DJNZ LOAD2
 LD HL,KASPU+8
 LD DE,FEL1
 LD BC,11H
 LDIR
 LD HL,3F80H
LOAD3 LD DE,80H
 ADD HL,DE
 LD (IX+5),L
 LD (IX+6),H
 CALL VERT
 DEFB 5
 CALL C,FBL
 CALL AUSS
 LD A,(IX+2)
 CP 0FFH
 JR Z,LOAD5
 LD B,A
 LD A,(118H)
 CP B
 JR NZ,LOAD3
LOAD5 CALL VERT
 DEFB 0BH
LA2 LD HL,4000H
 LD DE,(ASATZ)
 LD A,1
 LD (SEL),A
 LD A,(STB1)
 LD (STBY),A
 CALL MODU
LOAD6 EI
LOA1 LDI
 LD A,D
 CP 40H
 JR Z,LOA2
 CP 0C0H
 JR Z,LOA3
LOA5 LD A,M
 CP 10H
 JR NZ,LOA1
 LD (DE),A
 DI
 CALL KOP1
 LD (ASATZ),DE
 LD (SATZ1),DE
 LD A,(STBY)
 LD (STB1),A
 LD HL,4000H
 LD M,0
 LD DE,4001H
 LD BC,3FFFH
 LDIR
 JP MENU
LOA2 LD DE,8000H
 JR LOA1
LOA3 DI
 CALL KOP1
 LD A,(STBY)
 ADD 40H
 CP 43H
 JR NZ,LOA4
 CALL MODU
 EI
 DEC DE
 EX DE,HL
 LD M,10H
 DI
 CALL KOP1
 LD A,(STBY)
 LD (STB1),A
 LD (ASATZ),HL
 LD (SATZ1),HL
 LD HL,4000H
 LD DE,4001H
 LD BC,3FFH
 LDIR
 CALL HKD4
LOA4 LD (STBY),A
 CALL MODU
 EI
 LD DE,8000H
 JR LOA5
FBL LD A,(IX+2)
 PUSH AF
FBL1 LD A,(IX+2)
 CALL VERT
 DEFB 1CH
 CALL VERT
 DEFB 23H
 DEFM '* '
 DEFB 0
 CALL VERT
 DEFB 5
 PUSH AF
 LD A,(IX+13)
 CP 3
 JR Z,FBLB
 POP AF
 JR C,FBL1
 POP AF
 LD B,A
 PUSH AF
 LD A,(IX+2)
 CP B
 JR Z,FBL2
 JR FBL1
FBLB POP AF
 POP AF
 LD M,10H
 POP HL
 JP LOAD5
FBL2 POP AF
 RET
ZUF CALL UMO
 LD A,10H
 CPI
 JR Z,ZUF1
 LD A,(IX+13)
 CP 20H
 JR NZ,ZUF
 JR ZUF4
ZUF1 LD A,43H
 LD (STBY),A
 CALL MODU
 LD HL,SATZ
 LD (SATZ1),HL
 JR ZUF
ZUF4 CALL UMO
 LD A,M
 CP 10H
 JR NZ,ZUFA
 LD HL,SATZ
ZUFA LD A,(SEL1)
 CPI
 LD (SATZ1),HL
 JR NZ,ZUF4
ZUF5 LD A,M
 CP 10H
 JR Z,ZUFC
 CALL AUSG
 LD A,(SEL3)
 CPI
 JR NZ,ZUF5
ZUFC LD (SATZ1),HL
 CALL ETAS
 RET
SUCH CALL ZUSF
 LD HL,20BH
 LD (POS),HL
 CALL HEH
 CALL VERT
 DEFB 23H
 DEFM 'SUCHEN'
 DEFB 0
 CALL HEH
 CALL HMA1
 CP 31H
 JR NZ,SU1
 LD A,3
 LD (SEL1),A
 LD A,5
 JR SU2A
SU1 LD A,5
 LD (SEL1),A
 LD A,3
SU2A LD (SEL3),A
SU2 LD HL,1002H
 LD (POS),HL
 CALL VERT
 DEFB 23H
 DEFM 'VOKABEL? '
 DEFB 0
 LD HL,KASPU
 LD C,54
 CALL LININ
 LD M,0
 CALL EIN1
 CALL ENT
 LD A,(KASPU)
 CP 0
 JP Z,SUJ
SUZ CALL AFS
 LD HL,SATZ
 LD (SATZ1),HL
SUM LD A,(SEL1)
 CPI
 JR Z,SUM1
 CALL UMO
 JR SUM
SUM1 DEC HL
SUA CPI
SUB LD DE,KASPU
SUC PUSH DE
 CALL UMO
 POP DE
 LD A,(DE)
 INC DE
 CP 0
 JR Z,SUD
 CPI
 JR Z,SUC
SUE CALL UMO
 LD A,M
 CP 2CH
 JR Z,SUA
 CP 10H
 JP Z,SUJ
 LD A,(SEL3)
 CPI
 JR NZ,SUE
SUO CALL UMO
 LD A,(SEL1)
 CPI
 JR Z,SUB
 LD A,M
 CP 10H
 JR NZ,SUO
 JP SUJ
SUD DEC HL
SUN LD A,H
 CP 3FH
 JR NZ,SUF
 LD A,(STBY)
 CP 43H
 JR Z,SUF
 SUB 40H
 LD (STBY),A
 CALL MODU
 LD HL,7FFFH
 LD (SATZ1),HL
SUF LD A,3
 CPD
 JR NZ,SUN
 INC HL
 INC HL
 PUSH HL
 CALL WIN
 CALL WIN1
 LD HL,(POS1)
 LD (POS),HL
 POP HL
 CALL UMO
SUG LD A,M
 CP 5
 JR Z,SUH
 CP 10H
 JP Z,SUJ
 CALL AUSG
 INC HL
 CALL UMO
 JR SUG
SUH PUSH HL
 CALL POSI
 CALL WIN
 CALL WIN2
 LD HL,(POS1)
 LD (POS),HL
 POP HL
SUI INC HL
 CALL UMO
 LD A,M
 CALL AUSG
 CP 10H
 JR Z,SUJ
 CP 3
 JR NZ,SUI
 LD (SATZ1),HL
 CALL POSI1
 LD A,H
 CP 12H
 JR C,SUL
 CALL ABF1
 CALL WDH
SUL LD HL,(SATZ1)
 JP SUM
SUJ CALL ABF1
 JP SUCH
LOE CALL ZUSF
 LD HL,20BH
 LD (POS),HL
 CALL HEH
 CALL VERT
 DEFB 23H
 DEFM 'LOESCHEN'
 DEFB 0
 CALL HEH
 LD A,1
 LD (ZAE1),A
 JP HMA
LOE1 LD A,(SEL2)
 CP 1
 JP NZ,UEE1
 CALL WIN
 LD HL,1D02H
 LD (POS),HL
 CALL VERT
 DEFB 23H
 DEFM 'LOESCHEN J/N '
 DEFB 0
 CALL ETAS
 CP 4EH
 JP Z,UEE1
 LD HL,(SATZ2)
 DEC HL
LOE2 DEC HL
 LD A,M
 CP 3
 JR NZ,LOE2
 LD D,H
 LD E,L
LOE3 INC HL
 LD A,M
 CP 3
 JR Z,LOE4
 CP 10H
 JR Z,LOE3B
 JR LOE3
LOE4 LDI
 LD A,M
 CP 10H
 JP NZ,LOE4
LOE3B LD (DE),A
 EX DE,HL
 LD (ASATZ),HL
 JP UEE1
;
;ENDE HAUPTPROGRAMM
;
;
 DEFB 44H
 DEFB 45H
 DEFB 56H
 DEFB 45H
 DEFB 58H
 DEFB 2EH
 DEFB 4BH
 DEFB 43H
DEVEX DEFB 43H
;
;
SATZ EQU $
;
;
UMAR LD HL,ENDE
 LD DE,0BA00H
 LD BC,11FH
 LDIR
 LD HL,END
 LD DE,0BE1EH
 LD BC,1E1H
 LDIR
 LD HL,DISK2
 LD DE,0BB20H
 LD BC,0A4H
 LDIR
 JP AFG1
;
;
;
;
; ANFANG UNTERPROGRAMME VERSCHOBEN AUF
; BD00H
;
;AFS
;
ENDE LD A,43H
 LD (STBY),A
 CALL MODU
 RET
;
;UMO
;
 LD A,H
 CP 80H
 CALL Z,UMODU
 RET
;
;DRU
;
 LD HL,SATZ
 CALL AFS
DRB LD B,15H
DR1 PUSH BC
 LD B,54
DR2 PUSH BC
 CALL UMO
 LD A,M
 CP 5
 JR Z,DR3
 CALL PRINT
 INC HL
 POP BC
 DJNZ DR2
DR3 POP BC
DRC PUSH BC
 LD A,20H
 CALL PRINT
 POP BC
 DJNZ DRC
DR4 INC HL
 CALL UMO
 LD A,M
 CP 10H
 JR Z,DR5
 CP 3
 JR Z,DR6
 CALL PRINT
 JR DR4
DR5 POP BC
 LD A,0AH
 CALL PRINT
 LD A,0DH
 CALL PRINT
 JP MENU
DR6 LD A,0AH
 CALL PRINT
 LD A,0DH
 CALL PRINT
 POP BC
 DJNZ DR1
 EX DE,HL
 CALL ABF1
 EX DE,HL
 JR DRB
;
;WIN
;
 LD HL,0000H
 LD (FEA),HL
 LD HL,2028H
 LD (FEE),HL
 RET
;
;WIN1
;
 LD HL,700H
 LD A,39H
 JR WIN21
;
;ZUSF
;
 CALL WIN
 LD A,78H
 LD (FAR),A
 CALL CLS
 RET
;
;HEH
;
 CALL VERT
 DEFB 23H
 DEFM ' === '
 DEFB 0
 RET
;
;NAM
;
 CALL VERT
 DEFB 23H
 DEFM 'NAME: '
 DEFB 0
 LD HL,FELD+7
 LD M,0
 LD DE,FELD+6
 LD BC,7
 LDDR
 LD C,8
 CALL LININ
 RET
;
;WIN2
;
 LD HL,716H
 LD A,3AH
WIN21 LD (FEA),HL
 LD HL,1512H
 LD (FEE),HL
 LD (FAR),A
 RET
;
;AUSG
;
 CALL VERT
 DEFB 0
 RET
;
;DEU
;
 LD HL,502H
 LD (POS),HL
 CALL VERT
 DEFB 23H
 DEFM 'DEUTSCH'
 DEFB 0
 LD HL,518H
 LD (POS),HL
 LD HL,FEL1
DE1 LD A,M
 CALL AUSG
 INC HL
 CP 0
 JR NZ,DE1
 RET
;
;ENT
;
 LD A,78H
 LD (FAR),A
 LD HL,1E02H
 LD (POS),HL
 CALL VERT
 DEFB 23H
 DEFM '<< ENTER >>       ABBRUCH <BRK>'
 DEFB 0
 RET
;
;LEZ
;
END PUSH HL
 PUSH BC
 LD B,54
LEZ1 CALL VERT
 DEFB 2BH
 DJNZ LEZ1
 POP BC
 POP HL
 LD (POS),HL
 RET
;
;ETAS
;
 CALL VERT
 DEFB 4
 CP 16H
 RET NZ
 CALL AUSG
 JP ETAS
;
;CLS
;
 LD A,0CH
 CALL AUSG
 RET
;
;LININ
;
 LD A,C
 LD (S11),A
LEO PUSH HL
 CALL ETAS
 POP HL
 CP 0DH
 RET Z
 CP 8
 JR NZ,LE1
 LD A,(S11)
 CP C
 JR Z,LEO
 INC C
 LD A,8
 CALL AUSG
 DEC HL
 JR LEO
LE1 CP 9
 JR NZ,LE2
 CALL AUSG
 INC HL
 DEC C
 RET Z
 JR LEO
LE2 CP 20H
 JR C,LEO
 LD M,A
 CALL AUSG
 INC HL
 LD A,L
 CP 0FFH
 JR Z,HKD
HKD1 DEC C
 JR NZ,LEO
 RET
HKD LD A,H
 CP 3FH
 JR NZ,HKD1
 LD M,10H
 INC HL
 LD (ASATZ),HL
;
;HKD4
;
 CALL VERT
 DEFB 0BH
 LD HL,(ASATZ)
 DEC HL
 LD M,10H
 POP HL
 CALL WIN
 LD HL,1D02H
 LD (POS),HL
 LD A,0A0H
 LD (FAR),A
 CALL VERT
 DEFB 23H
 DEFM 'SPEICHERENDE!!!'
 DEFB 0
 LD HL,0E12H
 LD (POS),HL
 LD A,30H
 LD (FAR),A
 CALL VERT
 DEFB 23H
 DEFM '0000'
 DEFB 0
 LD B,3
WAIT PUSH BC
 LD A,7
 CALL AUSG
 LD A,0FFH
 CALL VERT
 DEFB 14H
 POP BC
 DJNZ WAIT
 JP MENU
;
;DEBL
;
 CALL WIN
 LD A,20H
 LD (FAR),A
 LD A,43H
 LD (STBY),A
 LD (STB1),A
 IN A,(89H)
 SET 5,A
 SET 6,A
 OUT (89H),A
 CALL MODU
 LD HL,SATZ
 LD (ASATZ),HL
 LD (SATZ1),HL
 RET
;
;EIN1
;
 CALL WIN
 CALL DEU
;
;WDH
;
 CALL WIN1
 CALL CLS
 CALL WIN
 CALL WIN2
 CALL CLS
 CALL WIN
 LD HL,0
 LD (POS1),HL
 LD (POS2),HL
 RET
;
;POSI
;
 LD HL,(POS)
 INC H
 LD A,H
 LD (POS2),A
 RET
;
;POSI1
;
 LD HL,(POS)
 INC H
 LD B,H
 LD A,(POS2)
 SUB B
 JR NZ,POSI2
POSI3 LD L,0
 LD (POS1),HL
 RET
POSI2 JP M,0BF39H	;POSI3
 LD A,(POS2)
 LD H,A
 JR POSI3
;
;AUSS
;
 LD A,(IX+2)
 CALL VERT
 DEFB 1CH
 CALL VERT
 DEFB 23H
 DEFM '> '
 DEFB 0
 RET
;
;PRINT
;
 PUSH HL
 CALL VERT
 DEFB 2
 POP HL
 RET
;
;UMODU
;
 LD A,(STBY)
 ADD 40H
 LD (STBY),A
 CP 43H
 JP Z,HKD4
 CALL MODU
 LD HL,4000H
 LD (SATZ1),HL
 RET
;
;HMA1
;
 LD HL,0A02H
 LD (POS),HL
 CALL VERT
 DEFB 23H
 DEFM '1. DEUTSCH'
 DEFW 0D0AH
 DEFM '     FREMDSPRACHE'
 DEFW 0D0AH
 DEFW 0D0AH
 DEFM '  2. FREMDSPRACHE'
 DEFW 0D0AH
 DEFM '     DEUTSCH'
 DEFW 0D0AH
 DEFW 0D0AH
 DEFM '  '
 DEFB 0
 CALL ETAS
 RET
;
;EINGA
;
 LD HL,(ASATZ)
 LD C,54
 CALL LININ
 LD (ASATZ),HL
 RET
;
;AFG1
;
 LD HL,SATZ
 LD M,0
 LD DE,SATZ+1
 LD BC,3000H
 LDIR
 JP AFG
;
;DISK
;
DISK2 LD HL,1002H
 LD (POS),HL
 CALL VERT
 DEFB 23H
 DEFM 'DISKETTE (J/N)? '
 DEFB 0
 CALL ETAS
 RET
;
;DISK1
;
 SUB A
 LD (ARGN),A
 LD HL,DEVEX
 LD DE,9
 LD BC,9
 LDDR
 INC DE
 EX DE,HL
 CALL 36H
 RET
;
;ENDE UNTERPROGRAMME
;
;***************************************
;                E N D E
ÿÿÿÿÿÿÿÿ