Jump to content

Talk:Program counter

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by 69.54.62.196 (talk) at 05:10, 17 September 2012. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

WikiProject iconComputing C‑class Low‑importance
WikiProject iconThis article is within the scope of WikiProject Computing, a collaborative effort to improve the coverage of computers, computing, and information technology on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
CThis article has been rated as C-class on Wikipedia's content assessment scale.
LowThis article has been rated as Low-importance on the project's importance scale.
Taskforce icon
This article is supported by Computer hardware task force (assessed as Low-importance).

"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)[reply]

Yes, it counts :-)
The vast majority of instruction fetches are from the next memory location after the previously fetched instruction.
Random-access jumps or branches to other locations are relatively infrequent by comparison.
The PC is a pointer, true, and also a counter
TheAMmollusc (talk) 11:47, 20 October 2008 (UTC)[reply]
Von Neumann himself used the term "Program Counter." I think "Instruction Pointer" is a non-standard misnomer. Whenever I see "IP" in a computer-related context I think of "Internet Protocol" (specifically the "IP address") or "Intellectual Property" before I think of Intel's non-standard misnomer. When I see "PC" in a computer-related context I think of "Personal Computer" and then "Program Counter." "EIP" looks like a sound someone makes when they step on something sharp or slimy, and "RIP" means I'll soon be able to say "RIP" to the x86 that only exists today because of the Datapoint 2200, IBM and Microsoft. I just can't wait for Ivy Bridge: I'd be able to boot DOS twice as fast! — "Windows n. (Win-doze): A 64 bit tweak of a 32 bit extension to a 16 bit user interface for an 8 bit operating system based on a 4 bit architecture from a 2 bit company that can't stand 1 bit of competition." 69.54.60.34 (talk) 05:26, 26 February 2011 (UTC)[reply]
Hey, there's a lot of truth to that. You got me laughing as hard as I have at any joke told on TV at 11:30pm in a long time, thanks. Seems like a perfect example of Not Invented Here syndrome. Trouble is, oftentimes the we set the standards crowd uses superior business strategy to make their version better known and more widely adopted than the inventor's, leaving it up to neutral Wikipedia editors to sort through the confusion. I'll update the article to provide some references and clarify things for people like the student below. Wbm1058 (talk) 20:25, 21 October 2011 (UTC)[reply]
Page 1-5 (PDF page 16) of the Intel iAPX88 Book] says Figure 1-9 shows two 16-bit control registers. First is the IP or instruction pointer which points to the next instruction the bus interface unit will fetch. (The instruction pointer is similar to a Program Counter used in other microprocessors, except that the IP points to the next instruction being fetched, whereas the traditional program counter points to the next instruction to be executed). Intel themselves used the term Program Counter in their 8008 and 8080 processors. BTW, PowerPC calls it a Next Instruction Address Register which is a much better term because "Instruction Pointer" can refer to anything holding an instruction address!

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)[reply]

No, no, please don't. We don't need a content fork. PC and IP are truly two different terms for the same fundamental concept. If you understand this you should LOL at the joke in the above section. This is a related discussion so I'm making it a subtopic under the above. Wbm1058 (talk) 20:25, 21 October 2011 (UTC)[reply]

POV section: "All-pervasive nature of the program counter"

This is horribly unencyclopaedic in its tone, somewhere in-between OR and a POV diatribe. I'm tempted to get rid of it, because it's not particularly informative. Any thoughts? Oli Filth(talk|contribs) 01:08, 25 April 2012 (UTC)[reply]

I thought my version was a vast improvement in terms of this exact problem. In particular, it went from exploring the state-of-mind of the programmer, to merely discussing the implications of the sequential-execution model. I do not see why you reverted to the previous version to attach {{POV}}. Spike-from-NH (talk) 01:43, 25 April 2012 (UTC)[reply]
Oh, that was completely unintentional, I have no idea how that occurred. Reverted now. Oli Filth(talk|contribs) 13:17, 25 April 2012 (UTC)[reply]
Whew! Thank you for the clarification. Spike-from-NH (talk) 17:39, 25 April 2012 (UTC)[reply]