On 10/10/26 19:53, Brian K. White wrote:
On 10/10/26 01:14, Brian K. White wrote:
On 10/9/26 23:02, Brian K. White wrote:

"It's all the way down to 653 bytes"

650!


down to 640, 634 w/o co header


ok that was a bit too far and broke something,
so it was back up to 644 / 638 for a while

But now down to 632 / 626

So so far
legacy = 753 bytes
new = 632 bytes

121 bytes less than legacy teeny and still exactly the same functionality & behavior other than the error messages.

Even with the error codes enabled it's still only 712 bytes,
and with both error codes and dsr check enabled it's 726 bytes,
full co file with header.

For something that already started out so small, and was then worked over by Ron Weisen, I'm surprised how much I'm finding that can be rearranged and refactored out.

Besides the error message code there was plain dead or noop code too, ie code that ran but didn't matter. One example is the LOAD routine, while loading a file from disk to ram, it was maintaining a copy of the chunk_progress loop counter register in ram, (ab)using the packet_type field in the packet buffer to hold this totally unrelated value, and updating it on every byte, for no reason.
It was also initializing some stuff twice.

It's really only possible (for me anyway) after massively fluffing out the asm with lots of notes and register state tracing to track the state of most of the registers before & after every call/ret/etc. But only by doing that I was able to clear up and correct most of my earlier tatal bafflement comments.

https://github.com/bkw777/dl2/tree/master/clients/teeny/src

--
bkw


Reply via email to