prog8/testsource/calls.ill
2017-12-23 01:53:48 +01:00

90 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 () -> () = $ffdd
bar
go sub1
go bar
go [AX]
go [var1]
go [mem1]
go [#mem1] ; @todo error: indirection of address-of makes no sense
go [$c2.word]
go [$c2dd.word]
go $c000
go $c2
asm {
nop
nop
nop
nop
}
fcall sub1
fcall bar
fcall [XY]
fcall [var1]
fcall [mem1]
fcall [#mem1] ; @todo error: indirection of address-of makes no sense
fcall [$c2.word]
fcall [$c2dd.word]
fcall $c000
fcall $c2
asm {
nop
nop
nop
nop
}
call sub1
call bar
call [AX]
call [var1]
call [mem1]
call [#mem1] ; @todo error: indirection of address-of makes no sense
call [$c2.word]
call [$c2dd.word]
call $c000
call $c2
asm {
nop
nop
nop
nop
}
call constw
call sub1
call main.start
}
~ main {
start
call foo.bar
return
}