Wikipedia:Reference desk/Archives/Computing/2019 December 25

= December 25 =

program counter flip
In 1983 I knew a programmer whose fondest professional memory was of the time he found a use for an instruction that swapped the bytes of the program counter. "It got me where I needed to go!"

What processor had such an instruction? Why?? Was it merely an instance of an instruction to swap the bytes of any register? —Tamfang (talk) 04:10, 25 December 2019 (UTC)


 * Yeah the PDP-11 had the program counter in register 7 that in many regards was an ordinary machine register, and it had a byte swap instruction that could work on arbitrary registers or memory locations. So you could swap bytes of the PC.  That sort of architectural feature wasn't so uncommon and maybe still isn't.  You might look up "The Story of Mel" for another such shaggy code story, if you haven't seen it.  67.164.113.165 (talk) 07:15, 25 December 2019 (UTC)  (Wow, the first search hit shows we have an article about it, The Story of Mel). 67.164.113.165 (talk) 07:16, 25 December 2019 (UTC)
 * However an exchange operation on the Instruction Pointer (IP) is not possible on the Intel 8086 processor family that gave rise to the x86 architecture and the original IBM PC. The IP is a 16-bit register that holds the address in the code segment (CS) of the next instruction to be executed. "The processor progresses from one instruction to the next in an orderly manner. If a program could change the value of IP or CS directly, a small mistake could result in chaos." P.205 Assembler Inside & Out by Harley Hahn, McGraw-Hill 1992. DroneB (talk) 18:58, 25 December 2019 (UTC)

Why four lights on my modem instead of five?
If I turn off my desktop, one of the five lights on the modem goes out. If I unplug the computer and plug it back in without turning it on, the fifth light comes back on. There is also a green light where the yellow wire from the modem goes into my desktop, which goes off if I turn off my computer when it stays plugged in.

I don't know that much about the purpose of each light, but if the Internet goes out, only the first light stays on. The second light blinks while the Internet tries to come back, and once it does, the third light comes on. I don't remember what the fourth light does when the Internet goes out and comes back.— Vchimpanzee  •  talk  •  contributions  •  20:07, 25 December 2019 (UTC)
 * That first light you are talking about is probably the "LAN" light. The modem should have some labels in small print near the lights. If not the manual for the model will explain what they are. The Ethernet on the computer might stay powered on even if the front button is off, especially if it has a Wake-on-LAN feature. if you remove the power cord from the computer, it will certainly be off. Graeme Bartlett (talk) 22:06, 25 December 2019 (UTC)
 * My cable modem's lights are in the pattern of icons which (cryptically) signify their function. They are: power, upstream, downstream, Internet, LAN. They have at least two colors, plus derblinkenlight, to indicate activity. You could search for your modem's model number and probably download a decent manual for it. Go to the manufacturer's website and select "support". Elizium23 (talk) 02:40, 26 December 2019 (UTC)
 * Your modem was most likely manufactured by a company and given a model number. If so, I strongly suspect that the company placed their name somewhere on the modem and may have even go so far as to place the model number somewhere on the modem. If a person was asking for information about a specific modem, he or she would probably get good assistance by passing along information, such as the manufacturer and model number of the modem. With that information, another person can easily read the manual for the modem and state specific, referenced information about the modem. But, that is just my opinion. Perhaps asking vague questions and expecting specific answers is a better way to go. 135.84.167.41 (talk) 12:39, 26 December 2019 (UTC)
 * The problem is everything is really small print. I'd rather not unplug anything to get a better look at any of it. I even tried to see what the manufacturer name was and it's not one I would know. I was just hoping there was some general concept that wouldn't require me to get specific about the modem, if I just described the behavior of the lights.— Vchimpanzee  •  talk  •  contributions  •  17:55, 26 December 2019 (UTC)


 * The first sentence in your question implies that your motherboard probably powers the LAN port after receiving power. Either that or it just completes a circuit somehow. Checking if the light on the Ethernet port on your computer is on before the computer is turned on will verify that the LAN port is receiving power. If you don't use LAN boot or LAN waking, it would be a good idea to disable it in BIOS. 89.172.38.89 (talk) 00:20, 28 December 2019 (UTC)

THERE ARE FOUR LIGHTS! J I P  &#124; Talk 11:49, 27 December 2019 (UTC)
 * Actually, you could learn quite a bit about your modem from just the MAC address, which is usually trivial to obtain over the network using various tools. The MAC would, at the very least, disclose the manufacturer. Elizium23 (talk) 00:46, 28 December 2019 (UTC)