hackclub / putting-the-you-in-cpu

A technical explainer by @kognise of how your computer runs programs, from start to finish.
https://cpu.land
MIT License
4.71k stars 145 forks source link

Should I mention PC? #29

Open kognise opened 11 months ago

kognise commented 11 months ago

From dreamcompiler on HN:

"The CPU stores an instruction pointer which points to the location in RAM where it’s going to fetch the next instruction."

This is also called the Program Counter or PC outside the Intel universe. This is confusing as "PC" also stands for "Personal Computer" but people who learned computing in the days before Intel became popular still call it the PC register.

My response:

I know about the Program Counter terminology, and explicitly chose not to use it to be more architecture-independent... but maybe it was a mistake not mentioning it at all, considering it's such absurdly prevalent terminology.

benjamin051000 commented 7 months ago

people who learned computing in the days before Intel became popular still call it the PC register.

In this context, PC stands for Program Counter. Therefore, is the terminology "Program Counter" not ubiquitous?

Is the idea that folks who call it the "PC register" don't understand that "PC" in "PC register" stands for "Program Counter"? Seems unlikely.

Regardless, this can be cleared up with a simple "Program counter (commonly abbreviated as PC)" if you want to be super careful.