Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2009-11

Re: cpu

5 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Schatzl Thomas

Hi,

is there anyone who ported cpu.pp (from Thomas Schatzl) to fpc 2.2.4 (target go32v2)

it compiles out of the box with the 2.2.4 go32v2 compiler.

You will want to add a {$CALLING PASCAL} statement at the top of the units - some assembly code assumes some (ancient) calling convention.

If I were you I'd try the same for the graphix package you asked in the other email.

Hth,
Thomas

Jetzt kostenlos herunterladen: Internet Explorer 8 und Mozilla Firefox 3.5 - sicherer, schneller und einfacher! http://portal.gmx.net/de/go/chbrowser
Jonas Maebe
to Schatzl Thomas
Schatzl Thomas wrote 9 lines
Hi, > is there anyone who ported cpu.pp (from Thomas Schatzl) to fpc 2.2.4 > (target go32v2) it compiles out of the box with the 2.2.4 go32v2 compiler. You will want to add a {$CALLING PASCAL} statement at the top of the units - some assembly code assumes some (ancient) calling convention.

I think that should be {$calling oldfpccall} instead.

Jonas

Peter Beisel
to Jonas Maebe

thank's for the hint. I could now fix unit cpu.pp
The problem was the calling convention
(all assambly routines assumed parameters on the stack - but now they are in registers in fact)

But {$calling oldfpccall} didn't work (neither on top of the unit nor in interface or implementation)

I had to define the calling convention behind every assembly routine (eg: function getPITValue( var val: int64): bool32; assembler; oldfpccall;)

Now I hope this will help with graphix too.

regards Peter

Show quoted text 28 lines
On 25 Nov 2009, at 11:46, Schatzl Thomas wrote: > Hi, > >> is there anyone who ported cpu.pp (from Thomas Schatzl) to fpc 2.2.4 >> (target go32v2) > > it compiles out of the box with the 2.2.4 go32v2 compiler. > > You will want to add a {$CALLING PASCAL} statement at the top of the > units - some assembly code assumes some (ancient) calling convention. I think that should be {$calling oldfpccall} instead. Jonas _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal __________ NOD32 4635 (20091125) Information __________ Diese E-Mail wurde vom NOD32 antivirus system geprüft http://www.nod32.com
Schatzl Thomas
to Peter Beisel

Hi again

-------- Original-Nachricht --------

Show quoted text 9 lines
Datum: Wed, 25 Nov 2009 17:11:27 +0100 Von: Peter Beisel An: FPC-Pascal users discussions Betreff: Re: [fpc-pascal] Re: [fpc-devel] cpu thank's for the hint. I could now fix unit cpu.pp The problem was the calling convention (all assambly routines assumed parameters on the stack - but now they are in registers in fact)

Exactly. Has been written years ago.

But {$calling oldfpccall} didn't work (neither on top of the unit nor in interface or implementation)

Worked here with fpc 2.2.4/go32v2, no difference whether I put {$calling oldfpccall} before the "unit" declaration, or between unit declaration and "interface" keyword or after the "interface" keyword.

As soon as it I put it in, the example programs started working. Without they did not :)

Show quoted text 8 lines
Jonas Maebe schrieb: > > On 25 Nov 2009, at 11:46, Schatzl Thomas wrote: > >> You will want to add a {$CALLING PASCAL} statement at the top of the >> units - some assembly code assumes some (ancient) calling convention. > > I think that should be {$calling oldfpccall} instead.

True, thanks.

Hth,
Thomas

GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT! Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01