diff options
author | B. Watson <urchlay@slackware.uk> | 2022-11-11 16:04:17 -0500 |
---|---|---|
committer | B. Watson <urchlay@slackware.uk> | 2022-11-11 16:05:51 -0500 |
commit | f2a7789fa016371538e64f1220539554769f2e2b (patch) | |
tree | 73ef63135571b811467a6663ccf54ec61cb60c23 | |
parent | 17bba1ebffb8bb37299c0a2d3a57b3a4c51ab0fe (diff) | |
download | dla-asm-f2a7789fa016371538e64f1220539554769f2e2b.tar.gz |
v0.2.1: Prepend D: to Save filename if needed. Move VERSION out of the Makefile.
-rw-r--r-- | Makefile | 10 | ||||
-rw-r--r-- | VERSION | 1 | ||||
-rw-r--r-- | dla.s | 28 | ||||
-rw-r--r-- | dla.xex | bin | 4696 -> 4696 bytes | |||
-rw-r--r-- | dla2csv.xex | bin | 10885 -> 10885 bytes | |||
-rw-r--r-- | dlaver.h | 2 | ||||
-rw-r--r-- | dlaver.inc | 2 | ||||
-rw-r--r-- | mkver.pl | 2 |
8 files changed, 34 insertions, 11 deletions
@@ -1,8 +1,6 @@ # Makefile for dla-asm. # See https://slackware.uk/~urchlay/repos/dla-asm -VERSION=0.2.0 - CL65=cl65 CL65FLAGS= @@ -13,7 +11,7 @@ CFLAGS=-O2 -Wall all: dla.xex dla2csv dla2csv.xex -dla.xex: dla.s io.s dlatbl.s xex.inc printint.s render.s drunkwalk.s dlaver.inc +dla.xex: dla.s io.s dlatbl.s xex.inc printint.s render.s drunkwalk.s dlaver.h $(CL65) $(CL65FLAGS) -l dla.list -Ln dla.labels -t none -o dla.xex dla.s dla2csv.xex: dla2csv.c dlaver.h @@ -21,10 +19,10 @@ dla2csv.xex: dla2csv.c dlaver.h dlatbl.s: mkdlatbl.pl $(PERL) mkdlatbl.pl > dlatbl.s -dlaver.inc: dlaver.h +#dlaver.inc: dlaver.h -dlaver.h: mkver.pl - $(PERL) mkver.pl $(VERSION) +dlaver.h: mkver.pl VERSION + $(PERL) mkver.pl dla2csv: dla2csv.c @echo $(CC) $(CFLAGS) -o dla2csv dla2csv.c ; \ @@ -0,0 +1 @@ +0.2.1 @@ -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 Binary files differdiff --git a/dla2csv.xex b/dla2csv.xex Binary files differindex 60fccce..8bb40ee 100644 --- a/dla2csv.xex +++ b/dla2csv.xex @@ -1 +1 @@ -#define VERSION "0.2.0" +#define VERSION "0.2.1" @@ -1 +1 @@ - .define VERSION "0.2.0" + .define VERSION "0.2.1" @@ -1,6 +1,6 @@ #!/usr/bin/perl -w -$ver = shift || die "Usage: $0 [version]\n"; +chomp($ver = `cat VERSION`); open F,">dlaver.inc" or die $!; print F " .define VERSION \"$ver\"\n"; |