Re:System Shock 1 source code released under GPL
by tom_ on Friday April 06, 2018 @12:29PM
(#16774507)
There's an entry point in the BBC Micro's OS that's routine that prints a character, or LF+CR if the character is CR (13). This routine prints the CR second, so that when it was called with 13 originally it can fall through into the main, non-translating character print routine with 13 in the accumulator, and then return to the caller that way too. (These two routines promise to preserve the accumulator.) Saves a couple of bytes in the ROM.
(There's also an entry point partway through the wrapper that just prints a newline. DRY and all that.)
The code is not exactly this, but differs from it in no relevant way:
(There's also an entry point partway through the wrapper that just prints a newline. DRY and all that.)
The code is not exactly this, but differs from it in no relevant way:
The Atom's ROM does the same thing, so they presumably just copied this for the BBC. After all, it doesn't really matter which order you print them.