Talk:Program counter

From Wikipedia, the free encyclopedia

[edit] "program counter" is a non-standard misnomer

This thing doesn't count programs. It counts instructions.

Wait, it doesn't count either. It jumps around in response to various events and instructions. IA-32 examples: call, ret, int, syscall, sysenter, sysret, iret...

So it's not a counter. It's a pointer.

Well gee. That must be why Intel called it the instruction pointer in their documentation.

OK, never mind the most popular CPU architecture. What about the Mac or Xbox/360? There we have the next instruction pointer register, and current instruction pointer as a concept in the documentation.

24.110.60.225 00:46, 1 January 2006 (UTC)

[edit] instruction pointer disambiguation

I have been reading a bit in my course book about computer hardware and found the following information:

8086/8088 processors have a 16 bit data bus and a 20 bit address bus, so two registers are needed to contain an address: a segment register and an offset register. The memory address can be obtained by bit-shifting the segment register by four bits to the left and performing a summation with the offset register. The memory a program used is seperated into segments. The segment containing the code is called the code segment, and it's segment register is named CS. It's offset register is named IP or instruction pointer.

This information should be added in a page on instruction pointer and a disambiguation page should be made.

--Bernard François 11:39, 6 March 2006 (UTC)