mirror of
https://github.com/irmen/prog8.git
synced 2024-07-21 01:29:03 +00:00
26 lines
522 B
Lua
26 lines
522 B
Lua
%import textio
|
|
%zeropage basicsafe
|
|
|
|
main {
|
|
|
|
sub start() {
|
|
; 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
|
|
}
|
|
|
|
inline sub calc2(ubyte a1, uword a2) -> ubyte {
|
|
uword thesum = a2 + a1
|
|
return lsb(thesum+a2)
|
|
}
|
|
}
|