Add local load'n'go script. Fill in what each is expected to write.
Chris Pressey
6 years ago
11 | 11 |
|
12 | 12 |
so that system entry points such as `chrout` are defined.
|
13 | 13 |
|
|
14 |
There's a `loadngo.sh` script in this directory that does this.
|
|
15 |
|
|
16 |
./loadngo.sh c64 vector-table.60p
|
|
17 |
|
14 | 18 |
`chrout` is a routine with outputs the value of the accumulator
|
15 | 19 |
as an ASCII character, disturbing none of the other registers,
|
16 | 20 |
simply for the purposes of producing some observable output.
|
0 | 0 |
// Include `support/${PLATFORM}.60p` before this source
|
1 | |
// Should print ???
|
|
1 |
// Should print AA
|
2 | 2 |
|
3 | 3 |
define print routine
|
4 | 4 |
trashes a, z, n
|
0 | 0 |
// Demonstrates vector tables.
|
1 | 1 |
// Include `support/${PLATFORM}.60p` before this source
|
2 | |
// Should print ???
|
|
2 |
// Should print YN
|
3 | 3 |
|
4 | 4 |
define main routine
|
5 | 5 |
trashes a, x, y, z, n, c, v
|
0 | 0 |
// Include `support/${PLATFORM}.60p` before this source
|
1 | |
// Should print ???
|
|
1 |
// Should print YA
|
2 | 2 |
|
3 | 3 |
define main routine
|
4 | 4 |
trashes a, x, y, z, n, c, v
|
0 | 0 |
// Include `support/${PLATFORM}.60p` before this source
|
1 | |
// Should print ???
|
|
1 |
// Should print AB
|
2 | 2 |
|
3 | 3 |
define bar routine trashes a, z, n {
|
4 | 4 |
ld a, 66
|
|
0 |
#!/bin/sh
|
|
1 |
|
|
2 |
usage="Usage: loadngo.sh (c64|vic20) <source.60p>"
|
|
3 |
|
|
4 |
arch="$1"
|
|
5 |
shift 1
|
|
6 |
if [ "X$arch" = "Xc64" ]; then
|
|
7 |
output_format='c64-basic-prg'
|
|
8 |
if [ -e vicerc ]; then
|
|
9 |
emu="x64 -config vicerc"
|
|
10 |
else
|
|
11 |
emu="x64"
|
|
12 |
fi
|
|
13 |
elif [ "X$arch" = "Xvic20" ]; then
|
|
14 |
output_format='vic20-basic-prg'
|
|
15 |
if [ -e vicerc ]; then
|
|
16 |
emu="xvic -config vicerc"
|
|
17 |
else
|
|
18 |
emu="xvic"
|
|
19 |
fi
|
|
20 |
else
|
|
21 |
echo $usage && exit 1
|
|
22 |
fi
|
|
23 |
|
|
24 |
src="$1"
|
|
25 |
if [ "X$src" = "X" ]; then
|
|
26 |
echo $usage && exit 1
|
|
27 |
fi
|
|
28 |
|
|
29 |
### do it ###
|
|
30 |
|
|
31 |
out=/tmp/a-out.prg
|
|
32 |
../../bin/sixtypical --traceback --output-format=$output_format support/$arch.60p $src --output $out || exit 1
|
|
33 |
ls -la $out
|
|
34 |
$emu $out
|
|
35 |
rm -f $out
|
0 | 0 |
// Include `support/${PLATFORM}.60p` before this source
|
1 | |
// Should print ???
|
|
1 |
// Should print ABCDEFGHIJKLMNOPQRSTUVWXYZ
|
2 | 2 |
|
3 | 3 |
define main routine
|
4 | 4 |
trashes a, y, z, n, c
|
0 | 0 |
// Include `support/${PLATFORM}.60p` before this source
|
1 | |
// Should print ???
|
|
1 |
// Should print AB
|
2 | 2 |
|
3 | 3 |
byte foo
|
4 | 4 |
|
0 | 0 |
// Include `support/${PLATFORM}.60p` before this source
|
1 | |
// Should print ???
|
|
1 |
// Should print AB
|
2 | 2 |
|
3 | 3 |
vector routine
|
4 | 4 |
trashes a, z, n
|