ivan-pi / fc8

Fortran CHIP-8 interpreter
GNU General Public License v3.0
7 stars 1 forks source link

integer wraparound #12

Open ivan-pi opened 8 months ago

ivan-pi commented 8 months ago

With newer gfortran versions, integer wraparound should be enabled explicitly with the -fwrapv flag. See also,

ivan-pi commented 8 months ago

As discussed on Discord (https://discord.com/channels/465585922579103744/465586212804100106/1194229933216641114) I could also increase the register width and mask the result of certain instructions.