Integer overflow: Difference between revisions

Content added Content deleted
m (→‎{{header|6502 Assembly}}: added section on 16 bit overflow)
Line 2,677: Line 2,677:


===Game Boy===
===Game Boy===
The Game Boy is missing all control flow commands pertaining to the overflow flag. Overflow can still be detected in theory, but it's a difficult process that requires the exclusive or of the carry flag and whether a subtraction changed the sign of the accumulator or not. Since the Game Boy's CPU cannot natively detect overflow, the CPU <b> will continue with a wrong result.</b>
The Game Boy's CPU has no parity/overflow flag, and therefore all control flow structures related to it have been removed. Overflow can still be detected in theory, but it's a difficult process that requires the exclusive or of the carry flag and whether a subtraction changed the sign of the accumulator or not. Since the Game Boy's CPU cannot natively detect overflow, the CPU <b> will continue with a wrong result.</b>


=={{header|zkl}}==
=={{header|zkl}}==