3 ms·
> like using intel's x86 half register to do ghetto fixed point Just curious, what's this and how does it work?
by witty_username 10y ago
> like using intel's x86 half register to do ghetto fixed point
Just curious, what's this and how does it work?
- pandaman 10y agox86 has a bizarre register architecture. 4 "general purpose" registers are like this : EAX & 0xffff == AX == (AH<<8) | AL i.e. the lower 16 bit portion of a 32bit register is a separate 16bit register, which, in turn, is made of two 8bit registers. If you stored a 8.8 value in a AX, for example, you could immediately access the integer part through AH. Of course, 8.8 numbers are not good for all values but you could write fast texturing loops with them (256x256 used to be a solid size for a texture so 8.8 was okay for texcoords).
- tripzilch 10y agowhoa, my compliments how you managed to explain in a single paragraph both the bizarre x86 registers and fixed point math, succinctly :)