Jump to content

Recommended Posts

Posted

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 code
  • Use AutoIt variables in ASM code
  • Read CPU ID
  • FPU
  • Caesar Chiffre
  • BubbleSort an Array (+ speed comparison to AutoIt)
  • Fac() function implementation

If you compile your script, you have to statically include the ASM code, the #-Inline syntax only works in SciTe.

LASM.zip

I will answer every single PM, and you are free to ask anything anytime.

Posted
Posted

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted
If Not FileExists(@ScriptDir & "\LASM.dll") Then
    Global $sPath = @ScriptDir & "\", $bData[2] = [1]
    $bData[1] &= "0x4D5A40000100000002.................................

look in LASM.au3

 

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted
  On 7/14/2015 at 8:58 PM, JohnOne said:

Any danger of seeing LASM.dll?

It is inflated and registered by LASM.au3. After that, it will be available as a binary file.

I will answer every single PM, and you are free to ask anything anytime.

Posted

I don't have the source anymore. The server my projects were hosted on was deleted and with it every script and documentation on it. I won't bother rewriting this, though an Assembler is a trivial program, the debugger is not.

I will answer every single PM, and you are free to ask anything anytime.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...