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:
parent
3675a186a1
commit
3e11d7122c
20
eg/apple2/print.60p
Normal file
20
eg/apple2/print.60p
Normal 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
|
||||
}
|
17
loadngo.sh
17
loadngo.sh
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user