-
![](https://files.techhub.social/accounts/avatars/109/529/887/580/138/749/original/45859d919cc51e32.png)
@ Jim Luther
2025-02-11 23:51:58
nostr:nprofile1qy2hwumn8ghj7un9d3shjtnddaehgu3wwp6kyqpq6yc63w4gqpu8cysd0s2strd4r6p4nnke4w5lmtn2pd5tsac7fvysdew0up Weird memory time. When I first started working on System 7 virtual memory (right after System 7.5.3), it was built using an old version of MPW. I wanted to build VM with the rest of the system using better tools, but couldn’t.
The reason? It used C bit fields to muck with the MMU registers. A newer MPW C changed the bit field implementation. I had to go through the code and change all of it to not use bit fields. The end result was smaller faster code. :D
However, once I had those changes working with the old compiler and attempted to switch to the new compiler, the build crashed at some point. I compiled the sources file by file and finally found the bug: If the last line of a source file was an endif with a comment and there was no return at the end of the line, the compiler crashed. Yeah, I’d added that comment to the endif - the missing return was there in the original code.