; $C8BC: DIRECTORY DIR: jsr LCB1F ; DOS command ? and #$E6 ; syntax right bne LC93E ; no, error ldy #$00 jsr BCMD ; build command lda #$00 ; drive address ldx $0277 ; log. address ldy #$60 ; sec. address jsr LFFBA ; SETLFS sec jsr OPEN ; open file bcc LC8E1 ; error ? pha ; error number on stack jsr LC935 ; CLRCH, CLOSE pla ; get error number from stack tax jmp L8683 ; error output LC8E1: ldx #$00 jsr CHKIN ; open channel ldy #$03 LC8E8: sty $02EC LC8EB: jsr BASIN ; get char sta $02ED ; save char jsr READSS ; read status bne LC935 ; error ? jsr BASIN ; get char sta $02EE ; save second char jsr READSS ; read status bne LC935 ; error ? dec $02EC ; 6 chars read ? bne LC8EB ; no, go on ldx $02ED ; get ... lda $02EE ; .. block count jsr LA45F ; print integer lda #$20 ; jsr BSOUT ; print space LC914: jsr BASIN ; get char pha ; char to stack jsr READSS ; read status bne LC934 ; error ? pla ; get char from stack beq LC926 ; end of line ? jsr BSOUT ; print char jmp LC914 ; read again LC926: lda #$0D ; jsr BSOUT ; print cr jsr STOP ; test stop-key beq LC935 ; yes ? - break ldy #$02 bne LC8E8 ; get line LC934: pla LC935: jsr LFFCC ; close channel lda #$00 clc jmp CLOSE ; close log file LC93E: jmp L94A1 ; print "syntax error"
Letzte Änderung: 2019-01-06 09:50:04