aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile10
-rw-r--r--VERSION1
-rw-r--r--dla.s28
-rw-r--r--dla.xexbin4696 -> 4696 bytes
-rw-r--r--dla2csv.xexbin10885 -> 10885 bytes
-rw-r--r--dlaver.h2
-rw-r--r--dlaver.inc2
-rw-r--r--mkver.pl2
8 files changed, 34 insertions, 11 deletions
diff --git a/Makefile b/Makefile
index ec4d009..15a4ac9 100644
--- a/Makefile
+++ b/Makefile
@@ -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 ; \
diff --git a/VERSION b/VERSION
new file mode 100644
index 0000000..0c62199
--- /dev/null
+++ b/VERSION
@@ -0,0 +1 @@
+0.2.1
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
diff --git a/dla.xex b/dla.xex
index 113e80b..b4bf550 100644
--- a/dla.xex
+++ b/dla.xex
Binary files differ
diff --git a/dla2csv.xex b/dla2csv.xex
index 60fccce..8bb40ee 100644
--- a/dla2csv.xex
+++ b/dla2csv.xex
Binary files differ
diff --git a/dlaver.h b/dlaver.h
index a7cc638..cb1ae9a 100644
--- a/dlaver.h
+++ b/dlaver.h
@@ -1 +1 @@
-#define VERSION "0.2.0"
+#define VERSION "0.2.1"
diff --git a/dlaver.inc b/dlaver.inc
index 8bb2e0e..7f669e7 100644
--- a/dlaver.inc
+++ b/dlaver.inc
@@ -1 +1 @@
- .define VERSION "0.2.0"
+ .define VERSION "0.2.1"
diff --git a/mkver.pl b/mkver.pl
index d17efa6..6f92d0a 100644
--- a/mkver.pl
+++ b/mkver.pl
@@ -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";