From f2a7789fa016371538e64f1220539554769f2e2b Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Fri, 11 Nov 2022 16:04:17 -0500 Subject: v0.2.1: Prepend D: to Save filename if needed. Move VERSION out of the Makefile. --- dla.s | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) (limited to 'dla.s') 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, 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 -- cgit v1.2.3