Would you like signs with those chars?
Would you like signs with those chars?
Posted Oct 26, 2022 8:18 UTC (Wed) by pbonzini (subscriber, #60935)In reply to: Would you like signs with those chars? by khim
Parent article: Would you like signs with those chars?
Compilers at the time weren't super smart on register allocation (also because only AX and BX were both 8-bit accessible and not given special duties by the ISA; there simply wasn't a lot of freedom). Loading from memory into the accumulator was by far the common case. Even though a simple char+char addition would have had to use "XCHG BX,AX" or something like that in order to sign extend both operands, CBW+XCHG would be the same length as clearing BH.
