there's an tutorial at freebasic-portal.de about Inline-Assembler. Okay, last update was 2009 ...
But this code doesn't compiles anymore (but surely it did anno 2009):
Code: Select all
Type pnt
x As Integer
y As Integer
End Type
Dim Punkt As pnt
Punkt.x = 17
Punkt.y = 55
Print Punkt.x, Punkt.y
Asm
mov eax, [Punkt] 'eax = Punkt.x
add eax, [Punkt+4] 'eax + Punkt.y
Inc eax 'eax + 1
Shr eax, 1 'eax=(Punkt.x + Punkt.y +1)/2
mov [Punkt], eax 'Punkt.x = eax
mov [Punkt+4], eax 'Punkt.y = eax
End Asm
Print Punkt.x,Punkt.y
The message is, that the return move from eax to the UDT member is "unsupported".
Any Ideas? Because I'm going to write an 128-Bit datatype for x64 freebasic and I for that I have to do some operations in Assembler, like the 64bit * 64bit = 128 bit multiply, which is supported by the platform. My datatype is an UDT with a high and a low Ulongint, and I'd like to write to these UDT members, of course ...