Category:6502 Assembly: Difference between revisions
m
→Order Of Importance
Puppydrum64 (talk | contribs) No edit summary |
Puppydrum64 (talk | contribs) |
||
Line 219:
This concept is related to the one above. If you are implementing your own flags variable in software for controlling the execution of some function, bits 7 and 6 (the leftmost two bits) are the easiest to check. The 6502 does not have the same "bit test" command that is seen on the 68000, z80, 8086, or ARM. The 6502's <code>BIT</code> command can quickly check the value of bits 7 or 6 of a number stored in memory, but the other bits take longer since you have no choice but to load that variable into the accumulator and <code>AND</code> it with a bit mask.
<
;check bit 7
Line 239:
The moral of the story is, since two of the flags are easier to check than the rest, the ones that need to be checked the fastest or most frequently should be flags 7 or 6.
===Know Your Opcodes===
|