Report from Geoff Body:
I think the following change for GETNEXTINQUEUE in I.QLIB.S will halve the
processing time when there are more than two handles in the queue.
LDY #8
LDA [QHANDLE],Y
PHA
LDY #6 - start at MSB of 2 Handle
]L1 LDA [QPTR],Y
TAX
DEY
DEY
LDA [QPTR],Y
PHA
DEY
DEY
TXA
STA [QPTR],Y
DEY
DEY
PLA
STA [QPTR],Y
TYA
CLC
Modify the following line from ADC #8 to ADC #10 (not a hex number).
Following this code by hand indicates that the queue gets duplicated half handle moves, starts at offset 6 -> 2, 4->0, which moves handle 2 to handle 1, adds 8 for new offset and would go 8->4, 6->2 at which point LSB of handle 3 and MSB of handle 2 gets moved.
At end of loop Y points to LSB of current moved Handle and needs to point to MSB of the Next Handle to be moved, which is + 4 to the LSB of the old moved Handle, +4 to the LSB of the next Handle to be moved, +2 to the MSB of next Handle to be moved.
ADC #10
TAY
CMP 1,S
BCC ]L1
This code is the same as is used in MacIP LL and was changed in this way under
https://sourceforge.net/p/marinetti/support-requests/59/
which will be made permanent under
https://sourceforge.net/p/marinetti/bugs/68/
(Internal note: Code changes have been made to Sweet16:NewDev2:Testbuild
Built in 3.0b8)