First post, by tnmlyger
I've encountered a really strange malfunction of an old PowerBASIC/DOS program and was able to trace it down to this:
print (q1&& mod 7)
I'm initializing a quad integer variable (64-bit) and want the program to output its value mod 7. The correct result is 3, and this is done correctly in native 32-bit Windows pre-8 as well as in the Windows version of DOSBOX.
Moving the same binary to either x86/x64 Linux versions or the Raspberry Pi ARM version consistently yields the result 0. The behavior is consistent across the last few DOSBOX releases, too.
It works fine if the number uses the lowest 56 bits but as soon as you use bits 57-63 (not using bit 64 due to using positive numbers only), it peters out.
I realize this may be a complete outlier of a problem but I wanted to ask if anybody here has had similar issues with larger data types.
Thanks in advance for any advice re: known issues.