Skip to content

Commit

Permalink
minor optimizations
Browse files Browse the repository at this point in the history
  • Loading branch information
datajerk committed Apr 9, 2017
1 parent 35da6e5 commit 00609d4
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 22 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Windows/MinGW:

```
usage: c2d [-vh?]
c2d [-m] [-s start address override] input[.mon],[load_address] output.dsk
c2d [-m] [-t filename] [-s start address override] input[.mon],[load_address] output.dsk
-h|? this help
-m jump to monitor after booting
Expand Down Expand Up @@ -112,7 +112,7 @@ Yes. No input checking. Big Endian untested.

### The Ugly Stuff

c2d, Code to Disk, Version 0.4, Sun Apr 9 03:16:22 UTC 2017
c2d, Code to Disk, Version 0.42, Sun Apr 9 03:16:22 UTC 2017

(c) 2012,2017 All Rights Reserved, Egan Ford ([email protected])

Expand Down
34 changes: 18 additions & 16 deletions asm/loader.s
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@ hipage = $B500
rwtsprm = $B7E8 ; looked at dos 3.3 disk, not using $3E3 to find
rwts = $B7B5
preg = $48 ; mon p reg
;trkcnt = $00 ; track counter
;segcnt = $01 ; loop var
;buffer = $02 ; MSB of RWTS buffer
;secnum = $03 ; loop var
;trknum = $04 ; loop var
;;;run time
trkcnt = $00 ; track counter
segcnt = $01 ; loop var
buffer = $02 ; MSB of RWTS buffer
secnum = $03 ; loop var
trknum = $04 ; loop var


start:
Expand Down Expand Up @@ -63,7 +64,7 @@ trkloop:
lda trkcnt
bne fulltrack
lda lastsector
jmp subtrack
bpl subtrack
fulltrack:
lda #$F
subtrack:
Expand Down Expand Up @@ -114,13 +115,14 @@ loadpage:
.org *+1
nextjump:
.org *+2
trkcnt:
.org *+1
segcnt:
.org *+1
buffer:
.org *+1
secnum:
.org *+1
trknum:
.org *+1
;;; used for debug
;trkcnt:
; .org *+1
;segcnt:
; .org *+1
;buffer:
; .org *+1
;secnum:
; .org *+1
;trknum:
; .org *+1
Binary file modified bin/c2d
Binary file not shown.
Binary file modified bin/c2d.exe
Binary file not shown.
4 changes: 2 additions & 2 deletions c2d.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
c2d, Code to Disk, Version 0.4, Sun Apr 9 03:16:22 UTC 2017
c2d, Code to Disk, Version 0.42, Sun Apr 9 03:16:22 UTC 2017
(c) 2012,2017 All Rights Reserved, Egan Ford ([email protected])
Expand Down Expand Up @@ -53,7 +53,7 @@ Based on work by:
#include <sys/stat.h>
#include "c2d.h"

#define VERSION "Version 0.4"
#define VERSION "Version 0.42"
#define INFILE argv[argc-2]
#define OUTFILE argv[argc-1]
#define BINARY 0
Expand Down
2 changes: 1 addition & 1 deletion c2d.h.0
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ typedef struct d {

const char *usagetext="\n\
usage: c2d [-vh?]\n\
c2d [-m] [-s start address override] input[.mon],[load_address] output.dsk\n\
c2d [-m] [-t filename] [-s start address override] input[.mon],[load_address] output.dsk\n\
\n\
-h|? this help\n\
-m jump to monitor after booting\n\
Expand Down
2 changes: 1 addition & 1 deletion test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ else
exit 1
fi

SUM=f27ea2a4fcc7c85ac25c3eacba24e958
SUM=1e6d9243c1dd78e6cb289aafaf5437a1

rm -f ${BIN}.dsk
echo
Expand Down

0 comments on commit 00609d4

Please sign in to comment.