Jump to content

Integer overflow: Difference between revisions

m
(→‎{{header|Lua}}: added Lua solution)
Line 133:
=={{header|6502 Assembly}}==
===8-Bit Overflow===
Signed overflow (crossing the 7F-80 boundary) is detected by the CPU's overflow flag <code>V</code>.
 
Unsigned overflow from(crossing 255the toFF-00 0boundary) is detected by the CPU's carry flag <code>C</code>.
 
The following instructions allow for branching based on the state of these flags:
1,489

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.