mirror of
https://github.com/irmen/prog8.git
synced 2024-11-22 15:33:02 +00:00
59 lines
979 B
Plaintext
59 lines
979 B
Plaintext
~ main {
|
|
var .float flt1 = 9.87e-21
|
|
var .float flt = -9.87e-21
|
|
const .word border = $0099
|
|
var counter = 1
|
|
|
|
start:
|
|
counter ++
|
|
main.counter ++
|
|
; @todo float augassign
|
|
flt += 1000.1
|
|
flt *= 2.34
|
|
flt *= flt
|
|
|
|
;[border] &= 2 ; @todo augassign on dereference
|
|
|
|
XY*=3 ; @todo operator
|
|
XY=XY/0 ; @todo zerodiv (during expression to code generation) @todo operator
|
|
XY=XY//0 ; @todo zerodiv (during expression to code generation) @todo operator
|
|
|
|
; @todo incr by more than 1
|
|
[AX]++
|
|
[AX]++
|
|
A=0
|
|
; @todo decr by more than 1
|
|
[AX]--
|
|
[AX]--
|
|
|
|
|
|
block2.b2var++
|
|
block2.start()
|
|
return 44.123
|
|
|
|
sub goodbye ()->() {
|
|
var xxxxxx ; @todo vars in sub?
|
|
memory y = $c000 ; @todo memvars in sub?
|
|
const q = 22 ; @todo const in sub?
|
|
|
|
y++
|
|
return
|
|
}
|
|
|
|
|
|
sub derp ()->() {
|
|
const q = 22
|
|
A = q *4 ; @todo fix scope not found error
|
|
return
|
|
}
|
|
}
|
|
|
|
|
|
|
|
~ block2 {
|
|
var b2var = 0
|
|
|
|
start:
|
|
return
|
|
}
|