prog8/compiler/examples/test.p8
Irmen de Jong cef0aae927 compilation of builtin functions to opcode
untit tests for stackvm opcodes, value and parser literalvalue
2018-09-24 22:34:12 +02:00

42 lines
532 B
Lua

%option enable_floats
~ main {
sub start() -> () {
byte i=2
float f
word ww = $55aa
; P_carry(1) @todo function -> assignment
; P_irqd(1) @todo function -> assignment
f=flt(i)
i = msb(ww)
i = lsb(ww)
lsl(i)
lsr(i)
rol(i)
ror(i)
rol2(i)
ror2(i)
while i<10 {
_vm_write_num(i)
_vm_write_char($8d)
i++
}
_vm_write_char($8d)
i=2
repeat {
_vm_write_num(i)
_vm_write_char($8d)
i++
} until i>10
}
}