X86 Lds -
Eleanor muttered, “Oh, you ancient beast.”
The offending line looked innocent:
She wrote a small C helper using memcpy to safely read the 32-bit value into a local unsigned long , then manually set DS and BX via __asm —but with interrupts disabled via _disable() . Clunky, but safe. x86 lds
A decade later, she’d tell interns: “ LDS loads a pointer and destroys your data segment. Respect it. Then avoid it.”
She couldn’t just remove the LDS . The entire linked list traversal depended on far pointers. But she could replace it. Eleanor muttered, “Oh, you ancient beast
The disassembly pointed to one instruction: LDS .
In the spring of 1992, Eleanor, a young and slightly reckless systems programmer, found herself hunched over a beige 386 DX/40. The machine groaned under MS-DOS 5.0, and in front of her was a nightmare: a core dump from a geological modeling program she’d inherited. Respect it
“It poisoned its own segment register,” Eleanor whispered. “Like a snake biting its tail.”
Disney.com