The MS-DOS 16 bit cross compiler refuses to compile when using an array with valid ranges.
Original Reporter info from Mantis: Bloodbatgot
-
Reporter name:
Original Reporter info from Mantis: Bloodbatgot
- Reporter name:
Description:
When trying to compile a 64000 byte array the cross compiler for MS-DOS refuses, even if -WmLarge is used. It is valid code: Turbo Pascal compiles it without a hitch and it is a way to, for example, access VGA memory to write to it.
Steps to reproduce:
Create an array with a range from 0 to 63999 (check the attached sample file), try to cross compile it for MS-DOS, the compiler refuses with an error:
"Error: The range of the array is too large".
If the same code is tried with dynamic arrays and SetLength, the compiler emits a warning:
"Warning: range check error while evaluating constants (64000 must be between -32768 and 32767)"
And, indeed, the program stops when trying to run it with an error 201.
Mantis conversion info:
- Mantis ID: 36053
- OS: Windows
- OS Build: 10
- Platform: MS-DOS 16 bit
- Version: 3.0.4