Assembly bit memory limit in arithmetic

后端 未结 2 1316
暗喜
暗喜 2021-01-25 17:40

I wanted to add the following numbers: 40, 90, 50 and 155 and I get a total of 355.

I wanted to experiment and test out whether the register AL will have a bit limit of

2条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-25 18:11

    As I understand it, DumpRegs gives you the output of EAX. When I convert your answer to HEX, I get 5209284F, the 4F being in the AL. 4F HEX is 79 Decimal, which is 335 - 256. The AL register only holds 8 bits, so 256 is the maximum unsigned integer it can hold.

    Clear EAX before you begin and the results may make more sense.

提交回复
热议问题