Jump to content

Real Time Assembler


Andreik
 Share

Recommended Posts

Nice add-on to code in assembler. Would be nice to have the reverse way (disassembler). 😉

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Link to comment
Share on other sites

  • 5 months later...

@Andreik I was recently playing with your RTA and found a few problems --

  • I had to change your #include delimiters to "" instead of <> to avoid the wrong copy of BinaryCall.au3 from being accessed
     
  • Memory_DllOpen returns an error when running in x64 mode, resulting in the following error --
    "C:\Users\danpo\OneDrive\Desktop\AutoIt\RTA\Real Time Assembler.au3" (72) : ==> Subscript used on non-accessible variable.:
    ConsoleWrite('Fasmg version: ' & Memory_DllCall($hFasmg, 'str', 'fasmg_GetVersion')[0] & @CRLF)
    ConsoleWrite('Fasmg version: ' & Memory_DllCall($hFasmg, 'str', 'fasmg_GetVersion')^ ERROR

    Either there needs to be error checking added or simply display a message and exit if @AutoItX64 equals 1.

  • I encounter a bug where commenting the line include 'line.inc' causes the error "Variable used without being declared". IMO, the regex for determining $iLine and $iDirective should not include "\S" in the initial capture group.

Link to comment
Share on other sites

1 hour ago, Danp2 said:

Memory_DllOpen returns an error when running in x64 mode, resulting in the following error --

On 6/4/2023 at 8:35 PM, Andreik said:

Even if it can generate code for various CPUs, use the call/execute functionality just in 32-bit mode (really, don't try to run 64-bit code and then ask why it doesn't work or why it's crashing :mad2: ).

But I agree that I could add a message to prevent the code to be executed in 64-bit applications. Actually there is an unofficial 64bit version of fasm but I don't know when I will have time to test some cases and maybe to include it in this project.

1 hour ago, Danp2 said:

I had to change your #include delimiters to "" instead of <> to avoid the wrong copy of BinaryCall.au3 from being accessed

What do you mean? Do you have another BinaryCall.au3 somewhere?

I will check the other issue addressed above and I will come back with an answer soon. Thanks for feedback.

Edited by Andreik

When the words fail... music speaks.

Link to comment
Share on other sites

2 hours ago, Danp2 said:

I encounter a bug where commenting the line include 'line.inc' causes the error "Variable used without being declared". IMO, the regex for determining $iLine and $iDirective should not include "\S" in the initial capture group.

This might be an option or a negative lookup to check if the line include 'line.inc' it's commented but I preferred the lazy way, to modify this line in Compile():

If $iLine And $iDirective And $iCodeLines Then

This will work because $iCodeLines will be set just if there is a line that starts with include 'line.inc' but I agree, there are betters ways for doing this, including a better regex. Feel free to change it by your own desire. I uploaded a new version and hopefully I fixed the problems that your encountered. Thanks again for feedback.

When the words fail... music speaks.

Link to comment
Share on other sites

2 hours ago, Andreik said:

What do you mean? Do you have another BinaryCall.au3 somewhere?

Yes... in the directory where I keep my 3rd party UDFs.

1 hour ago, Andreik said:
If $iLine And $iDirective And $iCodeLines Then

This won't work because the variable is declared locally in the For loop, so it doesn't exist in some instances. You could do this instead --

If $iLine And $iDirective And IsDeclared("iCodeLines") Then

 

Link to comment
Share on other sites

1 minute ago, Danp2 said:

This won't work because the variable is declared locally in the For loop, so it doesn't exist in some instances. You could do this instead --

I didn't mentioned but I changed that too. Check out first post. :whistle:

When the words fail... music speaks.

Link to comment
Share on other sites

Anyway I am planning to change the GUI and other parts of the script so the user might be able to define structures and modify the data within and then use the pointers to these structures as parameters in calls. When this changes will take place probably I will replace that part also with better regex patterns.

When the words fail... music speaks.

Link to comment
Share on other sites

This would require some changes to generate opcodes for the source code mentioned and even more changes to call the code directly from the application. I will keep this request on my To Do/ To Investigate list and have a look as soon as I get some time.

When the words fail... music speaks.

Link to comment
Share on other sites

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
 Share

×
×
  • Create New...