2010/4/30 spir ☣ :
> Hello,
>
> I wrote a little simulation prog to try and understand better the semantics
> of var parameters (see below code and output).
>
> It seems they behave like if passed via pointers, but also locally _operated_
> via pointers. Meaning there is in ChangeVar no real loca
Hello,
I wrote a little simulation prog to try and understand better the semantics of
var parameters (see below code and output).
It seems they behave like if passed via pointers, but also locally _operated_
via pointers. Meaning there is in ChangeVar no real local variable n (on the
stack). B
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
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
> 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
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;
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]'.
Regards,
Nelson
The asm block c
> The asm block can be this way:
>
> procedure increment(var x: dword); assembler;
> asm
>inc [eax]
> end;
>
> You don't need to worry about segment registers, but don't mess with them!
> I assume that the parameter x is passed on the eax register as Delphi does.
> Please correct me if I'm wr
The asm block can be this way:
procedure increment(var x: dword); assembler;
asm
inc [eax]
end;
You don't need to worry about segment registers, but don't mess with them!
I assume that the parameter x is passed on the eax register as Delphi does.
Please correct me if I'm wrong...
Hi,
I have a pro
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;
asm
push ds
10 matches
Mail list logo