New answers tagged design-choices
2
votes
Why does the x86 not have an instruction to obtain its instruction pointer?
OP specifically clarifies interest in a historical reason. Intel would have to give their exact reasoning but the following points are worth noting.
Intel's 8086 and 8088 were outgrowths of their ...
3
votes
Why does the x86 not have an instruction to obtain its instruction pointer?
There's a highly-upvoted comment, also requoted in this question's highest-voted answer, saying What would you need it for?
So let me tell you about the coolest piece of code I ever wrote, because ...
11
votes
Why does the x86 not have an instruction to obtain its instruction pointer?
So long as a stack exists, the IP address may easily be obtained via the byte sequence "E8 00 00 5B" [CALL $+3 : POP BX] because near calls use PC-relative addressing. On the other hand, ...
10
votes
Why does the x86 not have an instruction to obtain its instruction pointer?
On 8086 the instruction pointer is not a general purpose register you can freely access for reading. On earlier 808x models this was also the case, even though program counter was directly used to ...
15
votes
Accepted
Why does the x86 not have an instruction to obtain its instruction pointer?
As Thorbjørn Ravn Andersen already put it nicely:
What would you need it for?
There is almost no practical (*1) need to obtain the PC address at runtime (*2) - it's a value to be obtained during ...
Top 50 recent answers are included
Related Tags
design-choices × 59history × 23
programming × 8
hardware × 7
6502 × 5
keyboards × 4
unix × 4
c × 4
ibm-pc × 3
amiga × 3
floppy-disk × 3
nes × 3
memory-layout × 3
instruction-set × 3
ms-dos × 2
basic × 2
commodore × 2
cpu × 2
mainframe × 2
compilers × 2
floating-point × 2
dec × 2
sound × 2
game-consoles × 2
color-display × 2