Re: [fpc-pascal]Var parameter passing to asm procedure

2004-08-06 Thread Tomas Hajny
On Thu, 05 Aug 2004 16:56:28 +0200, Florian Klaempfl wrote > Ivan Stamenkovic wrote: > > > Hi, > > > > I have a problem when trying to pass some variable parameters to a > > procedure writen using integrated assembler. I have reduced the > > problem to the following code: > > > > program Increme

Re: [fpc-pascal]Var parameter passing to asm procedure

2004-08-06 Thread Tomas Hajny
On Fri, 6 Aug 2004 11:18:01 +0200 (CEST), Marco van de Voort wrote > > Ok, then this can be this way: > > > > procedure increment(var x: dword); assembler; > > asm > > mov eax, x > > inc [eax] > > end; > > > > Is this correct? If the compiler uses registers, the first line is > > transl

Re: [fpc-pascal]Var parameter passing to asm procedure

2004-08-06 Thread Marco van de Voort
> Ok, then this can be this way: > > procedure increment(var x: dword); assembler; > asm > mov eax, x > inc [eax] > end; > > Is this correct? If the compiler uses registers, the first line is > translated to a 'mov eax, eax', otherwise it is something like 'mov eax, > [esp-4]'. Afaik

[fpc-pascal]Re: fpc-pascal digest, Vol 1 #2186 - 8 msgs

2004-08-06 Thread David G Jenkins
The existing solution comprises some Delphi projects to use the DLL and I have derived a solution from one of these but the trial version I am using puts the name of the supplier of the DLL at the foot of each mail, which is undesirable for my purposes. Spending $100+ would solve that but ...

Re: [fpc-pascal]Var parameter passing to asm procedure

2004-08-06 Thread Florian Klaempfl
Ivan Stamenkovic wrote: Hi, I have a problem when trying to pass some variable parameters to a procedure writen using integrated assembler. I have reduced the problem to the following code: program IncrementDemo; {$R+} {$asmmode intel} var a: dword; procedure increment(var x: dword); assembler;