RosettaCodeData/Task/Logical-operations/6502-Assembly/logical-operations-5.6502

17 lines
305 B
Plaintext

LDA myValue
CMP #3
BEQ .doTheThing
;if not equal, check myOtherValue
LDA myOtherValue
CMP #5
BNE .skip
;if we got to here, either "myValue == 3" or "myOtherValue" == 5 evaluated to true.
.doTheThing:
STA myResult ;any nonzero value is considered TRUE, so we've stored 5 into myResult.
.skip: