2022-02-15 22:16:49 +00:00
|
|
|
%import textio
|
|
|
|
|
2021-10-30 13:15:11 +00:00
|
|
|
main {
|
2022-02-15 22:16:49 +00:00
|
|
|
sub start() {
|
|
|
|
ubyte xx = 10
|
|
|
|
ubyte yy = 10
|
2022-02-15 00:39:12 +00:00
|
|
|
|
2022-02-15 22:16:49 +00:00
|
|
|
routine(xx+yy, yy+99, 99, true)
|
2022-02-15 00:39:12 +00:00
|
|
|
|
2022-02-15 22:16:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
uword @shared r_arg
|
|
|
|
ubyte @shared r_arg2
|
|
|
|
ubyte @shared r_arg3
|
|
|
|
ubyte @shared r_arg4
|
|
|
|
|
|
|
|
asmsub routine(uword arg @AY, ubyte arg2 @X, ubyte arg3 @R0, ubyte arg4 @Pc) {
|
|
|
|
%asm {{
|
|
|
|
pha
|
|
|
|
adc #0
|
|
|
|
sta r_arg4
|
|
|
|
pla
|
|
|
|
sta r_arg
|
|
|
|
sty r_arg+1
|
|
|
|
stx r_arg2
|
|
|
|
lda cx16.r0
|
|
|
|
sta r_arg3
|
|
|
|
rts
|
|
|
|
}}
|
2022-02-15 00:39:12 +00:00
|
|
|
}
|
2022-01-23 01:42:26 +00:00
|
|
|
}
|