2 ms·
> if you care about speed you'll call out from sweet-16 to 6502 code That's another somewhat odd omission from SWEET16 - the only way it lets you combine 6502
by HarHarVeryFunny 3y ago
> if you care about speed you'll call out from sweet-16 to 6502 code
That's another somewhat odd omission from SWEET16 - the only way it lets you combine 6502 assembler and SWEET16 code is via the pattern.
<6502 code>
jsr SWEET16 // switch to inline SWEET16 code
<SWEET16 code>
rtn // SWEET16 instruction to switch back to inline 6502 code
<6502 code>
You can't do the opposite - switch to 6502 code for part of a SWEET16 function, or have 6502 code call (vs switch to) a SWEET16 subroutine (or vice versa).
- kragen 3y agoyeah interestingly, this form of argument passing, where the arguments follow the call instruction, was the standard way to pass arguments on the pdp-8. though usually it was just, like, a fixed number of arguments, not an arbitrary-sized blob as in the sweet-16 case it does seem like it would have been more convenient to orchestrate low-level 6502 subroutines by stringing them together with sweet-16 code than vice versa, but i guess the actual scripting language woz wrote for the apple 2 was integer basic