<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif">Thanks to all for help.</div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Dec 4, 2017 at 3:56 AM, Nikolay Nikolov <span dir="ltr"><<a href="mailto:nickysn@gmail.com" target="_blank">nickysn@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
<br>
On 12/03/2017 11:44 PM, Tomas Hajny wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Sun, December 3, 2017 22:10, Nikolay Nikolov wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 12/02/2017 10:50 PM, Lubomír Čabla wrote:<br>
</blockquote>
<br>
Hi,<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
FPC 3.0.2<br>
<br>
function get_segment_base_address(d : word) : longint;<br>
function set_segment_base_address(d : word;s : longint) : boolean;<br>
<br>
FPC 3.0.4<br>
<br>
function get_segment_base_address(d : word) : longint;<br>
function set_segment_base_address(d : word;s : dword) : boolean;<br>
<br>
For get_segment_base_address is correct longint or dword?<br>
</blockquote>
I think (and I'm the one, who made the change) dword is more correct,<br>
because segment bases can be >=2GB and longint is signed, so results in<br>
a negative number. In theory, it should only matter if you have range<br>
checking turned on, but I think 32-bit linear addresses should only be<br>
declared as dword (or longword) and previous code, that used longint, or<br>
added longint typecasts to avoid range check errors should be fixed.<br>
</blockquote>
That makes sense (and DJGPP sources assume the same), but<br>
get_segment_base_address should probably return a dword as well then,<br>
right?<br>
</blockquote></span>
That is true. I've missed that one, unfortunately :( I'll probably fix this in trunk tomorrow.<span class=""><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Maybe I should document it in:<br>
<a href="http://wiki.freepascal.org/User_Changes_3.0.4" rel="noreferrer" target="_blank">http://wiki.freepascal.org/Use<wbr>r_Changes_3.0.4</a> ? I kinda skimped on that,<br>
because it only affects existing code, when range checking is on, and<br>
usually range checking is turned off for low level selector manipulating<br>
code.<br>
</blockquote>
Yes, adding a note there would be better.<br>
</blockquote></span>
Ok, added it.<span class="HOEnZb"><font color="#888888"><br>
<br>
Nikolay</font></span><div class="HOEnZb"><div class="h5"><br>
______________________________<wbr>_________________<br>
fpc-pascal maillist  -  <a href="mailto:fpc-pascal@lists.freepascal.org" target="_blank">fpc-pascal@lists.freepascal.or<wbr>g</a><br>
<a href="http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal" rel="noreferrer" target="_blank">http://lists.freepascal.org/cg<wbr>i-bin/mailman/listinfo/fpc-pas<wbr>cal</a></div></div></blockquote></div><br></div></div>