News for hackers. Stuff that matters.
Re:The lost ways of programming: Commodore 64 BASIC (2020) by tomcam on Friday September 16, 2022 @02:54PM (#32870494)
Wait wut?
Re:The lost ways of programming: Commodore 64 BASIC (2020) by flohofwoe on Friday September 16, 2022 @05:07PM (#32872007)
If you programmed in machine code (without a fancy assembler), you can't simply move your instructions around in memory to make room for bugfixes, so instead you place a couple of nops here and there (usually in strategic places like the start of a function or right after a conditional branch, so that you can later replace those nops with jumps or subroutine calls to add patches.
Re:The lost ways of programming: Commodore 64 BASIC (2020) by tomcam on Friday September 16, 2022 @05:31PM (#32872252)
OK, I get it now. You brought me back. I now do remember peppering my X86 asm code with those nops when writing early code generators, for example if a JMP instruction might go past 127 bytes.
Re:The lost ways of programming: Commodore 64 BASIC (2020) by bombcar on Friday September 16, 2022 @05:21PM (#32872153)
http://www.neocomputer.org/projects/et/ has some really good examples of that kind of debugging (reusing existing space/instructions)