This is the Inline UDF for an Assembler I wrote way, way back when I started AutoIt. The Light Assembler is contained in an ActiveX DLL and registered by LASM.au3. It is a standard assembler with a light syntax debugger. Used in AutoIt like this: #include <LASM.au3>
; Make room for returned string:
Local $strCPU = DllStructCreate("char[20]")
# pushad
# mov edi, [ebp+12]
# xor eax, eax
# cpuid
# mov [edi+0], ebx
# mov [edi+4], edx
# mov [edi+8], ecx
# popad
# ret 16
$pTest = LASM_ASMToMemory(LASM_GetInline())
LASM_CallMemory($pTest, DllStructGetPtr($strCPU), 0, 0, 0, "ptr")
MsgBox(0, "LASM", DllStructGetData($strCPU, 1))This is old. Very old. You probaly should not use this, but there are a few examples included: Use AutoIt functions in ASM codeUse AutoIt variables in ASM codeRead CPU IDFPUCaesar ChiffreBubbleSort an Array (+ speed comparison to AutoIt)Fac() function implementationIf you compile your script, you have to statically include the ASM code, the #-Inline syntax only works in SciTe.
LASM.zip