mirror of
https://github.com/irmen/prog8.git
synced 2024-09-10 09:54:32 +00:00
24 lines
434 B
Lua
24 lines
434 B
Lua
%import textio
|
|
%zeropage dontuse
|
|
|
|
main {
|
|
|
|
sub start() {
|
|
; cx16.rambank(4)
|
|
; cx16.rambank(4)
|
|
; cx16.rambank(4)
|
|
; cx16.rambank(4)
|
|
; cx16.rambank(4)
|
|
ubyte xx
|
|
xx = calc2(41, 12345)
|
|
txt.print_ub(xx) ; must be 99
|
|
txt.nl()
|
|
}
|
|
|
|
inline sub calc2(ubyte a1, uword a2) -> ubyte {
|
|
uword thesum
|
|
thesum = a2 + a1
|
|
return lsb(thesum)
|
|
}
|
|
}
|