prog8/examples/test.p8

38 lines
656 B
Plaintext
Raw Normal View History

%import test_stack
2021-10-27 21:48:02 +00:00
2021-10-30 13:15:11 +00:00
main {
2021-11-06 18:09:33 +00:00
sub start() {
test_stack.test()
sys.push(-22 as ubyte)
sys.push(44)
sys.pushw(-11234 as uword)
sys.pushw(12345)
sys.push(1)
sys.push(2)
ubyte @shared ub = sys.pop()
byte @shared bb = sys.pop() as byte
uword @shared uw = sys.popw()
word @shared ww = sys.popw() as word
void sys.pop()
void sys.pop()
; routine2(uw+1, true)
test_stack.test()
repeat {
}
2021-11-27 13:08:34 +00:00
}
asmsub routine2(uword num @AY, ubyte switch @X) {
%asm {{
adc #20
rts
}}
}
}