home bbs files messages ]

Just a sample of the Echomail archive

<< oldest | < older | list | newer > | newest >> ]

 Message 61 
 Robert AH Prins to All 
 Re: FPC - trying again :( 
 10 Jan 12 23:48:36 
 
Thunderbird/9.0.1
lang.pascal.borland:489
From: Robert AH Prins 

On 2012-01-10 10:56, Marco van de Voort wrote:
> On 2012-01-10, Robert AH Prins  wrote:
>>> That is unaccessable unless you subscribe. Can't you put it up somewhere
>>> else?
>>>
>> https://rapidshare.com/files/4179083034/lift-fpc.rar
>>
>> Executables are renamed to .ex, other assumptions, to enable the use of
>> the supplied VP .VPO files:
>
> Free Pascal Compiler version 2.6.0 [2011/12/25] for i386
> Copyright (c) 1993-2011 by Florian Klaempfl and others
> Target OS: Win32 for i386
> Compiling lift.pas
> Fatal: Can't find unit hhcommon used by lift
> Fatal: Compilation aborted
> Error: d:\FPC\2.6.0\bin\i386-Win32\ppc386.exe returned an error exitcode
> (normal if you did not specify a source file to be compiled
> )

OK, gave it another try:

1) Installation of FPC: accept all suggestions and just install it in 
full in the suggested directory, i.e. c:\fpc\2.6.0\etc

Note: the installer updates the PATH, without asking, coming from a z/OS 
background, I am vehemently opposed to this kind of behaviour!

2) My files in c:\lift

3) Start fp.exe via the Windows Explorer.

4) Set up environment:

- primary file c:\lift\lift.pas
- assembler style: Intel (but no conditional define of "asm")
- mode debug
- backtrace line info for debugging
- rest all defaults

Note: It would be very nice to have an option that would write the 
entire environment into a simple text file for inclusion in postings, I 
haven't been able to figure out where Compiler options are stored, I 
expected fp.ini, but changing the state of e.g. Range Checking does not 
change fp.ini...

5) F9

6) Result: 8 errors, all to do with write_time in all_supp.pas - replace 
the code by

=== CUT ===
procedure write_time;
var ihh: word;
var imm: word;
var iss: word;
var ims: word;

begin
   gettime(ihh, imm, iss, ims);

   asm
     movzx eax, ihh
     mov   eax, dword [eax * 2 + offset h_desc]
     mov   word ptr wt_time[1], ax

     movzx eax, imm
     mov   eax, dword [eax * 2 + offset ms_desc]
     mov   word ptr wt_time[4], ax

     movzx eax, iss
     mov   eax, dword [eax * 2 + offset ms_desc]
     mov   word ptr wt_time[7], ax

     movzx eax, ims
     mov   eax, dword [eax * 2 + offset ms_desc]
     mov   word ptr wt_time[10], ax
   end;

   write(wt_time);
end; {write_time}
=== CUT ===

Q1: Why doesn't FPC allow longint's, like VP that has gettime also 
defined with words?

Q2: Why do I have to add dword qualifiers to the
"mov   eax, dword [eax * 2 + offset h_desc]" statements, shouldn't it be 
clear from the first operand that I'm loading a dword?

7) F9 again: it will just give two warnings of the

Warning: Local variable "..." does not seem to be initialized

kind. Nice to know, but in my case they are harmless.

8) F8-F8-F8 and kaboom... (on the "reset(liftin)" statement)

As it turns out, the incomprehensible error message is just that, but 
adding a "Run -> "Parameter..." -> "-ic:\lift\lift.dat" solves the 
problem (as does setting the "Run Directory..." to c:\lift) - I 
belatedly realized that running the IDE from the installation directory 
would obviously try to find the input file in the same. Oops!

9) F9, F8 and now the program 207's on line 62 of speed.pas and from 
what I can see, it seems that FPC has a problem with untyped variables 
as the "fldl 0x8(%eax)" (Sheesh, AT&T assembler is totally crap, the 
debug window should also be able to show Intel syntax...) loads values 
that do not make any sense and on the eight, where it should load 
94.736..., it loads 1.7164658746958755e+211 and that is obviously far to 
big to ever truncate to a longint...

I'm stuck...

Robert
-- 
Robert AH Prins
robert(a)prino(d)org

--- Internet Rex 2.31
 * Origin: The gateway at Omicron Theta (1:261/20.999)

<< oldest | < older | list | newer > | newest >> ]

(c) 1994,  bbs@darkrealms.ca