[fpc-pascal] FPC 3.0.4 DOS GO32V2

Lubomír Čabla kladno at gmail.com
Mon Dec 4 23:01:15 CET 2017


Thanks to all for help.

On Mon, Dec 4, 2017 at 3:56 AM, Nikolay Nikolov <nickysn at gmail.com> wrote:

>
>
> On 12/03/2017 11:44 PM, Tomas Hajny wrote:
>
>> On Sun, December 3, 2017 22:10, Nikolay Nikolov wrote:
>>
>>> On 12/02/2017 10:50 PM, Lubomír Čabla wrote:
>>>
>>
>> Hi,
>>
>> FPC 3.0.2
>>>>
>>>> function get_segment_base_address(d : word) : longint;
>>>> function set_segment_base_address(d : word;s : longint) : boolean;
>>>>
>>>> FPC 3.0.4
>>>>
>>>> function get_segment_base_address(d : word) : longint;
>>>> function set_segment_base_address(d : word;s : dword) : boolean;
>>>>
>>>> For get_segment_base_address is correct longint or dword?
>>>>
>>> I think (and I'm the one, who made the change) dword is more correct,
>>> because segment bases can be >=2GB and longint is signed, so results in
>>> a negative number. In theory, it should only matter if you have range
>>> checking turned on, but I think 32-bit linear addresses should only be
>>> declared as dword (or longword) and previous code, that used longint, or
>>> added longint typecasts to avoid range check errors should be fixed.
>>>
>> That makes sense (and DJGPP sources assume the same), but
>> get_segment_base_address should probably return a dword as well then,
>> right?
>>
> That is true. I've missed that one, unfortunately :( I'll probably fix
> this in trunk tomorrow.
>
>>
>>
>> Maybe I should document it in:
>>> http://wiki.freepascal.org/User_Changes_3.0.4 ? I kinda skimped on that,
>>> because it only affects existing code, when range checking is on, and
>>> usually range checking is turned off for low level selector manipulating
>>> code.
>>>
>> Yes, adding a note there would be better.
>>
> Ok, added it.
>
> Nikolay
>
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20171204/99a5930b/attachment.html>


More information about the fpc-pascal mailing list