Page 1 of 1

Tailbite, inline asm inside lib problems

Posted: Sat Feb 14, 2004 7:31 pm
by Justin
If you try to make a lib with this

Code: Select all

Structure VARIANT
  vt.w
  wReserved1.w
  wReserved2.w
  wReserved3.w
  structureunion
  	ival.w				;SHORT			VT_I2
  	lVal.l				;LONG				VT_I4
  	fltVal.f			;FLOAT			VT_R4
  	pival.w				;SHORT			VT_BYREF|VT_I2
  	bstrVal.l			;BSTR				VT_BSTR
  	pdispVal.l		;IDispatch	VT_DISPATCH
  	dblVal.b[8]		;DOUBLE			VT_R8
  endstructureunion
EndStructure
shows an error and you are prompted to choose a movie :)

Posted: Sat Feb 14, 2004 7:41 pm
by Justin
a strange thing happens in this forum no matter what a copy the clipboard always pastes the previous structure..

the procedure

proceduredll.f foo()
shared gvar.VARIANT, gfloat.f

;double to single
!FLD qword [v_gvar+8]
!FSTP dword [v_gfloat]

procedurereturn gfloat
endprocedure

Posted: Sun Feb 15, 2004 11:38 am
by Justin
just found a workaround for the double to single conversion without asm (VariantChangeType_() ), anyways that error is very strange

Posted: Sun Feb 15, 2004 2:53 pm
by El_Choni
I'll check this, thanks.

Posted: Mon Feb 16, 2004 2:53 pm
by El_Choni
Fixed: TailBite was taking v_gvar+8 as a variable name instead of v_gvar.

About the movie request, I can't reproduce it. It would be the funniest bug ever in this project.

Posted: Mon Feb 16, 2004 6:03 pm
by Justin
Great, it compiled the lib :D

don't forget to say that ProcedureDLL/EndProcedure is case sensitive otherwise TB crashes i think its not in the help file. thanks