1
0
mirror of https://github.com/catseye/SixtyPical.git synced 2024-11-22 01:32:13 +00:00

Add apple2 target to loadngo.sh, apple2 example program.

This commit is contained in:
Chris Pressey 2018-09-05 15:20:44 +01:00
parent 3675a186a1
commit 3e11d7122c
2 changed files with 36 additions and 1 deletions

20
eg/apple2/print.60p Normal file
View File

@ -0,0 +1,20 @@
// Write ">AB>" to "standard output"
routine cout
inputs a
trashes a
@ $FDED
routine main
inputs a
trashes a, z, n
{
ld a, 62
call cout
ld a, 65
call cout
ld a, 66
call cout
ld a, 62
call cout
}

View File

@ -1,6 +1,6 @@
#!/bin/sh
usage="Usage: loadngo.sh (c64|vic20|atari2600) [--dry-run] <source.60p>"
usage="Usage: loadngo.sh (c64|vic20|atari2600|apple2) [--dry-run] <source.60p>"
arch="$1"
shift 1
@ -21,6 +21,21 @@ elif [ "X$arch" = "Xvic20" ]; then
elif [ "X$arch" = "Xatari2600" ]; then
output_format='atari2600-cart'
emu='stella'
elif [ "X$arch" = "Xapple2" ]; then
src="$1"
out=/tmp/a-out.bin
bin/sixtypical --traceback --origin=0x2000 --output-format=raw $src > $out
ls -la $out
cp ~/scratchpad/linapple/res/Master.dsk sixtypical.dsk
# TODO: replace HELLO with something that does like
# BLOAD "PROG"
# CALL 8192
# (not BRUN because it does not always return to BASIC afterwards not sure why)
a2rm sixtypical.dsk PROG
a2in B sixtypical.dsk PROG $out
linapple -d1 sixtypical.dsk -autoboot
rm -f $out sixtypical.dsk
exit 0
else
echo $usage && exit 1
fi