IchBistTod Posted July 10, 2009 Share Posted July 10, 2009 (edited) Well i was reading up on a post in the example scripts forum that used ASM and someone said ti would be cool to have a way to compile autoit code (turn it into ASM and link it). This would be very nice, as it would make AutoIt programs a LOT faster. I started working on a model that uses autoit to replace text(convert)autoit to ASM, create a file, and link it(via the A86 linker). (I figured autoit would be the best language to convert itself with, because it contains so many functions making string manipulation easier) It only works with consolewrite()(with line breaks being \n) so far, example usage is in the compiler.au3 file. I plan to expand this library vastly, and I appreciate help from anyone that knows ASM. Files are attached. To test extract all files, run "compiler.au3" and then execute the "file.exe" in a cmd window. Advantages: Faster(pure 32 bit ASM) Smaller(42 bytes!) Note: I know this code is not written the best it could be, however I just started learning ASM yesterday, and i wrote this around 3AM. Any improvements/additions highly appreciated. comments please.compiler.zip Edited July 10, 2009 by IchBistTod [center][/center][center]=][u][/u][/center][center][/center] Link to comment Share on other sites More sharing options...
jvanegmond Posted July 10, 2009 Share Posted July 10, 2009 (edited) Some thoughts: - Why bother compiling to ASM when you can compile to C++ and thén compile the C++ code? ( and re-use the AutoIt source code ) - Why write the compiler in AutoIt when you can probably re-use a lot of parts from the AutoIt C++ interpreter? That aside, the project can probably be done as you see it being done. I don't think there will be much response from the developers, because this and many similar issues have been discussed before and all feature requests have been rejected. Edited July 10, 2009 by Manadar github.com/jvanegmond Link to comment Share on other sites More sharing options...
IchBistTod Posted July 10, 2009 Author Share Posted July 10, 2009 (edited) 1)as odd as this sounds, I find C++ more difficult than ASM, seeing as I am a non-oo programmer 2)linking ASM created much smaller file sizes, with much more control over the hardware than C++ allowing for additional functions that control the hardware to be added to autoit 3)ASM is faster 4)writing the compiler in autoit is a good idea because it alows for Rapid Application Development, without any real loss because all its doing is converting strings. 5)Using an ASM linker is simpler/faster then using a C++ linker 6)ASM is just plain much better than C++ power wise. If some of that didn't make sense or was repetitive I'm sorry, its 3:56AM And if the developers do not respond, oh well, if the autoit community wants a real compiler bad enough, they will use this as inspiration to work together to build one, as the developers will not, and I have full faith this can be done, but because of the complexity, I KNOW it will take many people to complete.. Random note:(I guess this is basically taking the autoit syntax and compiling it which means that any function could be added in really, that it doesnt have to exist in autoit, so thats useful as well) ps: did you try it out?? Edited July 10, 2009 by IchBistTod [center][/center][center]=][u][/u][/center][center][/center] Link to comment Share on other sites More sharing options...
jvanegmond Posted July 10, 2009 Share Posted July 10, 2009 This is doomed to failure.. github.com/jvanegmond Link to comment Share on other sites More sharing options...
James Posted July 10, 2009 Share Posted July 10, 2009 Manadar, ASM is fast and you know that. I applaud IchBistTod's work. Keep it up! Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
trancexx Posted July 10, 2009 Share Posted July 10, 2009 Manadar, ASM is fast and you know that....What this means? Really. The way IchBistTod put things this most definitely goes nowhere. That must be said. This is not the way. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
IchBistTod Posted July 10, 2009 Author Share Posted July 10, 2009 I am looking into a second option, converting to C(not C++) then compiling. However I think this option should be a plan B only if the desired functionality can not be acquired with ASM, and if it comes to that point, i know there are ways to use ASM inline with C so all existing procedures could be transfered this way. And I really do not appreciate you saying its doomed to fail, or this is definitely not the way. Not to be a smart ass but I have not seen anyone else even start such a project, so I would like to know why the way I "put things... goes nowhere". I know I am new to these forums, but I am not new to programming. [center][/center][center]=][u][/u][/center][center][/center] Link to comment Share on other sites More sharing options...
trancexx Posted July 10, 2009 Share Posted July 10, 2009 so I would like to know why the way I "put things... goes nowhere".Yo can't compile to 16-bit DOS COM and say it will go somewhere. That's few decades behind us.(Don't mention proofs of concepts to me)But, I'll be the first to say "Well done!" if it starts going somewhere, no worries. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
IchBistTod Posted July 10, 2009 Author Share Posted July 10, 2009 (edited) This is... temporary. Naturally I am looking for a 32 bit compiler. I wouldn't even say its a proof of concept, just s starting point that I plan to expand on. And Using C is plan B, and using C++ may even be plan C I will just have to see how things work out. Edited July 12, 2009 by IchBistTod [center][/center][center]=][u][/u][/center][center][/center] Link to comment Share on other sites More sharing options...
trancexx Posted July 10, 2009 Share Posted July 10, 2009 This is... temporary.Naturally I am looking for a 36 bit compiler.I wouldn't even say its a proof of concept, just s starting point that I plan to expand on.And Using C is plan B, and using C++ may even be plan CI will just have to see how things work out.Do you know what's the atomic number of germanium?... just being curious. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
IchBistTod Posted July 12, 2009 Author Share Posted July 12, 2009 (edited) Its 32.... why do you ask? I see... type, sorry. *fixes* Edited July 12, 2009 by IchBistTod [center][/center][center]=][u][/u][/center][center][/center] Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now