From 00609d410690b3582863b13dd8b3b9fd9ecb4149 Mon Sep 17 00:00:00 2001 From: Egan Ford Date: Sun, 9 Apr 2017 09:17:09 -0600 Subject: [PATCH] minor optimizations --- README.md | 4 ++-- asm/loader.s | 34 ++++++++++++++++++---------------- bin/c2d | Bin 156904 -> 156904 bytes bin/c2d.exe | Bin 185064 -> 185064 bytes c2d.c | 4 ++-- c2d.h.0 | 2 +- test.sh | 2 +- 7 files changed, 24 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 3994f11..246da9d 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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 (egan@sense.net) diff --git a/asm/loader.s b/asm/loader.s index 9769a19..bcb507d 100644 --- a/asm/loader.s +++ b/asm/loader.s @@ -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: @@ -63,7 +64,7 @@ trkloop: lda trkcnt bne fulltrack lda lastsector - jmp subtrack + bpl subtrack fulltrack: lda #$F subtrack: @@ -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 diff --git a/bin/c2d b/bin/c2d index 70da0d93f32f7c47c8a9e7c01409b882f3cda557..5b2d478d5b48b50a9bfd840e616894c8309e0ec0 100755 GIT binary patch delta 1537 zcmYjReN0<^cbC5CAh9y^=2|+8~Aw&-TUM>Y^2NeqI)#$dY8o_qZge1W! z<o)lXrk%;XB9bn}am2I8IZwA(h04oNA8osw=->YgA8NpoS?G|St zh1ol?Xp#eUi;|jQ0TNapKW%tDzcND&IXuv6*$4Lnq`BG;p^{A1M1WTY33=LxSa89sssObszEBc3tRK(GVI=Cm; z4KT(4TMb1HE}};PR;uO+v3~7tsS|Ed%fcm5+2{FqZh2WW9TlXh_awybSN+1(-PjhH zXH%DAiE1{pnOpN5J_R+LC&-Xso3Ni3?)_Sok3a*t7GO#Rex3?EiwHUR4;=g8m@>VW zG982IYy7~vmA5obcDmu&3s3QEmfem}jI$8v38~{W>GSO17xIeeW_~^I9n)o;05KE1 zEq|Do6}ak`OSgbpF5RZdW=%e=$?cllp~+TF?u5iK!YeP~OpQ-1myYtbf>ZQCZnnJ; zebu%}$mp|o_3Z9^rTyj3Xtd}T1OK3SJ>9~u75nHs-&%5zy7{e=Cwv%%P(>i{o3Choc^%d2@$oP0Yo75NM|;Nn!s!>sW@h%2lg5bg zs1iF#X4z=>m?Vsde#1#agsGfh>oi2tv5F`oG5c8TjBSMYJqd&K6HGmlU--?KAkwAX zyT-gd%Y!YBcUv4Z*5VM%Zn`(tzE$`ro42Le548zt^hj()oA3s8MRM^*4&~Fn&OLpk z%RtWLLytGAqKOzu{1dIwByxD9T_~|MI8qNU{$@nP;O&R!Ks)Ze-8DKb;X=Yn>Qx=< LhFD>T@PqIltiY9B delta 1541 zcmYjRdrVtZ96smL1Lb+!0;OPJG%E>XgcWp*%?;YEnugV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 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 (egan@sense.net) @@ -53,7 +53,7 @@ Based on work by: #include #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 diff --git a/c2d.h.0 b/c2d.h.0 index 6e4f1d8..4c9ddc6 100644 --- a/c2d.h.0 +++ b/c2d.h.0 @@ -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\ diff --git a/test.sh b/test.sh index fb1f1c7..5fb4d50 100755 --- a/test.sh +++ b/test.sh @@ -37,7 +37,7 @@ else exit 1 fi -SUM=f27ea2a4fcc7c85ac25c3eacba24e958 +SUM=1e6d9243c1dd78e6cb289aafaf5437a1 rm -f ${BIN}.dsk echo