flat assembler
Message board for the users of flat assembler.

Index > Projects and Ideas > Excalibur - the first teaser


What do you think about the project?
It's awesome! I wait for more features.
25%
 25%  [ 2 ]
The idea is good, but I'm going to stay with manually FASM.
12%
 12%  [ 1 ]
Not bad, but I don't like HLL code style.
25%
 25%  [ 2 ]
It's terrible! Better if you fast forget about this.
37%
 37%  [ 3 ]
Total Votes : 8

Author
Thread Post new topic Reply to topic
Kazyaka



Joined: 10 Oct 2011
Posts: 62
Location: Earth
Kazyaka 22 Feb 2013, 15:07
Excalibur
Hight-level programming language written in AutoIt v3 by me. Actually it only converts simple scripts to flat assembler syntax, but I hope that the project will be developed in the future.

Features:

You can call functions from system libraries, like in most other language.
Code:
GetModuleHandle(0)    
It supports string as a parameter.
Code:
MessageBox(32, "Text", "Title", 0)    
This feature can be nested to any depth.
Code:
MessageBox(32,"Text", GetCommandLine(), 0)    

Comments are followed by the semicolon character ; and extend to the end of the line.
Code:
;This is a comment    
If you want, I can add multi-line comments.

I also took care of assembly lovers. You can write flat assembler code between AsmBegin and AsmEnd, like:
Code:
AsmBegin
jz @f
mov [iTime],8
@@:
AsmEnd    

The code enclosed with these symbol will add as a whole to output. Note that the keywords are case-sensitivity.

First script:

Save the below text in any file format.
Code:
MessageBox(0,"Hello world!",GetCommandLine(),0) ;Hello world!
ExitProcess(0)    
Then just run the Excalibur.exe and open the script. The converter should create flat assembler file and display dialog box with the process log, like this:
Code:
The process completed successfully.
Input: F:\Excalibur AutoIt\test.au3
Output: F:\Excalibur AutoIt\test.asm
Time: 0.0024 second(s)
System : WIN_XP X86 Service Pack 3    

If you can, write this log in your post. In the other case it will display error.

The converted script will look like that:
Code:
include 'win32ax.inc'
.code
start:
push 0
call [GetCommandLine]
push eax
push string1
push 0
call [MessageBox]
push 0
call [ExitProcess]
.end start
string1 db "Hello world!",0    


What do you think about it?

This is only test version and includes a lot of bugs. So don't report me them, please.


Description:
Download
Filename: Excalibur.rar
Filesize: 295.74 KB
Downloaded: 924 Time(s)

Post 22 Feb 2013, 15:07
View user's profile Send private message Reply with quote
AsmGuru62



Joined: 28 Jan 2004
Posts: 1670
Location: Toronto, Canada
AsmGuru62 22 Feb 2013, 18:14
Cool!
Same idea I am using, but my script has OO properties.
Post 22 Feb 2013, 18:14
View user's profile Send private message Send e-mail Reply with quote
sleepsleep



Joined: 05 Oct 2006
Posts: 13043
Location: ˛                             ⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣Posts: 0010456
sleepsleep 22 Feb 2013, 18:26
should be awesome! =) no source license? =P
Post 22 Feb 2013, 18:26
View user's profile Send private message Reply with quote
Kazyaka



Joined: 10 Oct 2011
Posts: 62
Location: Earth
Kazyaka 22 Feb 2013, 22:46
Actually the project isn't open source. Maybe it'll in the future. I don't know.

You can vote in the poll. It's anonymous!
Post 22 Feb 2013, 22:46
View user's profile Send private message Reply with quote
Kazyaka



Joined: 10 Oct 2011
Posts: 62
Location: Earth
Kazyaka 24 Feb 2013, 13:08
Sometimes this forum is great place to talk to people with similar interests. But I usually feel it's just dying. I need feedback to make new features. "Cool" or "awesome" says nothing for me. By the way, is it sense to continue the project for two people?
Post 24 Feb 2013, 13:08
View user's profile Send private message Reply with quote
MHajduk



Joined: 30 Mar 2006
Posts: 6115
Location: Poland
MHajduk 24 Feb 2013, 17:35
Hi, Kazyaka.

In general, your application works fast and good, anyway I'd like to see two new features there:
  1. As for now it seems that your program doesn't accept text files encoded in UTF-8. It would be very nice if I could use Cyrillic and Polish chars in the strings. If I take the exemplary file of the form presented below:
    Quote:
    MessageBox(0,"Привет всем!",GetCommandLine(),0) ;Hello world!
    ExitProcess(0)
    your application gives me this result:
    Quote:
    include 'win32ax.inc'
    .code
    start:
    push 0
    call [GetCommandLine]
    push eax
    push string1
    push 0
    call [MessageBox]
    push 0
    call [ExitProcess]
    .end start
    string1 db "?????? ????!",0
    Note that I use "quote" BBCode instead of "code" to show you where the problem is because "code" tags seem to deform non-Latin strings.

  2. It would be very convenient if your application can copy my comments from the input file to the output asm file. It would save my time - I wouldn't need to comment some parts of the code again.
Smile
Post 24 Feb 2013, 17:35
View user's profile Send private message Visit poster's website Reply with quote
Kazyaka



Joined: 10 Oct 2011
Posts: 62
Location: Earth
Kazyaka 25 Feb 2013, 15:12
The first serious reply!

MHajduk,

1. It won't added in the next version, but I'll have this in mind in the future.
Z doświadczenia wiem, że to bardzo ważne. :p

2. Nice idea, but I think the project is going in the other way. I wish the Excalibur was once independent (output will EXE file, not ASM). But even now, if you've the line, like this:
Code:
MessageBox(0,"Hello world!",GetCommandLine(),0) ;Hello world!     
where should be comment?
Code:
push 0 ;Here?
call [GetCommandLine] ;Maybe here?
push eax 
push string1 
push 0 
call [MessageBox] ;Or in any other place?    
It's simple line. What if we add also for example If...Then operators (features not available yet) to this line? I've no idea.

Thanks for feedback. I'm waiting for more.
Post 25 Feb 2013, 15:12
View user's profile Send private message Reply with quote
MHajduk



Joined: 30 Mar 2006
Posts: 6115
Location: Poland
MHajduk 25 Feb 2013, 15:41
Kazyaka wrote:
2. Nice idea, but I think the project is going in the other way. I wish the Excalibur was once independent (output will EXE file, not ASM). But even now, if you've the line, like this:
Code:
MessageBox(0,"Hello world!",GetCommandLine(),0) ;Hello world!     
where should be comment?
Code:
push 0 ;Here?
call [GetCommandLine] ;Maybe here?
push eax 
push string1 
push 0 
call [MessageBox] ;Or in any other place?    
It's simple line. What if we add also for example If...Then operators (features not available yet) to this line? I've no idea.
Well, I think that the easiest, the most elegant and logical way is to put the comment after the call of the outermost function in the source line, so in this particular example it should follow "call [MessageBox]":
Code:
push 0 
call [GetCommandLine]
push eax  
push string1  
push 0  
call [MessageBox] ;Hello world!    
Anyway, it's only a suggestion. Wink
Post 25 Feb 2013, 15:41
View user's profile Send private message Visit poster's website Reply with quote
Kazyaka



Joined: 10 Oct 2011
Posts: 62
Location: Earth
Kazyaka 25 Feb 2013, 16:51
MHajduk wrote:
Anyway, it's only a suggestion. Wink

I like little suggestions. They're helping me a lot.

I'm just learning about text encoding. To display dialog box with Polish and other language characters we need to use UNICODE. It doesn't work with UTF-8 format.
Am I right?
Post 25 Feb 2013, 16:51
View user's profile Send private message Reply with quote
MHajduk



Joined: 30 Mar 2006
Posts: 6115
Location: Poland
MHajduk 25 Feb 2013, 17:37
If I'm not mistaken Windows uses internally 16-bit Unicode but FASM to represent those chars uses UTF-8 encoding, hence my suggestions about UTF-8. I don't know how to use Unicode in AutoIt (I've never programmed with it), so you have to check how there Unicode is managed.
Post 25 Feb 2013, 17:37
View user's profile Send private message Visit poster's website Reply with quote
Kazyaka



Joined: 10 Oct 2011
Posts: 62
Location: Earth
Kazyaka 26 Feb 2013, 17:07
After reading many articles and documentations, I think the project will support the most important encoding types. I mean ANSI, UTF-8 (with BOM), UTF-8 (without BOM), UTF-16 Little Endian and UTF-16 Big Endian. Of course, this slows down the program, but it will much simpler for programmers from all over the world.

When it comes to AutoIt, it's the easiest and the most developed language which I've ever learned. Sometimes the one line in this is equal to tens lines written in FASM (this second is much faster). It can save a lot of your work. What should I say more? Just take a look here if you've the time.

I back to work. If you've else some ideas then post them.
Post 26 Feb 2013, 17:07
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.