Finally finished porting my WIP #CommanderX16 project to the GS. Despite adding a few minor enhancements the new code is about 13KB shorter than the old one.
Seems the 65816 can actually deliver higher code density than the 65C02, even though many instructions are one byte longer.
Being able to do 16 bit operations with a single instruction is certainly a factor. But I suspect that the larger address space had an even bigger impact (less costly banking and paging in/out code).
Writing a complex text formatting algorithm in 65816 assembly is interesting. For some definition of interesting.
#CommanderX16
Dealing with a non-deterministic bug in 65816 assembly is incredibly hard. But it is also intensely satisfying when you manage to fix such a bug.
#CommanderX16
Writing self-modifying code. I feel so naughty. #CommanderX16
Off-by-one errors are annoying. Off-by-one errors when working in 65816 assembly are double annoying.
#CommanderX16
Passing arguments via the stack on a 65816 is extremely error-prone.
#CommanderX16