2024-11-15 19:56:56 +00:00
|
|
|
%import floats
|
|
|
|
|
2024-11-13 23:54:07 +00:00
|
|
|
main {
|
2024-11-11 23:11:19 +00:00
|
|
|
sub start() {
|
2024-11-15 22:37:08 +00:00
|
|
|
float zz
|
2024-11-15 19:56:56 +00:00
|
|
|
thing()
|
2024-11-15 22:37:08 +00:00
|
|
|
zz = thang(1.22)
|
2024-11-15 19:56:56 +00:00
|
|
|
bool status
|
|
|
|
cx16.r0L, status = extfunction(42, 11223, 999, 1.22, true)
|
|
|
|
cx16.r0L, status = function(42, 11223, 999, 1.22, true)
|
|
|
|
func1(42)
|
|
|
|
func2(9999)
|
|
|
|
func3(42,9999)
|
|
|
|
func4(42,9999,12345)
|
|
|
|
}
|
|
|
|
|
|
|
|
sub thing() -> bool {
|
|
|
|
cx16.r0++
|
|
|
|
return true
|
|
|
|
}
|
|
|
|
|
2024-11-15 22:37:08 +00:00
|
|
|
sub thang(float arg) -> float {
|
|
|
|
arg++
|
|
|
|
return arg
|
2024-11-15 19:56:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
sub func1(ubyte arg) {
|
|
|
|
cx16.r0L +=arg
|
|
|
|
}
|
|
|
|
|
|
|
|
sub func2(uword arg) {
|
|
|
|
cx16.r0 += arg
|
|
|
|
}
|
|
|
|
|
|
|
|
sub func3(ubyte arg1, uword arg2) {
|
|
|
|
cx16.r0 += arg2
|
|
|
|
cx16.r0L =+ arg1
|
|
|
|
}
|
|
|
|
|
|
|
|
sub func4(ubyte arg1, uword arg2, uword arg3) {
|
|
|
|
cx16.r0L =+ arg1
|
|
|
|
cx16.r0 += arg2
|
|
|
|
cx16.r1 += arg3
|
|
|
|
}
|
|
|
|
|
|
|
|
extsub $2000 = extfunction(ubyte arg1 @A, uword arg2 @XY, uword arg3 @R0, float frac @FAC1, bool flag @Pc) -> ubyte @Y, bool @Pz
|
|
|
|
|
|
|
|
asmsub function(ubyte arg1 @A, uword arg2 @XY, uword arg3 @R0, float frac @FAC1, bool flag @Pc) -> ubyte @Y, bool @Pz {
|
|
|
|
%asm {{
|
|
|
|
rts
|
|
|
|
}}
|
2024-11-08 18:43:59 +00:00
|
|
|
}
|
2024-11-05 22:56:58 +00:00
|
|
|
}
|