2024-11-30 19:46:31 +00:00
|
|
|
%import textio
|
|
|
|
%option no_sysinit
|
|
|
|
%zeropage basicsafe
|
|
|
|
|
2024-11-13 23:54:07 +00:00
|
|
|
main {
|
2024-11-24 06:28:33 +00:00
|
|
|
sub start() {
|
2024-11-30 19:46:31 +00:00
|
|
|
@($2005) = 0
|
|
|
|
txt.print_ub(get_indexed_byte($2000, 5))
|
|
|
|
txt.nl()
|
|
|
|
@($2005) = 123
|
|
|
|
txt.print_ub(get_indexed_byte($2000, 5))
|
|
|
|
txt.nl()
|
2024-11-24 03:57:27 +00:00
|
|
|
|
2024-11-30 19:46:31 +00:00
|
|
|
}
|
2024-11-29 19:57:40 +00:00
|
|
|
|
2024-11-30 19:46:31 +00:00
|
|
|
sub get_indexed_byte(uword pointer @R0, ubyte index @R1) -> ubyte {
|
|
|
|
return @(cx16.r0 + cx16.r1L)
|
2024-11-29 23:06:02 +00:00
|
|
|
}
|
2024-11-05 22:56:58 +00:00
|
|
|
}
|