Attached: 1 image  I involuntarily (cheers @root42@chaos.social!) spent my Saturday on tracing down an ancient Turbo C bug. 😅  The intr() function,

Charlie Balogh: "I involuntarily (cheers @root42@chaos.social!) sp…" - Mastodon

submited by
Style Pass
2024-11-17 21:30:08
Attached: 1 image I involuntarily (cheers @root42@chaos.social!) spent my Saturday on tracing down an ancient Turbo C bug. 😅 The intr() function, used to call DOS/BIOS interrupts will pass the wrong BP register value to the interrupt. BP is heavily used in stack handling, so intr() generates a BP-reload-and-INT-trampoline on the stack, but the BP reload offset it creates is off-by-four. Fix: Look for the sequence C6 46 F4 E2 in affected binaries, and change E2 to DE. More details in reply. 🧵 #msdos #retrocomputing
Leave a Comment