Is there is a way to get the address of a register? For example, the address of the eax register (not it's content).
相关问题
- Null-terminated string, opening file for reading
- What's the difference between 0 and dword 0?
- Translate the following machine language code (0x2
- Where can the code be more efficient for checking
- NASM x86 print integer using extern printf
相关文章
- Is it possible to run 16 bit code in an operating
- How to generate assembly code with gcc that can be
- Select unique/deduplication in SSE/AVX
- Optimising this C (AVR) code
- Why does the latency of the sqrtsd instruction cha
- Difference in ABI between x86_64 Linux functions a
- x86 instruction encoding tables
- x86 Program Counter abstracted from microarchitect
Registers are physical electrical components inside the CPU's circuitry. They are not in RAM and so have no address. To access it's contents you use the
mov
instruction.There has been architectures where low addresses were used to designate CPU registers, like the Univac 1100 series of computers.
http://en.wikipedia.org/wiki/UNIVAC_1100/2200_series
Current x86 hardware doesn't work that way, so you cannot get the address of the EAX register - it just doesn't have one.
Registers are the internal processor storage. They do not have memory addresses, because they do not reside in memory. You identify them by their names: EAX, for example.
That said, memory-mapped registers do exist, but in any modern processor they belong to other devices, never the CPU. They are assigned "fake" memory addresses for convenience. See memory-mapped I/O.