RosettaCodeData/Task/Integer-overflow/6502-Assembly/integer-overflow-5.6502
2023-07-01 13:44:08 -04:00

4 lines
256 B
Text

LDX #$FF
INX ;the carry flag is not affected by this unsigned overflow, but the zero flag will be set
; so we can detect overflow that way instead!
BEQ OverflowOccurred ;notice that we used BEQ here and not BCS.