[fpc-devel] porting from fpc to tp7

Evgeniy Ivanov lolkaantimat at gmail.com
Sat Mar 24 14:07:12 CET 2007


On Sat, 24 Mar 2007 15:52:20 +0300, Daniël Mantione  
<daniel.mantione at freepascal.org> wrote:


>
> Note that in Dos, the memory at program start is in random state; in  
> other
> words, if your program contains bugs like uninitialized memory, it can
> have different behaviour between runs.

It is the thing that I was talking about (dos games problem). So you  
answered on my question. The differences between fpc and tp is in memory  
allocation. TP gets random state, and it may be unclean from last time,  
and fpc returns mem to OS (and it's clean) and on the next startup I have  
clean memory. I have somewhere some extras pointers and in fpc they point  
to free mem ('' strings) so I don't see the bad result of printing and in  
tp I see them.
Daniël, thank you for help! Now I understood the root of the problem.


>
> This is okay if everything is 1-based. If it is 0-based, you need to be
> carefull in getmem to allocate memory for the 0th element too.

I will consider it.


-- 
Best regards
E.I.



More information about the fpc-devel mailing list