                ORG 100H
                .RADIX 16D
                LD SP,100
                LD A,-1
                OUT (0B2H),A
VISSZA          LD DE,DTL
                LD A,1
                EXOS 1
                AND A
                JR NZ,VISSZA
                INC A
                LD DE,FEJPUFF
                PUSH DE
                EXOS 29D
                EXOS 22D
                POP IX
                LD L,(IX+2)
                LD H,(IX+3)
                AND A
                EX DE,HL
                SBC HL,DE
                DEC H
                JP M HIBA
                INC H
                DEC HL
                SET 7,H
                PUSH HL
                EX DE,HL
                LD A,1
                EXOS 30D
                AND A
                JP NZ,HIBA
                LD A,1
                EXOS 3
                LD A,0FBH
                OUT (0B3H),A
                DEC A
                OUT (0B2H),A
                LD A,0FDH
                OUT (0B1H),A
                LD HL,TOMO
                LD DE,60H
                LD BC,80H
                LDIR
                POP HL
                LD (DTLCIM),HL
                LD DE,FILENAME
                LD A,1
                EXOS 1
                LD A,0C3H
                LD HL,DTROB
                LD (28H),A
                LD (29H),HL
                LD SP,100
                LD DE,100H
                JP 60H
FEJPUFF         DEFS 16D
DTL             DEFB 8,"TAPE:DTL"
FILENAME        DEFB 5,"TAPE:"
HIBA            DI
VILL            INC A
                OUT (81H),A
                JR VILL
TOMO EQU $
                .PHASE 60H
                CALL BYTEROB
                JP 100H
BYTEROB         JP BROBB
SZEGTAR         EQU 20H
DTROB           LD HL,SZEGTAR
                DI
                LD BC,4AFH
DTROB1          INC C
                INI
                JR NZ DTROB1
                LD A,-1
                OUT (0B2H),A
DTLCIM          EQU $+1
                CALL 0
                LD A,(SZEGTAR+2)
                OUT (0B2H),A
                RET
BROBB   push de ;celcim
                LD A,1
                EXOS 5
                LD L,B
                LD A,1
                EXOS 5
                LD C,L
                POP DE
                PUSH BC
                PUSH DE
        ld hl,0
        and a
        sbc hl,bc
        ex de,hl
        push de
        ld a,1
        exos 6
        pop hl
        ld a,(hl)
        inc hl    ;forras
        EX AF,AF'
 ;      ld hl,forras
        pop de
 ;      ld de,cel
        pop bc
        dec bc
 ;      ld bc,hossz
cik     EX AF,AF'
        cp (hl)
        jr nz,sima
                EX AF,AF'
        inc hl
        push bc
        ld b,(hl)
        inc hl
        ld a,(hl)
rak     ld (de),a
        inc de
        djnz rak
        pop bc
        dec bc
        dec bc
        jr tov
SIMA    EX AF,AF'
        ld a,(hl)
        ld (de),a
        inc de
tov     inc hl
        dec bc
        ld a,b
        or c
        jr nz,cik
TOMOVEG RET
        .DEPHASE
VEGE            NOP
UJSTACK         EQU     $+40
