Nathan Baker
2010-08-14 19:21:54 UTC
Hi to all!!!
My problem is "Internal Error: L3118", which arises when I try to
Maybe someone in 'comp.lang.pascal.delphi.misc' knows what that error numberMy problem is "Internal Error: L3118", which arises when I try to
means??
compile my obj file (which assembled in TASM5.0) with my Delphi
project. This error is so unusual because it's arises not in every
time when I try to compile my delphi project which I making in
Delphi7.1 with obj file assembled in TASM5.0.
I dont know why that error arises, because I don't do in assembler
something unusual.
Please if anyone now how to solve that's problem write how.
Unit1.pas
****************************************************************
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls,
Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Label1: TLabel;
Label4: TLabel;
Button2: TButton;
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
Procedure EspNum();STDCall;EXTERNAL;
Procedure WordIn();STDCall;EXTERNAL;
{$L StackOut1}
var
Form1: TForm1;
ESPV: DWord;
implementation
{$R *.dfm}
procedure TForm1.Button2Click(Sender: TObject);
begin
EspNum();
Label1.Caption:=IntToStr(ESPV);
WordIn();
Label4.Caption:=IntToStr(ESPV);
end;
end.
********************************************************************
StackOut1.asm
********************************************************************
Title StackOut for 32 bit
.486P
.MODEL flat, STDCall
;PUBLIC StackOut
PUBLIC WordIn
PUBLIC EspNum
.Data
EXTRN ESPV: DWORD
a32 DD ?
b32 DD ?
c32 DD ?
d32 DD ?
.CODE
WordIn proc
mov a32,eax
mov eax,110
push ax
push esp
pop eax
mov ESPV,eax
pop ax
mov eax,a32
ret
WordIn ENDP
EspNum proc
mov a32,eax
push esp
pop eax
mov ESPV,eax
mov eax,a32
ret
EspNum ENDP
END
********************************************************************
That's project is can't to be compiled because compiler show Error
L3118
Unit1.pas
*********************************************************************
unit UNIT1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls,
Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Edit1: TEdit;
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
Procedure Movl(); STDCall; EXTERNAL;
{$L MOV_32.obj}
var
Form1: TForm1;
x:longint;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
Movl();
Edit1.Text:=IntToStr(x);
end;
end.
**************************************************************
Mov_32.asm
**************************************************************
Title move for 32 bits
.386P
.MODEL FLAT, stdcall
PUBLIC Movl
.DATA
extrn x: DWORD
a DD 64h
.CODE
Movl proc
mov ax,WORD PTR a ;ax<=== low word of a
push bx
mov bx,WORD PTR a+2 ;bx<=== high word of a
mov WORD PTR x,ax ;low word of x<=== ax
mov WORD PTR x+2,bx ;high word of x<=== bx
pop bx
ret
Movl ENDP
END
***********************************************************************
So please if you know how to solve this problem mail me.
project. This error is so unusual because it's arises not in every
time when I try to compile my delphi project which I making in
Delphi7.1 with obj file assembled in TASM5.0.
I dont know why that error arises, because I don't do in assembler
something unusual.
Please if anyone now how to solve that's problem write how.
Unit1.pas
****************************************************************
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls,
Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Label1: TLabel;
Label4: TLabel;
Button2: TButton;
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
Procedure EspNum();STDCall;EXTERNAL;
Procedure WordIn();STDCall;EXTERNAL;
{$L StackOut1}
var
Form1: TForm1;
ESPV: DWord;
implementation
{$R *.dfm}
procedure TForm1.Button2Click(Sender: TObject);
begin
EspNum();
Label1.Caption:=IntToStr(ESPV);
WordIn();
Label4.Caption:=IntToStr(ESPV);
end;
end.
********************************************************************
StackOut1.asm
********************************************************************
Title StackOut for 32 bit
.486P
.MODEL flat, STDCall
;PUBLIC StackOut
PUBLIC WordIn
PUBLIC EspNum
.Data
EXTRN ESPV: DWORD
a32 DD ?
b32 DD ?
c32 DD ?
d32 DD ?
.CODE
WordIn proc
mov a32,eax
mov eax,110
push ax
push esp
pop eax
mov ESPV,eax
pop ax
mov eax,a32
ret
WordIn ENDP
EspNum proc
mov a32,eax
push esp
pop eax
mov ESPV,eax
mov eax,a32
ret
EspNum ENDP
END
********************************************************************
That's project is can't to be compiled because compiler show Error
L3118
Unit1.pas
*********************************************************************
unit UNIT1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls,
Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Edit1: TEdit;
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
Procedure Movl(); STDCall; EXTERNAL;
{$L MOV_32.obj}
var
Form1: TForm1;
x:longint;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
Movl();
Edit1.Text:=IntToStr(x);
end;
end.
**************************************************************
Mov_32.asm
**************************************************************
Title move for 32 bits
.386P
.MODEL FLAT, stdcall
PUBLIC Movl
.DATA
extrn x: DWORD
a DD 64h
.CODE
Movl proc
mov ax,WORD PTR a ;ax<=== low word of a
push bx
mov bx,WORD PTR a+2 ;bx<=== high word of a
mov WORD PTR x,ax ;low word of x<=== ax
mov WORD PTR x+2,bx ;high word of x<=== bx
pop bx
ret
Movl ENDP
END
***********************************************************************
So please if you know how to solve this problem mail me.