September 2017
Beginner to intermediate
290 pages
6h 58m
English
The term "indirect addressing" is quite self-explanatory. As the name of the mode suggests, the address is somewhere in there, but is not used directly. Instead, it is referenced by a pointer, which may be a register or certain base address (immediate address). For example, the following code calls the same procedure twice. In the first call, the address is retrieved using a pointer stored in the rax register, while in the second call we use a variable that stores the address of the procedure we want to call:
; This goes into code section push my_proc lea rax, [rsp] call qword [rax] add rsp, 8 call qword [my_proc_address] ; ; my_proc: ret ; This goes into data section my_proc_address dq my_proc
As we can see, in both ...
Read now
Unlock full access