Assembly offset calculation rule

天大地大妈咪最大 提交于 2019-12-02 08:42:10

The "internet rule" is correct. You can have 1 base register (bp or bx) and 1 index register (si or di). You can't have bp + bx or si + di at the same time. See Table 2-1. 16-Bit Addressing Forms with the ModR/M Byte in the Intel Instruction Set Reference

Your course book is however correct that any part is optional but at least one is required, so you don't need a base or an index or an offset. These are all valid: [const], [bx], [si], [bx + si], [bp + di + const]. The full list is in the manual I linked above.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!