This is an excellent walkthrough, but I’m genuinely tickled that using weird linker hacks is now considered “less hackish” than using a normal assembler “org” directive.
I’d assume that’s because the 55 AA signature is data for the loader (in this case, the BIOS), not the code above. So putting it in the code could be considered similar to writing a PE/ELF file using assembler directives instead of a linker.
Yeah, totally makes sense, and is “cleaner” if you come at the problem with a fresh perspective.
My amusement is because asm of the era tended to use ORG to change “sections” (base address), and linking was an optional step. From the old-timer perspective, adding a linker phase just to specify where 2 bytes of data should go is “weird”. From a modern perspective, where a linker is always in play, it’s the obvious correct way.
This is an excellent walkthrough, but I’m genuinely tickled that using weird linker hacks is now considered “less hackish” than using a normal assembler “org” directive.
I’d assume that’s because the
55 AA
signature is data for the loader (in this case, the BIOS), not the code above. So putting it in the code could be considered similar to writing a PE/ELF file using assembler directives instead of a linker.Yeah, totally makes sense, and is “cleaner” if you come at the problem with a fresh perspective.
My amusement is because asm of the era tended to use ORG to change “sections” (base address), and linking was an optional step. From the old-timer perspective, adding a linker phase just to specify where 2 bytes of data should go is “weird”. From a modern perspective, where a linker is always in play, it’s the obvious correct way.