mirror of
https://github.com/irmen/prog8.git
synced 2024-08-26 00:29:04 +00:00
23 lines
319 B
Lua
23 lines
319 B
Lua
%import math
|
|
%import textio
|
|
%zeropage basicsafe
|
|
|
|
main {
|
|
|
|
sub start() {
|
|
ubyte lda = getrandom()
|
|
lda++
|
|
cx16.r0 = (math.rnd() % 20) * $0010
|
|
lda = math.rnd() % 5
|
|
lda++
|
|
}
|
|
|
|
sub getrandom() -> ubyte {
|
|
%asm {{
|
|
lda #42
|
|
rts
|
|
}}
|
|
}
|
|
}
|
|
|