Corrected weird error text getting mixed into output; reformatted to use tabs; tweaked code to keep within 256 bytes.

This commit is contained in:
Rob Greene 2015-10-03 23:29:58 -05:00
parent f905feca72
commit 6ab8d6b7d6
1 changed files with 227 additions and 224 deletions

View File

@ -75,6 +75,7 @@ v = $0000 ; Volume number ignored
crout = $fd8e
prbyte = $fdda
prhex = $fde3
cout = $fded
; Application stuff:
@ -150,7 +151,7 @@ install:
; Setup BASIC.SYSTEM hooks:
; 1. Save EXTRNCMD
lda extrncmd+2
ldy #<nextcmd+1
ldy #<nextcmd+2
sta (cptr),y
lda extrncmd+1
dey
@ -194,7 +195,7 @@ _CodeStartAddress:
_CodeBeginAddress:
entry:
cld ; For BASIC.SYSTEM's happiness
ldx #6
ldx #cmdlen
: lda inbuf-1,x
cmp #$e0 ; Force input to UPPERCASE for comparison
bcc :+
@ -224,7 +225,8 @@ opts = fnopt|sd ; Filename is optional (due to glitch) and slot and drive
notOurCommand:
sec
jmp (nextcmd)
nextcmd:
jmp $0000 ; Filled in by installer
;
; Perform ONLINE command
@ -264,6 +266,7 @@ online:
jsr gosystem
@continue:
jsr crout
ldx #0
@loop:
ldy buffer,x
@ -293,7 +296,9 @@ online:
tax
bne @loop
@exit:
jmp crout
jsr crout
clc
rts
; A device error message
@deverr:
ldy #0
@ -328,8 +333,7 @@ printsd:
lsr
lsr
lsr
ora #'0'|$80
jsr cout
jsr prhex
lda #','|$80
jsr cout
lda #'D'|$80
@ -338,10 +342,11 @@ printsd:
and #$80
asl ; Drive 2 will set carry...
adc #'1'|$80 ; ... making the '1' a '2'
jmp cout
bra _cout ; Saving 1 byte
printspc:
lda #' '|$80
_cout:
jmp cout
_CodeEndAddress:
@ -353,5 +358,3 @@ cmdtable:
asciih "ONLINE"
cmdlen = *-cmdtable
nextcmd: .word 0