CBM Kernal V2 Disassembly
Suche
Index
FAQ
Kontakt
Zurück
; da65 V2.13.9 - (C) Copyright 2000-2009,  Ullrich von Bassewitz
; Created:    2014-01-26 12:06:00
; Input file: kernal-2.901465-03.bin
; Page:       1
; 
; Dynamic PET Basic 2.0 Kernal
;
; Re-assembly: M. Sachse ; 26.Jan.2014  
; http://www.cbmhardware/de
;
; Source optimized for using with ACME Assembler
;
;

!to "kernal-2.901465-03.bin",plain

*=$f000

L0011           = $0011
L0076           = $0076
L03FA           = $03FA
L2020           = $2020
L4243           = $4243
L4341           = $4341
L4920           = $4920
L5020           = $5020
L5053           = $5053
L5253           = $5253
L5258           = $5258
L5259           = $5259
LC377           = $C377
LC389           = $C389
LC439           = $C439
LC590           = $C590
LC5A7           = $C5A7
LCC8B           = $CC8B
LCC9F           = $CC9F
LCDF8           = $CDF8
LCE03           = $CE03
LD57D           = $D57D
LD678           = $D678
LD6D2           = $D6D2
LE116           = $E116
LE1DE           = $E1DE
LE285           = $E285
LE2F4           = $E2F4
LE3D8           = $E3D8
LE6E4           = $E6E4
LE76A           = $E76A
LE775           = $E775
LE784           = $E784
LE797           = $E797
LE7A7           = $E7A7
LE7B6           = $E7B6
LE7EB           = $E7EB
LE7F7           = $E7F7

ERRORS: !byte $54,$4F,$4F,$20,$4D,$41,$4E,$59,$20,$46,$49,$4C,$45,$D3,$46,$49 ; TOO MANY FILE.FI
        !byte $4C,$45,$20,$4F,$50,$45,$CE,$46,$49,$4C,$45,$20,$4E,$4F,$54,$20 ; LE OPE.FILE NOT 
        !byte $4F,$50,$45,$CE,$46,$49,$4C,$45,$20,$4E,$4F,$54,$20,$46,$4F,$55 ; OPE.FILE NOT FOU
        !byte $4E,$C4,$0D,$53,$45,$41,$52,$43,$48,$49,$4E,$47,$A0,$46,$4F,$52 ; N..SEARCHING.FOR
        !byte $A0,$0D,$50,$52,$45,$53,$53,$20,$50,$4C,$41,$59,$A0,$26,$20,$52 ; ..PRESS PLAY.& R
        !byte $45,$43,$4F,$52,$44,$A0,$4F,$4E,$20,$54,$41,$50,$45,$20,$A3,$0D ; ECORD.ON TAPE ..
        !byte $4C,$4F,$41,$C4,$0D,$57,$52,$49,$54,$49,$4E,$47,$A0,$0D,$56,$45 ; LOA..WRITING..VE
        !byte $52,$49,$46,$D9,$44,$45,$56,$49,$43,$45,$20,$4E,$4F,$54,$20,$50 ; RIF.DEVICE NOT P
        !byte $52,$45,$53,$45,$4E,$D4,$4E,$4F,$54,$20,$49,$4E,$50,$55,$54,$20 ; RESEN.NOT INPUT 
        !byte $46,$49,$4C,$C5,$4E,$4F,$54,$20,$4F,$55,$54,$50,$55,$54,$20,$46 ; FIL.NOT OUTPUT F
        !byte $49,$4C,$C5,$0D,$46,$4F,$55,$4E,$44,$A0,$0D,$4F,$4B,$8D,$0D,$52 ; IL..FOUND..OK..R
        !byte $45,$41,$44,$59,$2E,$8D                                         ; EADY.. 
;$F0B6: SENDS TALK
TALK:   lda     #$40
        bne     LF0BC
; $F0BA: SENDS LISTEN
LISTEN: lda     #$20
LF0BC:  pha
        lda     $E840
        ora     #$02
        sta     $E840
        lda     #$3C
        sta     $E821
        bit     $A0          ; flag
        beq     LF0DF
        lda     #$34
        sta     $E811
        jsr     ISOUR
        lda     #$00
        sta     $A0
        lda     #$3C
        sta     $E811
LF0DF:  pla
        ora     $D4
        sta     $A5
LF0E4:  lda     $E840
        bpl     LF0E4
        and     #$FB
        sta     $E840
; $F0EE: SENDS CHAR (FROM $A5) TO IEEE-BUS
ISOUR:  lda     #$3C
        sta     $E823
        lda     $E840
        and     #$41
        cmp     #$41
        beq     ERRP7
        lda     $A5
        eor     #$FF
        sta     $E822
LF103:  bit     $E840
        bvc     LF103
        lda     #$34
        sta     $E823
        lda     #$FF
        sta     $E845
LF112:  lda     $E840
        bit     $E84D
        bvs     ERRPO
        lsr
        bcc     LF112
LF11D:  lda     #$3C
        sta     $E823
        lda     #$FF
        sta     $E822
        rts

; $F128: SENDS SEC-ADR (FROM AC) TO IEEE-BUS
SECND:  sta     $A5
        jsr     ISOUR
; $F12D: STOPS ATN ON IEEE-BUS
SCATN:  lda     $E840
        ora     #$04
        sta     $E840
        rts

; $F136: ERROR-HANDLING ON IEEE-BUS
ERRPO:  lda     #$01
LF138:  jsr     LFB7F
        bne     LF11D
ERRP7:  lda     #$80
        bmi     LF138
LF141:  lda     #$02
        jsr     LFB7F
LF146:  lda     $E840
        and     #$FD
        sta     $E840
        lda     #$34
        sta     $E821
        lda     #$0D
        rts

; $F156: DISPLAY ERROR
MSG:    lda     ERRORS,y
        php
        and     #$7F
        jsr     LE3D8        ; display character
        iny
        plp
        bpl     MSG
        rts

; $F164: LISTEN AND SEC-ADR TO IEEE-BUS
TKSA:   sta     $A5
        jsr     ISOUR
LF169:  jsr     LF146
        jmp     SCATN

; $F16F: SENDS CHAR FROM AC TO IEEE-BUS
CIOUT:  bit     $A0
        bmi     LF177
        dec     $A0
        bne     LF17C
LF177:  pha
        jsr     ISOUR
        pla
LF17C:  sta     $A5
        rts

; $F17F: SENDS UNTALK TO IEEE-BUS
UNTLK:  lda     #$5F
        bne     LF185
; $F183: SENDS UNLISTEN TO IEEE-BUS
UNLSN:  lda     #$3F
LF185:  nop
        nop
        jsr     LF0BC
        bne     SCATN
; $F18C: READS CHAR FROM IEEE-BUS TO AC
ACPTR:  lda     #$34
        sta     $E821
        lda     $E840
        ora     #$02
        sta     $E840
        lda     #$FF
        sta     $E845
LF19E:  bit     $E84D
        bvs     LF141
        bit     $E840
        bmi     LF19E
        lda     $E840
        and     #$FD
        sta     $E840
        bit     $E810
        bvs     LF1BA
        lda     #$40
        jsr     LFB7F
LF1BA:  lda     $E820
        eor     #$FF
        pha
        lda     #$3C
        sta     $E821
LF1C5:  bit     $E840
        bpl     LF1C5
        lda     #$34
        sta     $E821
        pla
        rts

; $F1D1: INPUT FROM KEYBOARD OR IEEE-BUS
GETIN:  lda     #$00
        sta     $96
        lda     $AF
        bne     LF1F0
        lda     $9E
        beq     LF22E
        sei
        jmp     LE285

; $F1E1: INPUT ONE CHAR
BASIN:  lda     $AF          ; input-device, $00:keyboard
        bne     LF1F0
        lda     $C6          ; cursor position: column
        sta     $A4          ; temporary mem for cursor column
        lda     $D8          ; cursor position: row
        sta     $A3          ; temporary mem for cursor row
        jmp     LE2F4        ; input from keyboard 

LF1F0:  cmp     #$03
        bne     LF1FD
        sta     $AC          ; flag for input
        lda     $D5          ; flag for one or two lines
        sta     $A1          ; temporary mem for line-length 
        jmp     LE2F4        ; input from keyboard

LF1FD:  bcs     LF228        
        stx     $AD
        jsr     LF215
        pha
        jsr     LF215
        bne     LF20F
        lda     #$40
        jsr     LFB7F
LF20F:  dec     $BA,x
        ldx     $AD
        pla
        rts

LF215:  jsr     JTP20
        bne     LF225
        jsr     TRBLK
        ldx     $D4          ; recoder-nr.
        lda     #$00
        sta     $BA,x
        beq     LF215
LF225:  lda     ($D6),y
        rts

LF228:  lda     $96
        beq     LF22F
        lda     #$0D
LF22E:  rts

LF22F:  jmp     ACPTR

; $F232: CHAR-OUTPUT ON SCREEN, TAPE, IEEE-BUS
BSOUT:  pha
        lda     $B0
        cmp     #$03
        bne     LF23D
        pla
        jmp     LE3D8

LF23D:  bmi     LF243
        pla
        jmp     CIOUT

LF243:  pla
LF244:  sta     $B4
        cmp     #$0A
        beq     LF22E
        pha
        txa
        pha
        tya
        pha
        jsr     JTP20
        bne     LF264
        jsr     TWBLK
        ldx     $D4
        lda     #$01
        sta     $BA,x
        ldy     #$00
        lda     #$02
        sta     ($D6),y
        iny
LF264:  lda     $B4
        sta     ($D6),y
LF268:  pla
        tay
        pla
        tax
        pla
        rts

; $F26E: COUNT OF OPEN FILES = 0
CLALL:  lda     #$00
        sta     $AE
; $F272: DEL IEEE-CHANNELS, BACK TO NORMAL I/O
CLRCH:  lda     $B0
        cmp     #$04
        bcc     LF27B
        jsr     UNLSN
LF27B:  lda     $AF
        cmp     #$04
        bcc     SETDV
        jsr     UNTLK
; $F284: SETS INPUT DEVICE:$00:KEYBOARD; OUTPUT:$03:SCREEN
SETDV:  lda     #$03
        sta     $B0
        lda     #$00
        sta     $AF
        rts

; $F28D: LOOKS FOR ENTRY IN FILENUMBER-TABLE
JLTLK:  ldx     $AE
LF28F:  dex
        bmi     LF2A8
        cmp     $0251,x
        beq     LF2A8
        bne     LF28F
; $F299: SETS FILENUMBER, SECONDARY AND PRIMARY ADR OF ACTUAL FILE
JZ100:  lda     $0251,x
        sta     $D2
        lda     $025B,x
        sta     $D4
        lda     $0265,x
        sta     $D3
LF2A8:  rts

; $F2A9: CLOSE
CLOSE:  jsr     PARS2
        lda     $D2
        jsr     JLTLK
        bne     LF300
        jsr     JZ100
        txa
        pha
        lda     $D4
        beq     LF2E4
        cmp     #$03
        beq     LF2E4
        bcs     LF2E1
        lda     $D3
        and     #$0F
        beq     LF2E4
        jsr     ZZZ
        lda     #$00
        jsr     LF244
        jsr     TWBLK
        lda     $D3
        cmp     #$62
        bne     LF2E4
        lda     #$05
        jsr     TAPEH
        jmp     LF2E4

LF2E1:  jsr     CLSEI
LF2E4:  pla
; $F2E5: DELETS FILE FROM TABLE
DELFL:  tax
        dec     $AE
        cpx     $AE
        beq     LF300
        ldy     $AE
        lda     $0251,y
        sta     $0251,x
        lda     $025B,y
        sta     $025B,x
        lda     $0265,y
        sta     $0265,x
LF300:  rts

; $F301: STOP-KEY TEST; Z-FLAG SET IF PRESSED
STOP1:  lda     $9B
        cmp     #$EF
        bne     LF30E
        php
        jsr     CLRCH
        sta     $9E
        plp
LF30E:  rts

; $F30F: STOP-KEY TEST; RETURN TO READY-MODE IF PRESSED
STOP:   jsr     STOP1
        jmp     $C73F

; $F315: REPRESS LOADING, VERFIFY 
REPR:   jsr     TXTST
        bne     LF30E
        jmp     MSG

; $F31D: TEST TO DIRECT-MODUS 
TXTST:  lda     $78
        cmp     #$02
        rts

; $F322: LOAD-ROUTINE
LD15:   lda     $D4
        bne     LF329
LF326:  jmp     LCE03

LF329:  cmp     #$03
        beq     LF326
        bcc     LF395
        lda     #$60
        sta     $D3          ; secundary address
        ldy     $D1          ; length of filename 
        bne     LF33A
        jmp     LCE03

LF33A:  jsr     LF40A
        jsr     OPCHN
        jsr     TALK
        lda     $D3          ; secundary address 
        jsr     SECND        ; send sec-address (from ac) to IEEE-bus
        jsr     ACPTR        ; read char from IEEE-bus to ac
        sta     $FB          ; save load-address lo
        jsr     ACPTR        ; read char from IEEE-bus to ac
        sta     $FC          ; save load-address hi  
        jsr     LD400        ; output loading 
LF355:  lda     #$FD       
        and     $96           
        sta     $96          ; save status 
        jsr     STOP         ; check for stop-key  
        jsr     ACPTR        ; read char from IEEE-bus to ac
        tax
        lda     $96          ; get status 
        lsr
        lsr
        bcs     LF355        ; read again         
        txa
        ldy     $9D          ; flag for load:$00 or verify:$01
        beq     LF378        
        dey
        cmp     ($FB),y
        beq     LF37A
        ldx     #$10
        stx     $96
        bne     LF37A
LF378:  sta     ($FB),y      
LF37A:  inc     $FB
        bne     LF380
        inc     $FC
LF380:  bit     $96
        bvc     LF355
        nop
        nop
        nop
        lda     $FB
        sta     $C9
        lda     $FC
        sta     $CA
        jsr     UNTLK        ; send untalk
        jmp     CLSEI        ; close IEEE-channel

LF395:  jsr     ZZZ
        jsr     CSTE1
        jsr     LF40A
LF39E:  lda     $D1
        beq     LF3AA
        jsr     FAF
        bne     LF3AF
LF3A7:  jmp     FLNOT

LF3AA:  jsr     SUFIHD
        beq     LF3A7
LF3AF:  cpx     #$01
        bne     LF39E
        lda     $96
        and     #$10
        bne     LF42D
        jsr     LDAD2
        jsr     LD400
        jmp     BLCKR1

LOAD:   lda     #$00
        sta     $9D
LF3C6:  jsr     PARS1
        jsr     SV60
        lda     #$FF
LF3CE:  cmp     $9B
        bne     LF3CE
        cmp     $9B
        bne     LF3CE
        jsr     LD15
        lda     $9D
        bne     LF42D
        jsr     TIRQ
        lda     $96
        and     #$10
        beq     LF3EF
        ldy     #$00
        sty     $9E
        ldy     #$60
        jmp     ERRMSG

LF3EF:  ldy     #$AE
        jsr     REPR
        jsr     TXTST
        bne     LF404
        lda     $CA
        sta     $2B
        lda     $C9
        sta     $2A
        jmp     LC439

LF404:  jsr     LC5A7
        jmp     LC590

LF40A:  jsr     TXTST
        bne     LF42D
; $F40F: OUTPUT SEARCHING OR SEARCHIG FOR
SERCH:  ldy     #$32
        jsr     MSG
        lda     $D1
        beq     LF42D
        ldy     #$3D
        jsr     MSG
; $F41D: OUTPUT FILENAME
FILNM:  ldy     $D1
        beq     LF42D
        ldy     #$00
LF423:  lda     ($DA),y
        jsr     LFFD2
        iny
        cpy     $D1
        bne     LF423
LF42D:  rts

; $F42E: OUTPUT LOADING OR VERIFY
LD400:  ldy     #$5F
        lda     $9D
        beq     LF436
        ldy     #$6D
LF436:  jsr     REPR
        ldy     #$39
        jmp     REPR

; $F42E: GET PARAMETER FOR LOAD/SAVE/VERIFY
PARS1:  ldx     #$00
        stx     $96
        stx     $D1
        stx     $D3
        inx
        stx     $D4
        jsr     LF50E
        jsr     LF4FD
        jsr     LF50E
        jsr     LF460
        stx     $D4
        jsr     LF50E
        jsr     LF460
        stx     $D3
LF45F:  rts

LF460:  jsr     PR150
        jmp     LD678

; $F466: OPEN CHANNEL (FOR LOAD/SAVE) TO IEEE_BUS
OPCHN:  lda     $D3
        bmi     LF45F
        ldy     $D1
        beq     LF45F
        jsr     LISTEN
        lda     $D3
        ora     #$F0
        jsr     SECND
        lda     $96
        bpl     LF481
; $F47C: DISPLAY DEVICE NOT PRESENT
DEVNT:  ldy     #$74         ; set offset to y-reg     
        jmp     ERRMSG       ; and get error-msg  

LF481:  lda     $D1
        beq     LF491
        ldy     #$00
LF487:  lda     ($DA),y
        jsr     CIOUT
        iny
        cpy     $D1
        bne     LF487
LF491:  jmp     UNLSN

; $F494: LOOK FOR TAPE FILE-HEADER
FAF:    jsr     SUFIHD
        beq     LF4B6
        ldy     #$05
        sty     $B5
        ldy     #$00
        sty     $B4
LF4A1:  cpy     $D1
        beq     LF4B5
        lda     ($DA),y
        ldy     $B5
        cmp     ($D6),y
        bne     FAF
        inc     $B4
        inc     $B5
        ldy     $B4
        bne     LF4A1
LF4B5:  tya
LF4B6:  rts

; $F4B7: VERIFY-ROUTINE
VER:    lda     #$01
        sta     $9D
        jsr     LF3C6
        lda     $96
        and     #$10
        beq     LF4C9
        ldy     #$6E
        jmp     ERRMSG

LF4C9:  ldy     #$AA
        jmp     MSG

; $F4CE: GET PARAMETER FROM BASIC-TEXT FOR OPEN/CLOSE
PARS2:  ldx     #$00
        stx     $D3
        stx     $96
        stx     $D1
        inx
        stx     $D4
        jsr     NXTCH
        jsr     LD678
        stx     $D2
        jsr     LF50E
        jsr     LF460
        stx     $D4
        cpx     #$03
        bcc     LF4EF
        dec     $D3
LF4EF:  jsr     LF50E
        jsr     LF460
        stx     $D3
        jsr     LF50E
        jsr     PR150
LF4FD:  jsr     LCC9F
        jsr     LD57D
        sta     $D1
        lda     $1F
        sta     $DA
        lda     $20
        sta     $DB
        rts

LF50E:  jsr     L0076
        bne     LF515
        pla
        pla
LF515:  rts

; $F516: CHECK FOR KOMMA ELSE SYNTAX ERROR
PR150:  jsr     LCDF8
; $F519: IF NEXT CHAR:$00 or <>':' SYNTAX ERROR
NXTCH:  jsr     L0076
        bne     LF515
LF51E:  jmp     LCE03

; $F521: OPEN-ROUTINE
OPEN:   jsr     PARS2
        lda     $D2
        beq     LF51E
; $F528: FILE OPEN-ERROR, FILE EXISTS
FLOPN:  ldy     #$0E
        jsr     JLTLK
        beq     ERRMSG
        ldx     $AE
        ldy     #$00
        sty     $96
        cpx     #$0A
        beq     ERRMSG
        inc     $AE
        lda     $D2
        sta     $0251,x
        lda     $D3
        ora     #$60
        sta     $D3
        sta     $0265,x
        lda     $D4
        sta     $025B,x
        beq     LF5A5
        cmp     #$03
        beq     LF5A5
        bcc     LF559
        jmp     OPCHN

LF559:  lda     $D3
        and     #$0F
        bne     LF58A
; $F55F: RECORD-SAVE-ROUTINE
RECSAV: jsr     CSTE1
        jsr     LF40A
        lda     $D1
        beq     LF583
        jsr     FAF
        bne     LF592
; $F56E: DISPLAY FILE NOT FOUND ERROR
FLNOT:  ldy     #$24
; $F570: DISPLAY ERROR MSG $F000,Y
ERRMSG: jsr     CLALL
        lda     #$0D
        jsr     LFFD2
        lda     #$3F
        jsr     LFFD2
        jsr     MSG
        jmp     LC377

LF583:  jsr     SUFIHD
        beq     FLNOT
        bne     LF592
LF58A:  jsr     LF847
        lda     #$04
        jsr     TAPEH
LF592:  ldx     $D4
        lda     #$BF
        ldy     $D3
        cpy     #$60
        beq     LF5A3
        ldy     #$00
        lda     #$02
        sta     ($D6),y
        tya
LF5A3:  sta     $BA,x
LF5A5:  rts

; $F5A6: LOOKS fOR NEXT TAPE FILE-HEADER
SUFIHD: lda     $9D
        pha
LF5A9:  jsr     TRBLK
        ldy     #$00
        lda     ($D6),y
        cmp     #$05
        beq     LF5D5
        cmp     #$01
        beq     LF5BC
        cmp     #$04
        bne     LF5A9
LF5BC:  tax
        jsr     TXTST
        bne     LF5D3
        ldy     #$A3
        jsr     MSG
        ldy     #$05
LF5C9:  lda     ($D6),y
        jsr     LFFD2
        iny
        cpy     #$15
        bne     LF5C9
LF5D3:  ldy     #$01
LF5D5:  pla
        sta     $9D
        tya
        rts

; $F5DA: WRITES TAPE FILE-HEADER
TAPEH:  sta     $B4
        jsr     ZZZ
        lda     $FC
        pha
        lda     $FB
        pha
        lda     $CA
        pha
        lda     $C9
        pha
; $F5EB: DELETS TAPE-BUFFER
DTBUF:  ldy     #$BF
        lda     #$20
LF5EF:  sta     ($D6),y
        dey
        bne     LF5EF
        lda     $B4
        sta     ($D6),y
        iny
        lda     $FB
        sta     ($D6),y
        iny
        lda     $FC
        sta     ($D6),y
        iny
        lda     $C9
        sta     ($D6),y
        iny
        lda     $CA
        sta     ($D6),y
        iny
        sty     $B5
        ldy     #$00
        sty     $B4
LF613:  ldy     $B4
        cpy     $D1
        beq     LF625
        lda     ($DA),y
        ldy     $B5
        sta     ($D6),y
        inc     $B4
        inc     $B5
        bne     LF613
LF625:  jsr     LDAD1
        lda     #$69
        sta     $C3
        jsr     BLCKW1
        pla
        sta     $C9
        pla
        sta     $CA
        pla
        sta     $FB
        pla
        sta     $FC
        rts

; $F63C: GETS START-/ END-ADR FROM FILE HEADER
LDAD2:  jsr     TIRQ
        ldx     #$00
        ldy     #$01
LF643:  lda     ($D6),y
        sta     $C7,x
        inx
        iny
        cpx     #$04
        bne     LF643
        lda     $C7
        sta     $FB
        lda     $C8
        sta     $FC
        rts

; $F656: SETS TAPEBUFFER START-ADR 
ZZZ:    lda     #$7A
        sta     $D6
        lda     #$02
        sta     $D7
        lda     $D4
        lsr
        bcs     LF66B
        lda     #$3A
        sta     $D6
        lda     #$03
        sta     $D7
LF66B:  rts

; $F66C: SETS SAVE START-/END-ADR FOR TAPEBUFFER
LDAD1:  jsr     TIRQ
        jsr     ZZZ
        lda     $D6
        sta     $FB
        clc
        adc     #$C0
        sta     $C9
        lda     $D7
        sta     $FC
        adc     #$00
        sta     $CA
        rts

; $F684: SYS-COMMAND
SYS:    jsr     LCC8B
        jsr     LD6D2
        jmp     (L0011)

; $F68D: SET SAVE START-/END-ADR FOR BASIC-PROGRAM
SV60:   lda     $2A
        sta     $C9
        lda     $2B
        sta     $CA
        lda     $29
        sta     $FC
        lda     $28
        sta     $FB
        rts

; $F69E: SAVE-ROUTINE
SAVE:   jsr     PARS1
        jsr     SV60
LF6A4:  lda     $D4
        bne     LF6AD
; $F69E: DISPLAYS DEVICE NOT PRESENT
DERR:   ldy     #$74
        jmp     ERRMSG

LF6AD:  cmp     #$03
        beq     DERR
        bcc     LF703
        lda     #$61
        sta     $D3
        ldy     $D1
        bne     LF6BE
        jmp     LCE03

LF6BE:  jsr     OPCHN
        jsr     LISTEN
        lda     $D3
        jsr     SECND
        ldy     #$00
        jsr     TRSA
        lda     $C7
        jsr     CIOUT
        lda     $C8
        jsr     CIOUT
LF6D8:  jsr     LFCC6
        beq     LF6ED
        lda     ($C7),y
        jsr     CIOUT
        jsr     STOP
        inc     $C7
        bne     LF6D8
        inc     $C8
        bne     LF6D8
LF6ED:  jsr     UNLSN
; $F6F0: CLOSE IEEE-CHANNEL
CLSEI:  bit     $D3
        bmi     LF76C
        jsr     LISTEN
        lda     $D3
        and     #$EF
        ora     #$E0
        jsr     SECND
        jmp     UNLSN

LF703:  jsr     ZZZ
        jsr     LF847
        jsr     TXTST
        bne     LF716
        ldy     #$64
        jsr     MSG
        jsr     FILNM
LF716:  lda     #$01
        jsr     TAPEH
        jsr     LF889
        lda     $D3
        and     #$02
        beq     LF76C
        lda     #$05
        jmp     TAPEH

; $F729: INC TIME
CUDTIM: inc     $99
        lda     $99
        bne     LF731
        inc     $9A
LF731:  cmp     #$6F
        bne     LF73B
        lda     $9A
        cmp     #$02
        beq     LF75C
LF73B:  inc     $8F
        bne     LF745
        inc     $8E
        bne     LF745
        inc     $8D
LF745:  ldx     #$00
LF747:  lda     $8D,x
        cmp     LF76D,x
        bcc     LF762
        inx
        cpx     #$03
        bne     LF747
        lda     #$00
LF755:  sta     $8C,x
        dex
        bne     LF755
        beq     LF762
LF75C:  lda     #$00
        sta     $99
        sta     $9A
LF762:  lda     $E812
        cmp     $E812
        bne     LF762
        sta     $9B
LF76C:  rts

LF76D:  !byte   $4F
        !byte   $1A
        !byte   $01
; $F770: CHECKS AND SETS INPUTDEVICE (FILENUMBER IN XR)
CHKIN
        pha
        txa
        pha
        tya
        pha
        lda     #$00
        sta     $96
        txa
        jsr     JLTLK
        beq     LF784
LF77F:  ldy     #$17
LF781:  jmp     ERRMSG

LF784:  jsr     JZ100
        lda     $D4
        beq     LF79B
        cmp     #$03
        beq     LF79B
        bcs     LF7A0
        ldx     $D3
        cpx     #$60
        beq     LF79B
        ldy     #$86
        bne     LF781
LF79B:  sta     $AF
        jmp     LF268

LF7A0:  pha
        jsr     TALK
        lda     $D3
        bpl     LF7AE
        jsr     LF169
        jmp     LF7B1

LF7AE:  jsr     TKSA
LF7B1:  lda     $96
        bpl     LF7B8
        jmp     DEVNT

LF7B8:  pla
        jmp     LF79B

; $F7BC: CHECKS AND SETS OUTPUT-DEVICE (FILENUMBER IN XR)
CKOUT:  pha
        txa
        pha
        tya
        pha
        lda     #$00
        sta     $96
        txa
        jsr     JLTLK
        bne     LF77F
        jsr     JZ100
        lda     $D4
        bne     LF7D6
        ldy     #$94
        bne     LF781
LF7D6:  cmp     #$03
        beq     LF7E6
        bpl     LF7EB
        ldx     $D3
        cpx     #$60
        bne     LF7E6
        ldy     #$94
        bne     LF781
LF7E6:  sta     $B0
        jmp     LF268

LF7EB:  pha
        jsr     LISTEN
        lda     $D3
        bpl     LF7F8
        jsr     SCATN
        bne     LF7FB
LF7F8:  jsr     SECND
LF7FB:  lda     $96
        bpl     LF802
        jmp     DEVNT

LF802:  pla
        jmp     LF7E6

; $F806: TAPE-CONTROL-ROUTINE 
JTP20:  jsr     ZZZ
        ldx     $D4
        inc     $BA,x
        ldy     $BA,x
        cpy     #$C0
        rts

; $F812: DISPLAY 'PRESS PLAY ON TAPE #x' AND 'OK'
CSTE1:  jsr     CS10
        beq     LF846
        ldy     #$41
LF819:  jsr     MSG
        ldy     #$56
        jsr     MSG
        lda     $D4
        ora     #$30
        jsr     LE3D8
LF828:  jsr     TKEY
        jsr     CS10
        bne     LF828
        ldy     #$AA
        jmp     MSG

; $F835: TESTS KEY-SWITCH FROM RECORDER, Z-FLAG IF PRESSED
CS10:   lda     #$10
        ldx     $D4
        dex
        beq     LF83E
        lda     #$20
LF83E:  bit     $E810
        bne     LF846
        bit     $E810
LF846:  rts

LF847:  jsr     CS10
        beq     LF846
        ldy     #$41
        jsr     MSG
        ldy     #$4D
        bne     LF819
; $F855: READS BLOCK IN TAPE BUFFER (192 BYTES)
TRBLK:  lda     #$00
        sta     $96
        sta     $9D
        jsr     LDAD1
; $F855: READS BLOCK FROM TAPE, VARIUOS LENGTH 
BLCKR1: jsr     TIRQ
        jsr     CSTE1
        sei
        lda     #$00
        sta     $C2
        sta     $CE
        sta     $CB
        sta     $C0
        sta     $C1
        sta     $B2
        ldx     $D4
        dex
        beq     LF87F
        lda     #$90
        sta     $E84E
        bne     LF882
LF87F:  inc     $E811
LF882:  ldx     #$0E
        bne     LF89B
; $F886: WRITES BLOCK TO TAPE FROM BUFFER (192 BYTES)
TWBLK:  jsr     LDAD1
LF889:  jsr     TIRQ
        lda     #$14
        sta     $C3
; $F890: WRITES BLOCK TO TAPE, VARIUOS LENGTH 
BLCKW1: jsr     LF847
        sei
        lda     #$A0
        sta     $E84E
        ldx     #$08
LF89B:  jsr     LFC9B
; $F89E: STOPS TAPE READ OR WRITE 
TSTOP:  lda     #$02
        sta     $DE
        jsr     LFB84
        dec     $E813
        ldx     $D4
        dex
        bne     LF8B6
        lda     #$34
        sta     $E813
        sta     $F9
        bne     LF8C0
LF8B6:  lda     $E840
        stx     $FA
        and     #$EF
        sta     $E840
LF8C0:  ldx     #$FF
LF8C2:  ldy     #$FF
LF8C4:  dey
        bne     LF8C4
        dex
        bne     LF8C2
        sta     $E849
        cli
LF8CE:  lda     #$E6
        cmp     $91
        beq     LF8E5
        jsr     TKEY
        bit     $E813
        bpl     LF8CE
        bit     $E812
        jsr     CUDTIM
        jmp     LF8CE

LF8E5:  rts

; $F8E6: TESTS IRQ-VECTOR HB=$E6, WAITS FOR I/O-FINISHING
TIRQ:   jsr     TKEY
        lda     #$E6
        cmp     $91
        bne     TIRQ
        rts

; $F8F0: TESTS FOR STOP-KEY, IF RESTORE IRQ ($E62E)
TKEY:   jsr     STOP1
        bne     LF8FD
        jsr     TEND
        jsr     SETDV
        sta     $0E
LF8FD:  jmp     $C73F

; $F900: INIT TIMING FOR TAPE-INPUT
TTIM:   stx     $CC
        lda     $CB
        asl
        asl
        clc
        adc     $CB
        clc
        adc     $CC
        sta     $CC
        lda     #$00
        bit     $CB
        bmi     LF915
        rol
LF915:  asl     $CC
        rol
        asl     $CC
        rol
        tax
LF91C:  lda     $E848
        cmp     #$15
        bcc     LF91C
        adc     $CC
        sta     $E844
        txa
        adc     $E849
        sta     $E845
        cli
        rts

; $F900: IRQ-ROUTINE FOR TAPE-INPUT
TIIRQ:  ldx     $E849
        ldy     #$FF
        tya
        sbc     $E848
        cpx     $E849
        bne     TIIRQ
        stx     $CC
        tax
        sty     $E848
        sty     $E849
        tya
        sbc     $CC
        stx     $CC
        lsr
        ror     $CC
        lsr
        ror     $CC
        lda     $CB
        clc
        adc     #$3C
        bit     $E840
        bit     $E810
        cmp     $CC
        bcs     LF9AC
        ldx     $B2
        beq     LF969
        jmp     TSBYT

LF969:  ldx     $B7
        bmi     LF988
        ldx     #$00
        adc     #$30
        adc     $CB
        cmp     $CC
        bcs     LF993
        inx
        adc     #$26
        adc     $CB
        cmp     $CC
        bcs     LF997
        adc     #$2C
        adc     $CB
        cmp     $CC
        bcc     LF98B
LF988:  jmp     LFA07

LF98B:  lda     $CE
        beq     LF9AC
        sta     $BE
        bne     LF9AC
LF993:  inc     $BF
        bcs     LF999
LF997:  dec     $BF
LF999:  sec
        sbc     #$13
        sbc     $CC
        adc     $9C
        sta     $9C
        lda     $B9
        eor     #$01
        sta     $B9
        beq     LF9CB
        stx     $D9
LF9AC:  lda     $CE
        beq     LF9C8
        bit     $E84D
        bvc     LF9C8
        lda     #$00
        sta     $B9
        lda     $B7
        bpl     LF9EE
        bmi     LF988
LF9BF:  ldx     #$A6
        jsr     TTIM
        lda     $B1
        bne     LF98B
LF9C8:  jmp     LE6E4

LF9CB:  lda     $9C
        beq     LF9D7
        bmi     LF9D5
        dec     $CB
        dec     $CB
LF9D5:  inc     $CB
LF9D7:  lda     #$00
        sta     $9C
        cpx     $D9
        bne     LF9EE
        txa
        bne     LF98B
        lda     $BF
        bmi     LF9AC
        cmp     #$10
        bcc     LF9AC
        sta     $AB
        bcs     LF9AC
LF9EE:  txa
        eor     $B1
        sta     $B1
        lda     $CE
        beq     LF9C8
        dec     $B7
        bmi     LF9BF
        lsr     $D9
        ror     $DF
        ldx     #$DA
        jsr     TTIM
        jmp     LE6E4

LFA07:  lda     $AB
        beq     LFA0F
        lda     $CE
        beq     LFA16
LFA0F:  lda     $B7
        bmi     LFA16
        jmp     LF997

LFA16:  lsr     $CC
        lda     #$93
        sec
        sbc     $CC
        adc     $CB
        asl
        tax
        jsr     TTIM
        inc     $B2
        lda     $CE
        bne     LFA3B
        lda     $AB
        beq     LFA54
        sta     $BE
        lda     #$00
        sta     $AB
        lda     #$C0
        sta     $E84E
        sta     $CE
LFA3B:  lda     $AB
        sta     $CF
        beq     LFA4A
        lda     #$00
        sta     $CE
        lda     #$40
        sta     $E84E
LFA4A:  lda     $DF
        sta     $DD
        lda     $BE
        ora     $BF
        sta     $D0
LFA54:  jmp     LE6E4

; $FA57: SAVES BYTES FROM TAPE
TSBYT:  jsr     LFB84
        sta     $B2
        ldx     #$DA
        jsr     TTIM
        lda     $DE
        beq     LFA67
        sta     $BD
LFA67:  lda     #$0F
        bit     $C2
        bpl     LFA84
        lda     $CF
        bne     LFA7D
        ldx     $DE
        dex
        bne     LFA81
        lda     #$08
        jsr     LFB7F
        bne     LFA81
LFA7D:  lda     #$00
        sta     $C2
LFA81:  jmp     LE6E4

LFA84:  bvs     LFAB7
        bne     LFAA0
        lda     $CF
        bne     LFA81
        lda     $D0
        bne     LFA81
        lda     $BD
        lsr
        lda     $DD
        bmi     LFA9A
        bcc     LFAB1
        clc
LFA9A:  bcs     LFAB1
        and     #$0F
        sta     $C2
LFAA0:  dec     $C2
        bne     LFA81
        lda     #$40
        sta     $C2
        jsr     TRSA
        lda     #$00
        sta     $C3
        beq     LFA81
LFAB1:  lda     #$80
        sta     $C2
        bne     LFA81
LFAB7:  lda     $CF
        beq     LFAC5
        lda     #$04
        jsr     LFB7F
        lda     #$00
        jmp     LFB46

LFAC5:  jsr     LFCC6
        bne     LFACD
        jmp     LFB44

LFACD:  ldx     $BD
        dex
        beq     LFAFF
        lda     $9D
        beq     LFAE2
        ldy     #$00
        lda     $DD
        cmp     ($C7),y
        beq     LFAE2
        lda     #$01
        sta     $D0
LFAE2:  lda     $D0
        beq     LFB32
        ldx     #$3D
        cpx     $C0
        bcc     LFB2B
        ldx     $C0
        lda     $C8
        sta     $0101,x
        lda     $C7
        sta     $0100,x
        inx
        inx
        stx     $C0
        jmp     LFB32

LFAFF:  ldx     $C1
        cpx     $C0
        beq     LFB3C
        lda     $C7
        cmp     $0100,x
        bne     LFB3C
        lda     $C8
        cmp     $0101,x
        bne     LFB3C
        inc     $C1
        inc     $C1
        lda     $9D
        beq     LFB27
        lda     $DD
        ldy     #$00
        cmp     ($C7),y
        beq     LFB3C
        lda     #$01
        sta     $D0
LFB27:  lda     $D0
        beq     LFB32
LFB2B:  lda     #$10
        jsr     LFB7F
        bne     LFB3C
LFB32:  lda     $9D
        bne     LFB3C
        lda     $DD
        ldy     #$00
        sta     ($C7),y
LFB3C:  inc     $C7
        bne     LFB73
        inc     $C8
        bne     LFB73
LFB44:  lda     #$80
LFB46:  sta     $C2
        ldx     $DE
        dex
        bmi     LFB4F
        stx     $DE
LFB4F:  dec     $BD
        beq     TCHK
        lda     $C0
        bne     LFB73
        sta     $DE
        beq     LFB73
; $FB5B: CHECKSUM-TEST
TCHK:   jsr     TEND
        jsr     TRSA
        ldy     #$00
        sty     $C3
        jsr     TPARY
        lda     $C3
        eor     $DD
        beq     LFB73
        lda     #$20
        jsr     LFB7F
LFB73:  jmp     LE6E4

; $FB76: RESCUE SAVE-ADDRESS
TRSA:   lda     $FC
        sta     $C8
        lda     $FB
        sta     $C7
        rts

LFB7F:  ora     $96
        sta     $96
        rts

LFB84:  lda     #$08
        sta     $B7
        lda     #$00
        sta     $B9
        sta     $BE
        sta     $B1
        sta     $BF
        rts

; $FB93: WRITES BIT TO TAPE
TBIT:   lda     $DD
        lsr
        lda     #$60
        bcc     LFB9C
LFB9A:  lda     #$B0
LFB9C:  ldx     #$00
LFB9E:  sta     $E848
        stx     $E849
        lda     $E840
        eor     #$08
        sta     $E840
        and     #$08
        rts

; $FBAF: IRQ2 WRITING ON TAPE
TIRQ2:  sec
        ror     $C8
        bmi     LFBF0
        lda     $BE
        bne     LFBCA
        lda     #$10
        ldx     #$01
        jsr     LFB9E
        bne     LFBF0
        inc     $BE
        lda     $C8
        bpl     LFBF0
        jmp     TIRQ1

LFBCA:  lda     $BF
        bne     LFBD7
        jsr     LFB9A
        bne     LFBF0
        inc     $BF
        bne     LFBF0
LFBD7:  jsr     TBIT
        bne     LFBF0
        lda     $B9
        eor     #$01
        sta     $B9
        beq     LFBF3
        lda     $DD
        eor     #$01
        sta     $DD
        and     #$01
        eor     $B1
        sta     $B1
LFBF0:  jmp     LE6E4

LFBF3:  lsr     $DD
        dec     $B7
        lda     $B7
        beq     LFC38
        bpl     LFBF0
LFBFD:  jsr     LFB84
        cli
        lda     $BA
        beq     LFC17
        ldx     #$00
        stx     $D9
        dec     $BA
        ldx     $DE
        cpx     #$02
        bne     LFC13
        ora     #$80
LFC13:  sta     $DD
        bne     LFBF0
LFC17:  jsr     LFCC6
        bcc     LFC26
        bne     TIRQ2
        inc     $C8
        lda     $D9
        sta     $DD
        bcs     LFBF0
LFC26:  ldy     #$00
        lda     ($C7),y
        sta     $DD
        eor     $D9
        sta     $D9
        inc     $C7
        bne     LFBF0
        inc     $C8
        bne     LFBF0
LFC38:  lda     $B1
        eor     #$01
        sta     $DD
LFC3E:  jmp     LE6E4

; $FC41: IRQ1 WRITING ON TAPE
TIRQ1:  dec     $DE
        bne     LFC48
        jsr     LFCA6
LFC48:  lda     #$50
        sta     $BD
        ldx     #$08
        sei
        jsr     LFC9B
        bne     LFC3E
        lda     #$78
        jsr     LFB9C
        bne     LFC3E
        dec     $BD
        bne     LFC3E
        jsr     LFB84
        dec     $C3
        bpl     LFC3E
        ldx     #$0A
        jsr     LFC9B
        cli
        inc     $C3
        lda     $DE
        beq     LFC96
        jsr     TRSA
        ldx     #$09
        stx     $BA
        bne     LFBFD
; $FC7B: END TAPE-I/O, MOTOR:OFF, OLD IRQ, SCREEN:ON
TEND:   php
        sei
        jsr     LFCA6
        lda     #$7F
        sta     $E84E
        lda     #$3C
        sta     $E811
        lda     #$3D
        sta     $E813
        ldx     #$0C
        jsr     LFC9B
        plp
        rts

LFC96:  jsr     TEND
        beq     LFC3E
LFC9B:  lda     $FD01,x      ; get IRQ-vector
        sta     $90
        lda     $FD02,x      ; get IRQ-vector   
        sta     $91
        rts

LFCA6:  lda     #$3C
        sta     $E813
        lda     $E840
        ora     #$10
        sta     $E840
        rts

; $FCB4: 8-BIT PARITY CHECK
TPARY:  lda     ($C7),y
        eor     $C3
        sta     $C3
        inc     $C7
        bne     LFCC0
        inc     $C8
LFCC0:  jsr     LFCC6
        bne     TPARY
        rts

LFCC6:  lda     $C8
        cmp     $CA
        bne     LFCD0
        lda     $C7
        cmp     $C9
LFCD0:  rts

; $FCD1: POWER ON RESET, COLD START
START:  ldx     #$FF
        txs
        cld
        jsr     LE1DE
        lda     #$89
        sta     $94
        lda     #$C3
        sta     $95
        lda     #$17
        sta     $92
        lda     #$FD
        sta     $93
        lda     #$F7
        sta     L03FA
        lda     #$E7
        sta     $03FB
        cli
        lda     $E810
        bmi     LFCFB
        jmp     CALLE

LFCFB:  jmp     LE116

; $FCFE: ENTRY FOR NMI
ENMI:   jmp     ($94)

; IRQ-VECTOR TABLE
fd01:   !byte $00,$00,$00,$00,$00,$00,$00,$00,$54,$fc,$b4,$fb,$2e,$e6,$31,$f9;   ........T.....1.
; $FD11: MONITOR (CALL-ENTRY)
CALLE:   
        lda     #$43
        sta     $B5
        bne     LFD2D
        lda     #$42
        sta     $B5
        cld
        lsr
        pla
        sta     $0205
        pla
        sta     $0204
        pla
        sta     $0203
        pla
        sta     $0202
LFD2D:  pla
        adc     #$FF
        sta     $0201
        pla
        adc     #$FF
        sta     $0200
        lda     $90
        sta     $0208
        lda     $91
        sta     $0207
        tsx
        stx     $0206
        cli
        jsr     CRLF
        ldx     $B5
        lda     #$2A
        jsr     LE784
        lda     #$52
        bne     SO
; $FD56: MONITOR COMMAND INPUT
MCMD:   lda     #$02
        sta     $77
        lda     #$00
        sta     $DE
        ldx     #$0D
        lda     #$2E
        jsr     LE784
LFD65:  jsr     LE7EB
        cmp     #$2E
        beq     LFD65
        cmp     #$20
        beq     LFD65
; $FD70: MONITOR COMMAND ANALYSIS
SO:     ldx     #$07
LFD72:  cmp     $FDE0,x
        bne     LFD82
        stx     $B4
        lda     $FDE8,x
        pha
        lda     $FDF0,x
        pha
        rts

LFD82:  dex
        bpl     LFD72
        jmp     (L03FA)

; $FD88: LOADS PROGRAM-COUNTER FROM $FB/$FC
PUTP:   lda     $FB
        sta     $0201
        lda     $FC
        sta     $0200
        rts

; $FD93: SHOWS MEMORY 
DN:     sta     $B5
        ldy     #$00
LFD97:  jsr     SPACE
        lda     ($FB),y
        jsr     LE775
        jsr     INCTMP
        dec     $B5
        bne     LFD97
        rts

; $FDA7: GET AND SAVE ONE BYTE ($FB/$FC)
BYTE:   jsr     LE7B6
        bcc     LFDB9
        ldx     #$00
        sta     ($FB,x)
        cmp     ($FB,x)
        beq     LFDB9
        pla
        pla
        jmp     LE7F7

LFDB9:  jsr     INCTMP
        dec     $B5
        rts

; $FDBF: PREPARES SR..SP IN-/OUTPUT
SETR:   lda     #$02
        sta     $FB
        lda     #$02
        sta     $FC
        lda     #$05
        rts

; $FDCA: WRITES TWO SPACES
SPAC2:  jsr     SPACE
; $FDCD: WRITES ONE SPACE
SPACE:  lda     #$20
CRLF            = * + 1                        ; $FDD0: DISPLAYS RETURN
        bit     $0DA9
        jmp     LFFD2

; $FDD5: INC $FB/$FC-POINTER, IF 0 INC $DE 
INCTMP: inc     $FB
        bne     LFDDF
        inc     $FC
        bne     LFDDF
        inc     $DE
LFDDF:  rts



fde0:  !byte $3a,$3b,$52,$4d,$47,$58,$4c,$53,$fe,$fe,$fe,$fe,$fe,$ff,$ff,$ff;   :;RMGXLS........
fdf0:  !byte $b8,$96,$22,$57,$ce,$06,$10,$10,$0d,$20,$20,$20,$20,$20,$50,$43;   .."W.....     PC
fe00:  !byte $20,$20,$49,$52,$51,$20,$20,$53,$52,$20,$41,$43,$20,$58,$52,$20;     IRQ  SR AC XR 
fe10:  !byte $59,$52,$20,$53,$50

; $FE15: MONITOR DISPLAY-ROUTINE 
ALTRIT: tya
        pha
        jsr     CRLF
        pla
        ldx     #$2E
        jsr     LE784
        jmp     SPAC2

; $FE23: MONITOR R-COMMAND 
DSPLYR: ldx     #$00
LFE25:  lda     $FDF8,x
        jsr     LFFD2
        inx
        cpx     #$1D
        bne     LFE25
        ldy     #$3B
        jsr     ALTRIT
        lda     $0200
        jsr     LE775
        lda     $0201
        jsr     LE775
        jsr     SPACE
        lda     $0207
        jsr     LE775
        lda     $0208
        jsr     LE775
        jsr     SETR
LFE53:  jsr     DN
        beq     LFE91
; $FE58: MONITOR M-COMMAND 
DSPLYM: jsr     LE7EB
        jsr     LE7A7
        bcc     LFE94
        jsr     LE797
        jsr     LE7EB
        jsr     LE7A7
        bcc     LFE94
        jsr     LE797
LFE6E:  jsr     STOP1
        beq     LFE91
        ldx     $DE
        bne     LFE91
        sec
        lda     $FD
        sbc     $FB
        lda     $FE
        sbc     $FC
        bcc     LFE91
        ldy     #$3A
        jsr     ALTRIT
        jsr     LE76A
        lda     #$08
        jsr     DN
        beq     LFE6E
LFE91:  jmp     MCMD

LFE94:  jmp     LE7F7

; $FE97: MONITOR ;-COMMAND 
ALTR:   jsr     LE7B6
        jsr     LE7A7
        bcc     LFEA2
        jsr     PUTP
LFEA2:  jsr     LFFCF
        jsr     LE7A7
        bcc     LFEB4
        lda     $FB
        sta     $0208
        lda     $FC
        sta     $0207
LFEB4:  jsr     SETR
        bne     LFEC3
; $FEB9: MONITOR :-COMMAND 
ALTM:   jsr     LE7B6
        jsr     LE7A7
        bcc     LFE94
        lda     #$08
LFEC3:  sta     $B5
LFEC5:  jsr     LE7EB
        jsr     BYTE
        bne     LFEC5
        beq     LFE91
; $FECF: MONITOR G-COMMAND 
MGO:    jsr     LFFCF
        cmp     #$0D
        beq     LFEE2
        cmp     #$20
        bne     LFE94
        jsr     LE7A7
        bcc     LFEE2
        jsr     PUTP
LFEE2:  ldx     $0206
        txs
        sei
        lda     $0207
        sta     $91
        lda     $0208
        sta     $90
        lda     $0200
        pha
        lda     $0201
        pha
        lda     $0202
        pha
        lda     $0203
        ldx     $0204
        ldy     $0205
        rti

; $FF07: MONITOR X-COMMAND 
EXIT:   ldx     $0206
        txs
        jmp     LC389

LFF0E:  jmp     LE7F7

; $FF11: MONITOR L- AND S-COMMAND 
LSM:    ldy     #$01
        sty     $D4
        dey
        sty     $D1
        sty     $9D
        lda     #$02
        sta     $DB
        lda     #$07
        sta     $DA
LFF22:  jsr     LFFCF
        cmp     #$20
        beq     LFF22
        cmp     #$0D
        beq     LFF47
        cmp     #$22
LFF2F:  bne     LFF0E
LFF31:  jsr     LFFCF
        cmp     #$22
        beq     LFF5C
        cmp     #$0D
        beq     LFF47
        sta     ($DA),y
        inc     $D1
        iny
        cpy     #$10
LFF43:  beq     LFF0E
        bne     LFF31
LFF47:  lda     $B4
        cmp     #$06
LFF4B:  bne     LFF2F
        jsr     LD15
        jsr     TIRQ
        lda     $96
        and     #$10
LFF57:  bne     LFF4B
        jmp     MCMD

LFF5C:  jsr     LFFCF
        cmp     #$0D
        beq     LFF47
        cmp     #$2C
LFF65:  bne     LFF57
        jsr     LE7B6
        and     #$0F
LFF6C:  beq     LFF43
        cmp     #$03
        beq     LFF6C
        sta     $D4
        jsr     LFFCF
        cmp     #$0D
        beq     LFF47
        cmp     #$2C
LFF7D:  bne     LFF65
        jsr     LE7A7
        jsr     LE797
        jsr     LFFCF
        cmp     #$2C
LFF8A:  bne     LFF7D
        jsr     LE7A7
        lda     $FB
        sta     $C9
        lda     $FC
        sta     $CA
        jsr     LE797
LFF9A:  jsr     LFFCF
        cmp     #$20
        beq     LFF9A
        cmp     #$0D
LFFA3:  bne     LFF8A
        lda     $B4
        cmp     #$07
        bne     LFFA3
        jsr     LF6A4
        jmp     MCMD

; Copyright: September 1978 CBM
ffb1:   !byte $43,$2e,$20,$30,$39,$37,$38,$20,$43,$42,$4d,$20,$aa,$aa,$aa;   C. 0978 CBM ...

        jmp OPEN
        jmp CLOSE
        jmp CHKIN
        jmp CKOUT
        jmp CLRCH
LFFCF:  jmp BASIN
LFFD2:  jmp BSOUT
        jmp LOAD
        jmp SAVE
        jmp VER
        jmp SYS
        jmp STOP
        jmp GETIN
        jmp CLALL
        jmp CUDTIM
        tax
        tax
        tax
        tax
        tax
        tax
        tax
        tax
        tax
        tax
        tax
        tax
        tax
; NMI
nmi:    !byte   $FE
        !byte   $FC
; RESET VECTOR
res:    !byte   $D1
        !byte   $FC
; IRQ VECTOR
irq:    !byte   $1B
        !byte   $E6

 

Letzte Änderung: 2019-01-04 09:56:42
  Rubrik:  CBM PET
Rubriken-Übersicht
 6 Besucher online 

Valid XHTML 1.0 Transitional Valid CSS!