Fixed primary loop and error message. Routine works now, but BASIC.SYSTEM integration does not yet. May split out to separate command files.

This commit is contained in:
Rob Greene 2015-09-19 17:55:34 -05:00
parent 6bc64408d9
commit 29dd5a242c
1 changed files with 16 additions and 9 deletions

View File

@ -158,8 +158,6 @@ online:
jsr gosystem jsr gosystem
bcc @continue bcc @continue
rts rts
@exit:
jmp crout
@continue: @continue:
ldx #0 ldx #0
@ -167,23 +165,32 @@ online:
ldy buffer,x ldy buffer,x
beq @exit beq @exit
jsr printsd jsr printsd
lda #' '|$80
jsr cout
tya tya
and #$0f and #$0f
beq @deverr beq @deverr
tay tay
: inx lda #'/'|$80
: jsr cout
inx
lda buffer,x lda buffer,x
ora #$80 ora #$80
jsr cout
dey dey
bne :- bpl :-
@adjust: @adjust:
jsr crout jsr crout
txa txa
clc and #$0f ; Check if we advanced past this buffer
adc #$0f beq @loop
txa
and #$f0 and #$f0
bra @loop clc
adc #$10
tax
bne @loop
@exit:
jmp crout
; A device error message ; A device error message
@deverr: @deverr:
lda #'E'|$80 lda #'E'|$80
@ -222,7 +229,7 @@ printsd:
lsr lsr
ora #'0'|$80 ora #'0'|$80
jsr cout jsr cout
lda #' '|$80 lda #','|$80
jsr cout jsr cout
lda #'D'|$80 lda #'D'|$80
jsr cout jsr cout