Bitwise operations: Difference between revisions

Content added Content deleted
Line 181: Line 181:
CPX #$08
CPX #$08
BNE loop_ASR
BNE loop_ASR
;value will be zero anyway so don't bother
;value will be either 0 or #$FF anyway so don't bother
PHA
PLA ;set the flags according to the accumulator

BMI returnFF
LDA #0
LDA #0
RTS
returnFF:
LDA #$FF
RTS
RTS