Why Nostr? What is Njump?
2024-11-17 00:20:06

Charlie Balogh on Nostr: I involuntarily (cheers nprofile1q…k5zd4!) spent my Saturday on tracing down an ...

I involuntarily (cheers !) 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

Author Public Key
npub1e7f05fgusn927w356r5mr0qfgerg2trtafrvmfhm2wmspyt4u08qtvrw5u