2018-12-11 17:55:08 +00:00
|
|
|
// Should print AABAB
|
2018-02-08 15:05:37 +00:00
|
|
|
|
2019-10-22 14:10:55 +00:00
|
|
|
// Demonstrates vector tables.
|
|
|
|
|
|
|
|
include "chrout.60p"
|
|
|
|
|
2018-02-07 13:43:41 +00:00
|
|
|
vector routine
|
|
|
|
trashes a, z, n
|
|
|
|
print
|
|
|
|
|
|
|
|
vector (routine
|
|
|
|
trashes a, z, n)
|
|
|
|
table[32] vectors
|
|
|
|
|
2018-09-09 14:31:35 +00:00
|
|
|
define printa routine
|
2018-02-07 13:43:41 +00:00
|
|
|
trashes a, z, n
|
|
|
|
{
|
|
|
|
ld a, 65
|
|
|
|
call chrout
|
|
|
|
}
|
|
|
|
|
2018-09-09 14:31:35 +00:00
|
|
|
define printb routine
|
2018-02-07 13:43:41 +00:00
|
|
|
trashes a, z, n
|
|
|
|
{
|
|
|
|
ld a, 66
|
|
|
|
call chrout
|
|
|
|
}
|
|
|
|
|
2018-09-09 14:31:35 +00:00
|
|
|
define main routine
|
2018-02-07 13:43:41 +00:00
|
|
|
inputs vectors
|
|
|
|
outputs vectors
|
|
|
|
trashes print, a, x, z, n, c
|
|
|
|
{
|
|
|
|
ld x, 0
|
2018-02-08 15:05:37 +00:00
|
|
|
copy printa, vectors + x
|
2018-02-07 13:43:41 +00:00
|
|
|
inc x
|
2018-02-07 13:56:17 +00:00
|
|
|
copy printa, print
|
|
|
|
copy print, vectors + x
|
2018-02-07 13:43:41 +00:00
|
|
|
inc x
|
2018-02-07 13:56:17 +00:00
|
|
|
copy printb, print
|
|
|
|
copy print, vectors + x
|
2018-02-07 13:43:41 +00:00
|
|
|
inc x
|
2018-02-08 15:05:37 +00:00
|
|
|
copy printa, vectors + x
|
2018-02-07 13:43:41 +00:00
|
|
|
inc x
|
2018-02-08 15:05:37 +00:00
|
|
|
copy printb, vectors + x
|
2018-02-07 13:43:41 +00:00
|
|
|
|
|
|
|
ld x, 0
|
2018-12-11 17:17:15 +00:00
|
|
|
for x up to 4 {
|
2018-02-07 13:43:41 +00:00
|
|
|
copy vectors + x, print
|
|
|
|
call print
|
2018-12-11 17:17:15 +00:00
|
|
|
}
|
2018-02-07 13:43:41 +00:00
|
|
|
}
|