aboutsummaryrefslogtreecommitdiff
path: root/dla.s
diff options
context:
space:
mode:
Diffstat (limited to 'dla.s')
-rw-r--r--dla.s28
1 files changed, 26 insertions, 2 deletions
diff --git a/dla.s b/dla.s
index 3d540b3..5126b50 100644
--- a/dla.s
+++ b/dla.s
@@ -309,6 +309,30 @@ saveimage:
jsr close1 ; make sure the IOCB is closed before we open it!
+ ; prepend D: to the filename, if there's no device given.
+ lda linebuf+1
+ cmp #':'
+ beq open_output
+ lda linebuf+2
+ cmp #':'
+ beq open_output
+
+ ldy ICBLL
+dloop:
+ lda linebuf,y
+ sta linebuf+2,y ; make for for D:
+ dey
+ bpl dloop
+
+ ; insert D: and add 2 to the buffer length.
+ lda #'D'
+ sta linebuf
+ lda #':'
+ sta linebuf+1
+ inc ICBLL
+ inc ICBLL
+
+open_output:
; CIO is nice, but it's kind of a PITA to use...
; OPEN #1,8,0,<filename>
ldx #$10
@@ -319,7 +343,7 @@ saveimage:
lda #>linebuf
sta ICBAH,x
ldy ICBLL ; length returned by CIO when we called readline...
- dey ; ...but one byte too long.
+ dey ; ...but one byte too long (due to the EOL).
tya
sta ICBLL,x
lda #0
@@ -637,7 +661,7 @@ seedprompt2:
.byte "]? ",$0
saveprompt:
- .byte $7d, "Save: Enter filename, including Dn:",$9b,"> ",$0
+ .byte $7d, "Save: Enter filename:",$9b,"> ",$0
saveokmsg:
.byte "Saved OK, press any key...",$0