Quote Originally Posted by waran
It is legal, but the address is read and write protected (program will crash).

As for register: This is the default calling convention in delphi/pascal. So if
you don't specify anything its register - different to C where parameters are
always passed via stack unless you specify __fastcall as calling convention.
so i can optimize functions using different calling conventions?

examples?

edit:

i did some tests,
seems like fastcall or register is the slower ? why ?

[pascal]program Project1;

{$APPTYPE CONSOLE}

uses
SysUtils, Windows;

type
TPoint4 = array[0..3] of Single;

procedure Test1(const a,b : TPoint4);
begin
end;

procedure Test2(const a,b : TPoint4); stdcall;
begin
end;

procedure Test3(const a,b : TPoint4); cdecl;
begin
end;

var
a,b : TPoint4;
c : Cardinal;
n : Int64;
begin
n := 0;
c := GetTickCount;
repeat
Test3(a,b);
Inc(n);
until GetTickCount >= c + 1000;
Writeln(n);

n := 0;
c := GetTickCount;
repeat
Test2(a,b);
Inc(n);
until GetTickCount >= c + 1000;
Writeln(n);

n := 0;
c := GetTickCount;
repeat
Test1(a,b);
Inc(n);
until GetTickCount >= c + 1000;
Writeln(n);

Readln;
end.
[/pascal]

results:
123686244
130016857
59970038