mirror of
https://github.com/mi57730/a2d.git
synced 2024-11-29 07:49:20 +00:00
Initial Calculator disassembly snapshot
This commit is contained in:
parent
1855f51302
commit
0310a79aaa
@ -4,7 +4,7 @@ CAFLAGS = --target apple2enh --list-bytes 0
|
|||||||
CCFLAGS = --config apple2-asm.cfg
|
CCFLAGS = --config apple2-asm.cfg
|
||||||
|
|
||||||
# ProDOS file type is $F1 ($ is pesky)
|
# ProDOS file type is $F1 ($ is pesky)
|
||||||
TARGETS = show_text_file.F1 show_image_file.F1
|
TARGETS = calculator.F1 show_text_file.F1 show_image_file.F1
|
||||||
|
|
||||||
.PHONY: clean all
|
.PHONY: clean all
|
||||||
all: $(TARGETS)
|
all: $(TARGETS)
|
||||||
|
BIN
desk.acc/calculator.bin
Normal file
BIN
desk.acc/calculator.bin
Normal file
Binary file not shown.
141
desk.acc/calculator.info
Normal file
141
desk.acc/calculator.info
Normal file
@ -0,0 +1,141 @@
|
|||||||
|
GLOBAL {
|
||||||
|
STARTADDR $0800;
|
||||||
|
PAGELENGTH 0; # No paging
|
||||||
|
CPU "65C02";
|
||||||
|
};
|
||||||
|
|
||||||
|
LABEL { NAME "RAMRDOFF"; ADDR $C002; };
|
||||||
|
LABEL { NAME "RAMRDON"; ADDR $C003; };
|
||||||
|
LABEL { NAME "RAMWRTOFF"; ADDR $C004; };
|
||||||
|
LABEL { NAME "RAMWRTON"; ADDR $C005; };
|
||||||
|
LABEL { NAME "ALTZPOFF"; ADDR $C008; };
|
||||||
|
LABEL { NAME "ALTZPON"; ADDR $C009; };
|
||||||
|
LABEL { NAME "LCBANK1"; ADDR $C08B; };
|
||||||
|
LABEL { NAME "AUXMOVE"; ADDR $C311; };
|
||||||
|
LABEL { NAME "XFER"; ADDR $C314; };
|
||||||
|
|
||||||
|
LABEL { NAME "A2D"; ADDR $4000; };
|
||||||
|
LABEL { NAME "UNKNOWN_CALL"; ADDR $8E00; };
|
||||||
|
LABEL { NAME "MLI"; ADDR $BF00; };
|
||||||
|
|
||||||
|
LABEL { NAME "FSUB"; ADDR $E7A7; };
|
||||||
|
LABEL { NAME "FADD"; ADDR $E7BE; };
|
||||||
|
LABEL { NAME "FMULT"; ADDR $E97F; };
|
||||||
|
LABEL { NAME "FDIV"; ADDR $EA66; };
|
||||||
|
LABEL { NAME "ROUND"; ADDR $EB2B; };
|
||||||
|
LABEL { NAME "FLOAT"; ADDR $EB93; };
|
||||||
|
LABEL { NAME "FIN"; ADDR $EC4A; };
|
||||||
|
LABEL { NAME "FOUT"; ADDR $ED34; };
|
||||||
|
|
||||||
|
RANGE { START $08C5; END $0D17; TYPE ByteTable; };
|
||||||
|
RANGE { START $0F24; END $0F37; TYPE ByteTable; };
|
||||||
|
RANGE { START $13C9; END $13CB; TYPE Code; };
|
||||||
|
|
||||||
|
RANGE { START $0875; END $0875; TYPE ByteTable; };
|
||||||
|
RANGE { START $0876; END $0877; TYPE AddrTable; };
|
||||||
|
RANGE { START $0883; END $0883; TYPE ByteTable; };
|
||||||
|
RANGE { START $0884; END $0885; TYPE AddrTable; };
|
||||||
|
RANGE { START $0889; END $0889; TYPE ByteTable; };
|
||||||
|
RANGE { START $088a; END $088b; TYPE AddrTable; };
|
||||||
|
RANGE { START $08b1; END $08b1; TYPE ByteTable; };
|
||||||
|
RANGE { START $08b2; END $08b3; TYPE AddrTable; };
|
||||||
|
RANGE { START $08b7; END $08b7; TYPE ByteTable; };
|
||||||
|
RANGE { START $08b8; END $08b9; TYPE AddrTable; };
|
||||||
|
RANGE { START $0d24; END $0d24; TYPE ByteTable; };
|
||||||
|
RANGE { START $0d25; END $0d26; TYPE AddrTable; };
|
||||||
|
RANGE { START $0d2a; END $0d2a; TYPE ByteTable; };
|
||||||
|
RANGE { START $0d2b; END $0d2c; TYPE AddrTable; };
|
||||||
|
RANGE { START $0d30; END $0d30; TYPE ByteTable; };
|
||||||
|
RANGE { START $0d31; END $0d32; TYPE AddrTable; };
|
||||||
|
RANGE { START $0d36; END $0d36; TYPE ByteTable; };
|
||||||
|
RANGE { START $0d37; END $0d38; TYPE AddrTable; };
|
||||||
|
RANGE { START $0d3c; END $0d3c; TYPE ByteTable; };
|
||||||
|
RANGE { START $0d3d; END $0d3e; TYPE AddrTable; };
|
||||||
|
RANGE { START $0d47; END $0d47; TYPE ByteTable; };
|
||||||
|
RANGE { START $0d48; END $0d49; TYPE AddrTable; };
|
||||||
|
RANGE { START $0d4d; END $0d4d; TYPE ByteTable; };
|
||||||
|
RANGE { START $0d4e; END $0d4f; TYPE AddrTable; };
|
||||||
|
RANGE { START $0dc6; END $0dc6; TYPE ByteTable; };
|
||||||
|
RANGE { START $0dc7; END $0dc8; TYPE AddrTable; };
|
||||||
|
RANGE { START $0dcc; END $0dcc; TYPE ByteTable; };
|
||||||
|
RANGE { START $0dcd; END $0dce; TYPE AddrTable; };
|
||||||
|
RANGE { START $0def; END $0def; TYPE ByteTable; };
|
||||||
|
RANGE { START $0df0; END $0df1; TYPE AddrTable; };
|
||||||
|
RANGE { START $0e1a; END $0e1a; TYPE ByteTable; };
|
||||||
|
RANGE { START $0e1b; END $0e1c; TYPE AddrTable; };
|
||||||
|
RANGE { START $0e2b; END $0e2b; TYPE ByteTable; };
|
||||||
|
RANGE { START $0e2c; END $0e2d; TYPE AddrTable; };
|
||||||
|
RANGE { START $0e31; END $0e31; TYPE ByteTable; };
|
||||||
|
RANGE { START $0e32; END $0e33; TYPE AddrTable; };
|
||||||
|
RANGE { START $0e3a; END $0e3a; TYPE ByteTable; };
|
||||||
|
RANGE { START $0e3b; END $0e3c; TYPE AddrTable; };
|
||||||
|
RANGE { START $0e65; END $0e65; TYPE ByteTable; };
|
||||||
|
RANGE { START $0e66; END $0e67; TYPE AddrTable; };
|
||||||
|
RANGE { START $0e9d; END $0e9d; TYPE ByteTable; };
|
||||||
|
RANGE { START $0e9e; END $0e9f; TYPE AddrTable; };
|
||||||
|
RANGE { START $121f; END $121f; TYPE ByteTable; };
|
||||||
|
RANGE { START $1220; END $1221; TYPE AddrTable; };
|
||||||
|
RANGE { START $1225; END $1225; TYPE ByteTable; };
|
||||||
|
RANGE { START $1226; END $1227; TYPE AddrTable; };
|
||||||
|
RANGE { START $122e; END $122e; TYPE ByteTable; };
|
||||||
|
RANGE { START $122f; END $1230; TYPE AddrTable; };
|
||||||
|
RANGE { START $1234; END $1234; TYPE ByteTable; };
|
||||||
|
RANGE { START $1235; END $1236; TYPE AddrTable; };
|
||||||
|
RANGE { START $1246; END $1246; TYPE ByteTable; };
|
||||||
|
RANGE { START $1247; END $1248; TYPE AddrTable; };
|
||||||
|
RANGE { START $124c; END $124c; TYPE ByteTable; };
|
||||||
|
RANGE { START $124d; END $124e; TYPE AddrTable; };
|
||||||
|
RANGE { START $1252; END $1252; TYPE ByteTable; };
|
||||||
|
RANGE { START $1253; END $1254; TYPE AddrTable; };
|
||||||
|
RANGE { START $1272; END $1272; TYPE ByteTable; };
|
||||||
|
RANGE { START $1273; END $1274; TYPE AddrTable; };
|
||||||
|
RANGE { START $1278; END $1278; TYPE ByteTable; };
|
||||||
|
RANGE { START $1279; END $127a; TYPE AddrTable; };
|
||||||
|
RANGE { START $12ae; END $12ae; TYPE ByteTable; };
|
||||||
|
RANGE { START $12af; END $12b0; TYPE AddrTable; };
|
||||||
|
RANGE { START $12bc; END $12bc; TYPE ByteTable; };
|
||||||
|
RANGE { START $12bd; END $12be; TYPE AddrTable; };
|
||||||
|
RANGE { START $12c9; END $12c9; TYPE ByteTable; };
|
||||||
|
RANGE { START $12ca; END $12cb; TYPE AddrTable; };
|
||||||
|
RANGE { START $12d8; END $12d8; TYPE ByteTable; };
|
||||||
|
RANGE { START $12d9; END $12da; TYPE AddrTable; };
|
||||||
|
RANGE { START $12de; END $12de; TYPE ByteTable; };
|
||||||
|
RANGE { START $12df; END $12e0; TYPE AddrTable; };
|
||||||
|
RANGE { START $12e4; END $12e4; TYPE ByteTable; };
|
||||||
|
RANGE { START $12e5; END $12e6; TYPE AddrTable; };
|
||||||
|
RANGE { START $12eb; END $12eb; TYPE ByteTable; };
|
||||||
|
RANGE { START $12ec; END $12ed; TYPE AddrTable; };
|
||||||
|
RANGE { START $12f1; END $12f1; TYPE ByteTable; };
|
||||||
|
RANGE { START $12f2; END $12f3; TYPE AddrTable; };
|
||||||
|
RANGE { START $12f7; END $12f7; TYPE ByteTable; };
|
||||||
|
RANGE { START $12f8; END $12f9; TYPE AddrTable; };
|
||||||
|
RANGE { START $12fd; END $12fd; TYPE ByteTable; };
|
||||||
|
RANGE { START $12fe; END $12ff; TYPE AddrTable; };
|
||||||
|
RANGE { START $1303; END $1303; TYPE ByteTable; };
|
||||||
|
RANGE { START $1304; END $1305; TYPE AddrTable; };
|
||||||
|
RANGE { START $1309; END $1309; TYPE ByteTable; };
|
||||||
|
RANGE { START $130a; END $130b; TYPE AddrTable; };
|
||||||
|
RANGE { START $130f; END $130f; TYPE ByteTable; };
|
||||||
|
RANGE { START $1310; END $1311; TYPE AddrTable; };
|
||||||
|
RANGE { START $1315; END $1315; TYPE ByteTable; };
|
||||||
|
RANGE { START $1316; END $1317; TYPE AddrTable; };
|
||||||
|
RANGE { START $1346; END $1346; TYPE ByteTable; };
|
||||||
|
RANGE { START $1347; END $1348; TYPE AddrTable; };
|
||||||
|
RANGE { START $134c; END $134c; TYPE ByteTable; };
|
||||||
|
RANGE { START $134d; END $134e; TYPE AddrTable; };
|
||||||
|
RANGE { START $1352; END $1352; TYPE ByteTable; };
|
||||||
|
RANGE { START $1353; END $1354; TYPE AddrTable; };
|
||||||
|
RANGE { START $138a; END $138a; TYPE ByteTable; };
|
||||||
|
RANGE { START $138b; END $138c; TYPE AddrTable; };
|
||||||
|
RANGE { START $1390; END $1390; TYPE ByteTable; };
|
||||||
|
RANGE { START $1391; END $1392; TYPE AddrTable; };
|
||||||
|
RANGE { START $139b; END $139b; TYPE ByteTable; };
|
||||||
|
RANGE { START $139c; END $139d; TYPE AddrTable; };
|
||||||
|
RANGE { START $13a1; END $13a1; TYPE ByteTable; };
|
||||||
|
RANGE { START $13a2; END $13a3; TYPE AddrTable; };
|
||||||
|
RANGE { START $13a7; END $13a7; TYPE ByteTable; };
|
||||||
|
RANGE { START $13a8; END $13a9; TYPE AddrTable; };
|
||||||
|
RANGE { START $13b4; END $13b4; TYPE ByteTable; };
|
||||||
|
RANGE { START $13b5; END $13b6; TYPE AddrTable; };
|
||||||
|
RANGE { START $13ba; END $13ba; TYPE ByteTable; };
|
||||||
|
RANGE { START $13bb; END $13bc; TYPE AddrTable; };
|
1163
desk.acc/calculator.s
Normal file
1163
desk.acc/calculator.s
Normal file
File diff suppressed because it is too large
Load Diff
@ -2,16 +2,16 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
make clean
|
#make clean
|
||||||
make all
|
make all
|
||||||
|
|
||||||
|
function verify {
|
||||||
|
diff "$1.bin" "$1.F1" && echo "$1: files match"
|
||||||
|
}
|
||||||
|
|
||||||
# Verify original and output match
|
# Verify original and output match
|
||||||
diff show_text_file.bin show_text_file.F1 \
|
verify "calculator"
|
||||||
&& echo "Files match"
|
verify "show_text_file"
|
||||||
|
|
||||||
cat show_image_file.F1 > mount/SHOW.IMAGE.FILE.\$F1 \
|
cat show_image_file.F1 > mount/SHOW.IMAGE.FILE.\$F1 \
|
||||||
&& echo "Updated mounted file"
|
&& echo "Updated mounted file"
|
||||||
|
|
||||||
# Show output for review
|
|
||||||
#less $list
|
|
||||||
#less dhr.list
|
|
||||||
|
74
desk.acc/res/make_info.pl
Executable file
74
desk.acc/res/make_info.pl
Executable file
@ -0,0 +1,74 @@
|
|||||||
|
#!/usr/bin/env perl
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
|
||||||
|
print <<'END_HEADER';
|
||||||
|
GLOBAL {
|
||||||
|
STARTADDR $0800;
|
||||||
|
PAGELENGTH 0; # No paging
|
||||||
|
CPU "65C02";
|
||||||
|
};
|
||||||
|
|
||||||
|
LABEL { NAME "RAMRDOFF"; ADDR $C002; };
|
||||||
|
LABEL { NAME "RAMRDON"; ADDR $C003; };
|
||||||
|
LABEL { NAME "RAMWRTOFF"; ADDR $C004; };
|
||||||
|
LABEL { NAME "RAMWRTON"; ADDR $C005; };
|
||||||
|
LABEL { NAME "ALTZPOFF"; ADDR $C008; };
|
||||||
|
LABEL { NAME "ALTZPON"; ADDR $C009; };
|
||||||
|
LABEL { NAME "LCBANK1"; ADDR $C08B; };
|
||||||
|
LABEL { NAME "AUXMOVE"; ADDR $C311; };
|
||||||
|
LABEL { NAME "XFER"; ADDR $C314; };
|
||||||
|
|
||||||
|
LABEL { NAME "A2D"; ADDR $4000; };
|
||||||
|
LABEL { NAME "UNKNOWN_CALL"; ADDR $8E00; };
|
||||||
|
LABEL { NAME "MLI"; ADDR $BF00; };
|
||||||
|
|
||||||
|
LABEL { NAME "FSUB"; ADDR $E7A7; };
|
||||||
|
LABEL { NAME "FADD"; ADDR $E7BE; };
|
||||||
|
LABEL { NAME "FMULT"; ADDR $E97F; };
|
||||||
|
LABEL { NAME "FDIV"; ADDR $EA66; };
|
||||||
|
LABEL { NAME "ROUND"; ADDR $EB2B; };
|
||||||
|
LABEL { NAME "FLOAT"; ADDR $EB93; };
|
||||||
|
LABEL { NAME "FIN"; ADDR $EC4A; };
|
||||||
|
LABEL { NAME "FOUT"; ADDR $ED34; };
|
||||||
|
|
||||||
|
END_HEADER
|
||||||
|
|
||||||
|
print <<'END_CALC';
|
||||||
|
RANGE { START $08C5; END $0D17; TYPE ByteTable; };
|
||||||
|
RANGE { START $0F24; END $0F37; TYPE ByteTable; };
|
||||||
|
RANGE { START $13C9; END $13CB; TYPE Code; };
|
||||||
|
|
||||||
|
END_CALC
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
my $ptr = 0x800;
|
||||||
|
|
||||||
|
my @last = (-1, -1, -1);
|
||||||
|
my $b;
|
||||||
|
while (read(STDIN, $b, 1)) {
|
||||||
|
$b = ord($b);
|
||||||
|
#print sprintf("%04x: \$%02x\n", $ptr, $b);
|
||||||
|
++$ptr;
|
||||||
|
|
||||||
|
shift @last;
|
||||||
|
push @last, $b;
|
||||||
|
my $lastaddr = $last[1] | ($last[2] << 8);
|
||||||
|
|
||||||
|
if ($last[0] == 0x20 &&
|
||||||
|
($lastaddr == 0x4000 || $lastaddr == 0x8E00 || $lastaddr == 0xBF00)) {
|
||||||
|
die "expected 3 more\n" unless read(STDIN, $b, 3) == 3;
|
||||||
|
print sprintf(
|
||||||
|
"RANGE { START \$%04x; END \$%04x; TYPE ByteTable; };\n" .
|
||||||
|
"RANGE { START \$%04x; END \$%04x; TYPE AddrTable; };\n",
|
||||||
|
$ptr, $ptr, $ptr+1, $ptr+2
|
||||||
|
);
|
||||||
|
|
||||||
|
$ptr += 3;
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
}
|
@ -5,10 +5,6 @@
|
|||||||
.include "../inc/auxmem.inc"
|
.include "../inc/auxmem.inc"
|
||||||
.include "a2d.inc"
|
.include "a2d.inc"
|
||||||
|
|
||||||
;; Big questions:
|
|
||||||
;; * How can we hide/show the cursor on demand?
|
|
||||||
;; * Can we trigger menu redraw? (if not, need to preserve for fullscreen)
|
|
||||||
|
|
||||||
start: jmp copy2aux
|
start: jmp copy2aux
|
||||||
|
|
||||||
save_stack:.byte 0
|
save_stack:.byte 0
|
||||||
|
13
inc/applesoft.inc
Normal file
13
inc/applesoft.inc
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
;;; ------------------------------
|
||||||
|
;;; Applesoft Basic
|
||||||
|
;;; ------------------------------
|
||||||
|
|
||||||
|
;;; Entry Points
|
||||||
|
FSUB := $E7A7
|
||||||
|
FADD := $E7BE
|
||||||
|
FMULT := $E97F
|
||||||
|
FDIV := $EA66
|
||||||
|
ROUND := $EB2B
|
||||||
|
FLOAT := $EB93
|
||||||
|
FIN := $EC4A
|
||||||
|
FOUT := $ED34
|
Loading…
Reference in New Issue
Block a user