mirror of
https://github.com/irmen/prog8.git
synced 2024-11-06 16:07:32 +00:00
60 lines
1.0 KiB
Plaintext
60 lines
1.0 KiB
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
|
|
|
|
flt = flt+ 1 ; @todo optimize into augassign
|
|
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
|
|
}
|