3 ms·
Came to this headline thinking "Please be about something other than running DOSBox on a Mac". But indeed, this is fairly novel. It's about running 32 bit i38
by ajross 3y ago
Came to this headline thinking "Please be about something other than running DOSBox on a Mac".
But indeed, this is fairly novel. It's about running 32 bit i386 binaries in long mode (yeah, on a mac/Rosetta) via setting the compatibility/word-size bits in the code segment using an LDT.
FWIW, from the article:
> (PS: I love how the "base" address is chopped up into pieces and sprinkled into random seeming places. I believe it's because the format of this data was itself evolved over time across processor versions.)
Sort of. The descriptor table was added in the 286 which only had 16 bit registers. The segment base/limit fields there were natural and clean. The 386 needed to squeeze in the top bits somewhere without otherwise wasting memory or breaking compatibility.