A Problem with tailbite and ASM code

Everything else that doesn't fall into one of the other PB categories.
Hurga
Enthusiast
Enthusiast
Posts: 148
Joined: Thu Jul 17, 2003 2:53 pm
Contact:

A Problem with tailbite and ASM code

Post by Hurga »

Hi out there

I have a strange problem with my lib code.
It works fine, when I compile it.
But when I use tailbite, it crashes while tailbiteing it.
The error returned ist "eax is not a valid operator.

Has anyone an Idea how to solve this.
Here is the code, and the error is reported here: MOV EAX, [_PB_2DDrawing_CurrentDC]

Inline asm is activated. The "_PB_2DDrawing_CurrentDC" is declared als !Extrn. (as i said, it runs fien when I com pile it, just probs with tailbite.

Code: Select all

Procedure.l SG_GetTextHeight() ; returns the height of the current font
  hDC.l
  MOV EAX, [_PB_2DDrawing_CurrentDC]
  MOV hDC, EAX
  
  CompilerIf #Compiler_OSWin
  GetTextMetrics_(hDC, tm.TEXTMETRIC)
  ProcedureReturn tm\tmHeight
  CompilerEndIf
EndProcedure
Any Help?
Thx
El_Choni
TailBite Expert
TailBite Expert
Posts: 1007
Joined: Fri Apr 25, 2003 6:09 pm
Location: Spain

Post by El_Choni »

Hi,

You must 'include' the 2DDrawing library in your lib, using this:

Code: Select all

TB_Include2DDrawing()
!Extrn _PB_2DDrawing_CurrentDC
Regards,
El_Choni
Post Reply