git @ Cat's Eye Technologies SixtyPical / c85cb67
Add local load'n'go script. Fill in what each is expected to write. Chris Pressey 2 years ago
9 changed file(s) with 47 addition(s) and 7 deletion(s). Raw diff Collapse all Expand all
1111
1212 so that system entry points such as `chrout` are defined.
1313
14 There's a `loadngo.sh` script in this directory that does this.
15
16 ./loadngo.sh c64 vector-table.60p
17
1418 `chrout` is a routine with outputs the value of the accumulator
1519 as an ASCII character, disturbing none of the other registers,
1620 simply for the purposes of producing some observable output.
00 // Include `support/${PLATFORM}.60p` before this source
1 // Should print ???
1 // Should print AA
22
33 define print routine
44 trashes a, z, n
00 // Demonstrates vector tables.
11 // Include `support/${PLATFORM}.60p` before this source
2 // Should print ???
2 // Should print YN
33
44 define main routine
55 trashes a, x, y, z, n, c, v
00 // Include `support/${PLATFORM}.60p` before this source
1 // Should print ???
1 // Should print YA
22
33 define main routine
44 trashes a, x, y, z, n, c, v
00 // Include `support/${PLATFORM}.60p` before this source
1 // Should print ???
1 // Should print AB
22
33 define bar routine trashes a, z, n {
44 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
00 // Include `support/${PLATFORM}.60p` before this source
1 // Should print ???
1 // Should print ABCDEFGHIJKLMNOPQRSTUVWXYZ
22
33 define main routine
44 trashes a, y, z, n, c
00 // Include `support/${PLATFORM}.60p` before this source
1 // Should print ???
1 // Should print AB
22
33 byte foo
44
00 // Include `support/${PLATFORM}.60p` before this source
1 // Should print ???
1 // Should print AB
22
33 vector routine
44 trashes a, z, n