On Wednesday, 12 June 2013 at 01:35:47 UTC, Adam D. Ruppe wrote:
// byte multiplication, answer goes into a 16 bit register, but we could truncate it too


BTW just as a personal note you might be amused by, this multiply instruction beat the crap out of me when I was learning x86 assembly back in the day. Figuring out what was multiplied by what and where the answer went took me an embarrassingly long time, so I avoided mul and div for quite a while when coding. I'd say mul is slow anyway so that's why I was avoiding it, but the truth was I just didn't know how it worked! The instruction sheet saying the product is stored in DX:AX didn't help much, I remember thinking it meant a memory address and getting all kinds of nonsense trying to read from it....

So I'm talking now partially because I'm a bit proud to know all this stuff after my early failures all that time ago.

Reply via email to