Jump to content

Integer overflow: Difference between revisions

no edit summary
No edit summary
Line 131:
DS 0F alignment
BITFPO DC BL1'00001000' bit20=1 [start at 16]</lang>
=={{header|6502 Assembly}}==
Signed overflow (crossing the 7F-80 boundary) is detected by the CPU setting the overflow flag.
Unsigned overflow from 255 to 0 is detected by setting the carry flag.
In either case, if the programmer expects either to occur, a branch can be taken depending on the status of the flag after a calculation where overflow could cause a problem.
 
 
=={{header|Ada}}==
1,489

edits

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