I have a question about the workings of a particular processor (to give some context, it's the 6502, a very commonly used processor). Would such a question be on topic here?
-
\$\begingroup\$ What is the actual question? What do you want to find out? \$\endgroup\$– Nick AlexeevJul 21, 2014 at 17:01
-
1\$\begingroup\$ @NickAlexeev I wanted to know if instructions in the 6502 processor clear flags that they don't use. E.g. does the "and" instruction clear the carry flag? I figured I should ask if such a question is on-topic before actually asking it, so that I don't add noise or become a nuisance to the site. \$\endgroup\$– rurouniwallaceJul 21, 2014 at 17:04
2 Answers
I think it's on-topic if it's a challenging question for you, but can't you simply look up the instructions and how they affect the flags? I wrote and ported a lot of math routines back in the day and all that information was actually necessary to do that job properly. Never had any problems finding it in the manufacturer's documentation (and that was long before the internet was common).
In this case, a quick web search will easily locate a reference that answers that question exactly and authoritatively, so I don't think it would be a good candidate, and would probably vote to close if I was into that sort of thing.
-
\$\begingroup\$ I am in fact using a reference manual for the processor, and it says the flags aren't affected, but I'm not clear on whether or not they're all cleared before each instruction. \$\endgroup\$ Jul 22, 2014 at 12:16
-
\$\begingroup\$ Ah, that's a reasonable question! No they're not. \$\endgroup\$ Jul 22, 2014 at 12:25
-
2\$\begingroup\$ I probably should have phrased it that way instead. Thanks! \$\endgroup\$ Jul 22, 2014 at 12:26
Yes, questions related to particular processors are on topic. We get questions here frequently on details of making PICs work, for example.
No, a 6502 is not a "very commonly used" processor. Where did you ever get that ridiculous idea from? It was popular with ancient cave dwellers along with the 6800 and the Z80, but hasn't seen much use since neolithic times.
-
1\$\begingroup\$ Actually, you'd be surprised. Chips based on the 6502 are still being made, and they're used in extremely high-volume, cost-sensitive products such as toys. Western Design Center licenses them. \$\endgroup\$ Jul 21, 2014 at 19:55
-
\$\begingroup\$ @OlinLthrop Wait, I'm confused. Are you saying that the question isn't on topic for the site because the 6502 isn't a commonly used processor? \$\endgroup\$ Jul 21, 2014 at 19:59
-
\$\begingroup\$ @Atar: As I said, I think it would be on topic. In addition, I was disagreeing with your statement that 6502 is "very commonly used". \$\endgroup\$ Jul 21, 2014 at 21:32
-
\$\begingroup\$ @Dave: Yes, the decendents of the 6502 live on, but a real 6502 would be quite a klunker today. It had no internal memory, for example, no PWM peripheral, no integrated A/D, and lots of other things even cheap low end microcontrollers have today. \$\endgroup\$ Jul 21, 2014 at 21:34
-
2\$\begingroup\$ ... all of which is irrelevant to questions about the instruction set architecture. \$\endgroup\$ Jul 21, 2014 at 22:37