2021-04-05 19:45:39 +00:00
|
|
|
%import textio
|
2021-04-06 20:46:52 +00:00
|
|
|
%zeropage basicsafe
|
2021-02-28 19:40:31 +00:00
|
|
|
|
2021-03-05 21:49:14 +00:00
|
|
|
main {
|
2021-03-15 21:24:09 +00:00
|
|
|
|
2021-03-18 18:17:05 +00:00
|
|
|
sub start() {
|
2021-04-07 21:28:30 +00:00
|
|
|
; cx16.rambank(4)
|
|
|
|
; cx16.rambank(4)
|
|
|
|
; cx16.rambank(4)
|
|
|
|
; cx16.rambank(4)
|
|
|
|
; cx16.rambank(4)
|
|
|
|
uword yy = 12345
|
|
|
|
ubyte xx
|
|
|
|
xx = calc2(41, 12345)
|
|
|
|
xx = calc2(41, 12345)
|
|
|
|
xx = calc2(41, 12345)
|
|
|
|
xx = calc2(41, 12345)
|
|
|
|
txt.print_ub(xx) ; must be 99
|
|
|
|
}
|
2021-04-05 21:12:10 +00:00
|
|
|
|
2021-04-07 21:28:30 +00:00
|
|
|
inline sub calc2(ubyte a1, uword a2) -> ubyte {
|
|
|
|
uword thesum = a2 + a1
|
|
|
|
return lsb(thesum+a2)
|
2021-04-01 20:10:04 +00:00
|
|
|
}
|
|
|
|
}
|