mirror of
https://github.com/irmen/prog8.git
synced 2024-11-22 15:33:02 +00:00
97 lines
1.4 KiB
Plaintext
97 lines
1.4 KiB
Plaintext
; call tests
|
|
|
|
;output
|
|
|
|
|
|
~ foo {
|
|
|
|
var .word var1 = 99
|
|
memory .word mem1 = $cff0
|
|
|
|
var .byte varb1 = 99
|
|
memory .byte memb1 = $cff0
|
|
const .word constw = $2355
|
|
const .byte constb = $23
|
|
const .float constf = 3.4556677
|
|
const .text constt = "derp"
|
|
|
|
subx sub1 () -> (X?) = $ffdd
|
|
subx sub2 (A) -> (Y?) = $eecc
|
|
|
|
|
|
bar
|
|
goto sub1
|
|
goto sub2 (1 )
|
|
goto bar ()
|
|
goto [AX]
|
|
goto [AX] ()
|
|
goto [var1]
|
|
goto [var1] () ; comment
|
|
goto [mem1] ; comment
|
|
goto [mem1] ()
|
|
goto [$c2.word]
|
|
goto [$c2.word] ()
|
|
goto [$c2dd.word]
|
|
goto [$c2dd.word] ( )
|
|
goto $c000
|
|
goto $c000 ( )
|
|
goto $c2
|
|
goto $c2()
|
|
|
|
asm {
|
|
nop
|
|
nop
|
|
nop
|
|
nop
|
|
}
|
|
|
|
sub1!()
|
|
sub2!(11)
|
|
bar!()
|
|
[XY] ! ()
|
|
[var1] !()
|
|
[mem1]!()
|
|
[$c2.word]!()
|
|
[$c2dd.word]!()
|
|
$c000!()
|
|
$c2!()
|
|
|
|
asm {
|
|
nop
|
|
nop
|
|
nop
|
|
nop
|
|
}
|
|
|
|
sub1()
|
|
sub2(11)
|
|
bar ()
|
|
[AX]()
|
|
[var1] ( )
|
|
[mem1] ()
|
|
[$c2.word]()
|
|
[$c2dd.word]()
|
|
$c000()
|
|
$c2()
|
|
|
|
|
|
asm {
|
|
nop
|
|
nop
|
|
nop
|
|
nop
|
|
}
|
|
|
|
constw()
|
|
sub1()
|
|
main.start()
|
|
}
|
|
|
|
|
|
~ main {
|
|
|
|
start
|
|
foo.bar()
|
|
return
|
|
}
|