git @ Cat's Eye Technologies SixtyPical / 3e11d71
Add apple2 target to loadngo.sh, apple2 example program. Chris Pressey 3 years ago
2 changed file(s) with 36 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
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 }
00 #!/bin/sh
11
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>"
33
44 arch="$1"
55 shift 1
2020 elif [ "X$arch" = "Xatari2600" ]; then
2121 output_format='atari2600-cart'
2222 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
2338 else
2439 echo $usage && exit 1
2540 fi