diff --git a/eg/rudiments/README.md b/eg/rudiments/README.md index 032249f..009854e 100644 --- a/eg/rudiments/README.md +++ b/eg/rudiments/README.md @@ -12,6 +12,10 @@ under `platform/`, should be included first, like so that system entry points such as `chrout` are defined. +There's a `loadngo.sh` script in this directory that does this. + + ./loadngo.sh c64 vector-table.60p + `chrout` is a routine with outputs the value of the accumulator as an ASCII character, disturbing none of the other registers, simply for the purposes of producing some observable output. diff --git a/eg/rudiments/call.60p b/eg/rudiments/call.60p index 47eb9ed..eed32f3 100644 --- a/eg/rudiments/call.60p +++ b/eg/rudiments/call.60p @@ -1,5 +1,5 @@ // Include `support/${PLATFORM}.60p` before this source -// Should print ??? +// Should print AA define print routine trashes a, z, n diff --git a/eg/rudiments/conditional.60p b/eg/rudiments/conditional.60p index bf7c637..66c0ea8 100644 --- a/eg/rudiments/conditional.60p +++ b/eg/rudiments/conditional.60p @@ -1,6 +1,6 @@ // Demonstrates vector tables. // Include `support/${PLATFORM}.60p` before this source -// Should print ??? +// Should print YN define main routine trashes a, x, y, z, n, c, v diff --git a/eg/rudiments/conditional2.60p b/eg/rudiments/conditional2.60p index 6c37e4e..0def82c 100644 --- a/eg/rudiments/conditional2.60p +++ b/eg/rudiments/conditional2.60p @@ -1,5 +1,5 @@ // Include `support/${PLATFORM}.60p` before this source -// Should print ??? +// Should print YA define main routine trashes a, x, y, z, n, c, v diff --git a/eg/rudiments/goto.60p b/eg/rudiments/goto.60p index faa0c4e..1c8d9a9 100644 --- a/eg/rudiments/goto.60p +++ b/eg/rudiments/goto.60p @@ -1,5 +1,5 @@ // Include `support/${PLATFORM}.60p` before this source -// Should print ??? +// Should print AB define bar routine trashes a, z, n { ld a, 66 diff --git a/eg/rudiments/loadngo.sh b/eg/rudiments/loadngo.sh new file mode 100755 index 0000000..18eab98 --- /dev/null +++ b/eg/rudiments/loadngo.sh @@ -0,0 +1,36 @@ +#!/bin/sh + +usage="Usage: loadngo.sh (c64|vic20) " + +arch="$1" +shift 1 +if [ "X$arch" = "Xc64" ]; then + output_format='c64-basic-prg' + if [ -e vicerc ]; then + emu="x64 -config vicerc" + else + emu="x64" + fi +elif [ "X$arch" = "Xvic20" ]; then + output_format='vic20-basic-prg' + if [ -e vicerc ]; then + emu="xvic -config vicerc" + else + emu="xvic" + fi +else + echo $usage && exit 1 +fi + +src="$1" +if [ "X$src" = "X" ]; then + echo $usage && exit 1 +fi + +### do it ### + +out=/tmp/a-out.prg +../../bin/sixtypical --traceback --output-format=$output_format support/$arch.60p $src --output $out || exit 1 +ls -la $out +$emu $out +rm -f $out diff --git a/eg/rudiments/loop.60p b/eg/rudiments/loop.60p index 40598b1..6ccb445 100644 --- a/eg/rudiments/loop.60p +++ b/eg/rudiments/loop.60p @@ -1,5 +1,5 @@ // Include `support/${PLATFORM}.60p` before this source -// Should print ??? +// Should print ABCDEFGHIJKLMNOPQRSTUVWXYZ define main routine trashes a, y, z, n, c diff --git a/eg/rudiments/memloc.60p b/eg/rudiments/memloc.60p index 2a255d5..cb8bd5b 100644 --- a/eg/rudiments/memloc.60p +++ b/eg/rudiments/memloc.60p @@ -1,5 +1,5 @@ // Include `support/${PLATFORM}.60p` before this source -// Should print ??? +// Should print AB byte foo diff --git a/eg/rudiments/vector.60p b/eg/rudiments/vector.60p index 9008745..b4b018c 100644 --- a/eg/rudiments/vector.60p +++ b/eg/rudiments/vector.60p @@ -1,5 +1,5 @@ // Include `support/${PLATFORM}.60p` before this source -// Should print ??? +// Should print AB vector routine trashes a, z, n