I use my routine CALL EXECUTE(RAM ADDRESS) and CALL LOAD and CALL PEEK to move values same way I did this in my game program IN THE DARK
Now I have been told this is no faster then CALL LINK but each time a CALL LINK is called it has to check the VDP STACK, Variables and update values, while CALL EXECUTE does not so that would indicate that my CALL EXECUTE would be faster in the long run the more times called as many less checks and updates are needed. Also as most can be done in Assembly area this means I can push values using Assembly directly without the checks. of course that also means no errors are allowed at all or you crash the system.
CALL EXECUTE works like assembly program:
DATA >8302 * First address
BLWP @>834A * Switch context from GPL WS to Scratch FAC address >834A
CLR @>837C * Clear GPL Status byte for return to XB
RT * Return to GPL WS
* FAC >834A is Workspace and values loaded there are then used in Registers
* Advantage of this is RXB WS is more Registers to use than normal CALL LINK allows.
Now that is the core of CALL EXECUTE, but how small are the programs?
100 CALL INIT
110 CALL LOAD(9838,47,0,38,114,4,32,32,44,3,128)
120 CALL LOAD(12032,0,0,48,0,2,255)
130 CALL EXECUTE(9838)! Above does a VMBR from VDP >0000 to RAM >3000
140 CALL LOAD(9838,47,0,38,114,4,32,32,36,3,128)
150 CALL LOAD(12032,0,0,48,0,2,255)
160 CALL EXECUTE(9838) ! Above does a VMBW from RAM >3000 to VDP >0000
170 CALL VCHAR(1,1,32,768) ! Slower version of CALL CLEAR
180 GOTO 160
The above RXB program used:
Register R0 is the VDP address >0000
Register R1 is the RAM address >3000
Register R2 is size to read or write >02FF
Edited by RXB, Mon Jan 23, 2017 1:14 AM.