Bitwise operations: Difference between revisions
Content added Content deleted
Puppydrum64 (talk | contribs) |
Puppydrum64 (talk | contribs) |
||
Line 137: | Line 137: | ||
=={{header|6502 Assembly}}== |
=={{header|6502 Assembly}}== |
||
Integer one is in the accumulator, integer two is in zero page memory location "temp". Both are considered to be unsigned. |
Integer one is in the accumulator, integer two is in zero page memory location "temp". Both are considered to be unsigned. |
||
<lang 6502asm> |
<lang 6502asm>AND temp ;ANDs accumulator with temp. |
||
AND temp ;ANDs accumulator with temp. |
|||
OR temp ;ORs accumulator with temp. |
OR temp ;ORs accumulator with temp. |
||
Line 186: | Line 185: | ||
loop_ASR: |
loop_ASR: |
||
jsr ASR |
|||
LSR |
|||
DEX |
DEX |
||
BPL loop_ASR |
BPL loop_ASR |