prog8/testsource/calls.ill

90 lines
1.4 KiB
Plaintext
Raw Normal View History

2017-12-21 13:52:30 +00:00
; 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
2017-12-23 00:53:48 +00:00
const .float constf = 3.4556677
const .text constt = "derp"
2017-12-23 01:41:41 +00:00
subx sub1 () -> (X?) = $ffdd
2017-12-21 13:52:30 +00:00
bar
2017-12-23 00:53:48 +00:00
go sub1
go bar
2017-12-21 22:05:35 +00:00
go [AX]
go [var1]
2017-12-23 00:53:48 +00:00
go [mem1]
2017-12-23 01:41:41 +00:00
go [#mem1] ; @todo error: indirection of address-of makes no sense, should have outputted jmp mem1 instead of jmp(mem1)
2017-12-23 00:53:48 +00:00
go [$c2.word]
go [$c2dd.word]
2017-12-21 13:52:30 +00:00
go $c000
go $c2
asm {
nop
nop
nop
nop
}
2017-12-23 00:53:48 +00:00
fcall sub1
fcall bar
2017-12-21 13:52:30 +00:00
fcall [XY]
fcall [var1]
2017-12-23 00:53:48 +00:00
fcall [mem1]
fcall [#mem1] ; @todo error: indirection of address-of makes no sense
fcall [$c2.word]
fcall [$c2dd.word]
2017-12-21 13:52:30 +00:00
fcall $c000
fcall $c2
asm {
nop
nop
nop
nop
}
2017-12-23 00:53:48 +00:00
call sub1
call bar
2017-12-21 13:52:30 +00:00
call [AX]
call [var1]
2017-12-23 00:53:48 +00:00
call [mem1]
call [#mem1] ; @todo error: indirection of address-of makes no sense
call [$c2.word]
call [$c2dd.word]
2017-12-21 13:52:30 +00:00
call $c000
call $c2
2017-12-21 22:05:35 +00:00
asm {
nop
nop
nop
nop
}
call constw
call sub1
call main.start
2017-12-21 13:52:30 +00:00
}
~ main {
start
call foo.bar
return
}