Is there is a way to get the address of a register?

和自甴很熟 提交于 2019-12-03 08:16:28

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.

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.

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