3.5 Address Expressions
Earlier, this chapter points out that addressing modes take a couple generic forms, including the following:
VarName
[Reg32
]VarName
[Reg32
+offset
]VarName
[RegNotESP32
*scale
]VarName
[Reg32
+RegNotESP32
*scale
]VarName
[RegNotESP32
*scale
+offset
]VarName
[Reg32
+RegNotESP32
*scale
+offset
]
Another legal form, which isn't actually a new addressing mode but simply an extension of the displacement-only addressing mode, is:
VarName
[offset
]
This latter example computes its effective address by adding the constant offset within the brackets to the variable's address. For example, the instruction mov(Address[3], al);
loads the AL register with the byte in memory that is 3 bytes beyond the Address
object (see Figure 3-8 ...
Get The Art of Assembly Language, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.