2022-08-28 14:43:15 +00:00
|
|
|
%zpreserved 10,20
|
|
|
|
%zpreserved 30,40
|
|
|
|
|
2022-07-08 19:50:32 +00:00
|
|
|
main {
|
2022-08-21 17:57:52 +00:00
|
|
|
|
|
|
|
uword global1 = 1234
|
|
|
|
|
2022-08-28 14:43:15 +00:00
|
|
|
%asm {{
|
|
|
|
nop
|
|
|
|
nop
|
|
|
|
return
|
|
|
|
}}
|
|
|
|
|
|
|
|
asmsub testasmsub(ubyte arg1 @A) clobbers(Y) -> uword @AX {
|
|
|
|
%asm {{
|
|
|
|
nop
|
|
|
|
return
|
|
|
|
}}
|
|
|
|
}
|
|
|
|
|
2022-08-07 11:45:03 +00:00
|
|
|
sub start() {
|
2022-08-28 14:43:15 +00:00
|
|
|
sys.wait(1)
|
|
|
|
|
|
|
|
%asm {{
|
|
|
|
nop
|
|
|
|
}}
|
2022-08-11 22:46:38 +00:00
|
|
|
|
2022-08-21 17:01:53 +00:00
|
|
|
; TODO should generate address
|
2022-08-21 15:21:29 +00:00
|
|
|
uword @shared slab1 = memory("slab 1", 2000, 0)
|
|
|
|
uword @shared slab2 = memory("slab 1", 2000, 0)
|
|
|
|
uword @shared slab3 = memory("other # slab", 2000, 64)
|
2022-08-25 20:38:53 +00:00
|
|
|
&uword mapped = $c000
|
2022-08-28 14:43:15 +00:00
|
|
|
&ubyte[20] mappedarray = $c100
|
2022-08-22 22:05:57 +00:00
|
|
|
|
2022-08-21 15:21:29 +00:00
|
|
|
uword @shared zz = slab1+slab2+slab3
|
2022-08-22 22:05:57 +00:00
|
|
|
|
2022-08-28 14:43:15 +00:00
|
|
|
uword @shared @zp qq = zz
|
|
|
|
uword @shared @zp qq2 = &zz
|
|
|
|
|
|
|
|
str @shared namestring = "irmen"
|
|
|
|
uword[] @shared wordarray1 = [1111,2222,3333,4444]
|
|
|
|
uword[4] @shared wordarray2 = 12345
|
|
|
|
uword[4] @shared wordzeroarray
|
2022-08-12 22:14:19 +00:00
|
|
|
|
2022-08-21 15:21:29 +00:00
|
|
|
qq=4242 ; TODO should generate symbol not allocated address
|
2022-08-25 20:38:53 +00:00
|
|
|
mapped = 42 ; TODO wrong VMASM code generated... should generate mapped memory address
|
2022-08-21 17:57:52 +00:00
|
|
|
|
|
|
|
qq=global1
|
|
|
|
qq=other.global2
|
2022-08-27 11:22:38 +00:00
|
|
|
nested()
|
|
|
|
main.start.nested.nested2()
|
2022-08-25 20:38:53 +00:00
|
|
|
|
|
|
|
sub nested() {
|
|
|
|
qq++
|
2022-08-27 11:22:38 +00:00
|
|
|
txt.print("zzz")
|
|
|
|
nested2()
|
|
|
|
|
|
|
|
sub nested2() {
|
|
|
|
txt.print("zzz2")
|
|
|
|
qq++
|
|
|
|
}
|
2022-08-25 20:38:53 +00:00
|
|
|
}
|
2022-08-12 22:14:19 +00:00
|
|
|
}
|
2022-07-14 17:25:08 +00:00
|
|
|
}
|
2022-08-21 17:57:52 +00:00
|
|
|
|
|
|
|
other {
|
|
|
|
|
|
|
|
uword global2 = 9999
|
|
|
|
|
|
|
|
}
|