Add apple2 target to loadngo.sh, apple2 example program.
Chris Pressey
3 years ago
|
0 |
// Write ">AB>" to "standard output"
|
|
1 |
|
|
2 |
routine cout
|
|
3 |
inputs a
|
|
4 |
trashes a
|
|
5 |
@ $FDED
|
|
6 |
|
|
7 |
routine main
|
|
8 |
inputs a
|
|
9 |
trashes a, z, n
|
|
10 |
{
|
|
11 |
ld a, 62
|
|
12 |
call cout
|
|
13 |
ld a, 65
|
|
14 |
call cout
|
|
15 |
ld a, 66
|
|
16 |
call cout
|
|
17 |
ld a, 62
|
|
18 |
call cout
|
|
19 |
}
|
0 | 0 |
#!/bin/sh
|
1 | 1 |
|
2 | |
usage="Usage: loadngo.sh (c64|vic20|atari2600) [--dry-run] <source.60p>"
|
|
2 |
usage="Usage: loadngo.sh (c64|vic20|atari2600|apple2) [--dry-run] <source.60p>"
|
3 | 3 |
|
4 | 4 |
arch="$1"
|
5 | 5 |
shift 1
|
|
20 | 20 |
elif [ "X$arch" = "Xatari2600" ]; then
|
21 | 21 |
output_format='atari2600-cart'
|
22 | 22 |
emu='stella'
|
|
23 |
elif [ "X$arch" = "Xapple2" ]; then
|
|
24 |
src="$1"
|
|
25 |
out=/tmp/a-out.bin
|
|
26 |
bin/sixtypical --traceback --origin=0x2000 --output-format=raw $src > $out
|
|
27 |
ls -la $out
|
|
28 |
cp ~/scratchpad/linapple/res/Master.dsk sixtypical.dsk
|
|
29 |
# TODO: replace HELLO with something that does like
|
|
30 |
# BLOAD "PROG"
|
|
31 |
# CALL 8192
|
|
32 |
# (not BRUN because it does not always return to BASIC afterwards not sure why)
|
|
33 |
a2rm sixtypical.dsk PROG
|
|
34 |
a2in B sixtypical.dsk PROG $out
|
|
35 |
linapple -d1 sixtypical.dsk -autoboot
|
|
36 |
rm -f $out sixtypical.dsk
|
|
37 |
exit 0
|
23 | 38 |
else
|
24 | 39 |
echo $usage && exit 1
|
25 | 40 |
fi
|