Bitwise operations: Difference between revisions
m
→{{header|6502 Assembly}}: forgot a # on an immediate operand
Puppydrum64 (talk | contribs) (→{{header|68000 Assembly}}: also revised 6502 example) |
Puppydrum64 (talk | contribs) m (→{{header|6502 Assembly}}: forgot a # on an immediate operand) |
||
Line 155:
;NOT
<lang 6502asm>LDA #$08
EOR #255</lang>
The 6502 doesn't have arithmetic shift right, but it can be replicated, provided the negative flag is set according to the value in the accumulator.
Line 172:
<lang 6502asm>LDA #$01
ROR ;if the carry was set prior to the ROR, A = 0x80. If clear, A = 0.</lang>
=={{header|68000 Assembly}}==
|