flat assembler
Message board for the users of flat assembler.

Index > High Level Languages > eax = 1

Author
Thread Post new topic Reply to topic
ForumJoiner



Joined: 19 Oct 2006
Posts: 8
ForumJoiner 19 Oct 2006, 18:07
Hello,

Does anyone know an assembler that can understand this:

a) eax = 1, instead of mov eax,1?

b) function name (param_actual_1=param_generic_1, ...)
Example:
function ShowErrorMessage(hWnd=myhWnd,dwError=mydwError);
In this way, I always know what all those parameters are and what did I miss.

Thank you.
Post 19 Oct 2006, 18:07
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8356
Location: Kraków, Poland
Tomasz Grysztar 19 Oct 2006, 18:40
Try those links about fasm macros. Wink

http://board.flatassembler.net/topic.php?t=4648 (this one for the b)
http://board.flatassembler.net/topic.php?p=45684#45684 (also somehow related to b)
http://board.flatassembler.net/topic.php?t=4638 (the "let" macro example is just slightly related to a)
http://board.flatassembler.net/topic.php?t=4362 (not really related, but also interesting)
Post 19 Oct 2006, 18:40
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 19 Oct 2006, 19:12
I think nearest to what you want is "HLA" - google for it.
Post 19 Oct 2006, 19:12
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
Chewy509



Joined: 19 Jun 2003
Posts: 297
Location: Bris-vegas, Australia
Chewy509 19 Oct 2006, 23:41
Not really an assembler, probably not what you are after and targeted at amd64 but:

http://board.flatassembler.net/topic.php?t=3570

PS. Sorry for the self plug.
Post 19 Oct 2006, 23:41
View user's profile Send private message Visit poster's website Reply with quote
Kain



Joined: 26 Oct 2003
Posts: 108
Kain 20 Oct 2006, 00:52
vid wrote:
I think nearest to what you want is "HLA" - google for it.


No, you can't easily do that in HLA (not without writing a complicated parser using the HLA CTL).

_________________
:sevag.k
Post 20 Oct 2006, 00:52
View user's profile Send private message Reply with quote
Kain



Joined: 26 Oct 2003
Posts: 108
Kain 20 Oct 2006, 00:55
The closest thing to what you are looking for is Terse.

Take a look here: http://terse.com/ddj.pdf

Mind you, it's not free.
Post 20 Oct 2006, 00:55
View user's profile Send private message Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo 20 Oct 2006, 02:56
(from Octasm 0.15 for DOS, example file \R):

Code:
define REP()  # #1 loop <1
define PRN2()  PRN1(e#1x, #1x, #1h, #1l)
define PRNF()  test eax,#1 jz >1 prn(d"%nb #2 ") #
PRN2(a,c,d,b)

#escribenumf pushad eax='    ' ecx=7
        REP(push eax) cl=31 push ecx
        edi=esp+1 fixtoa() prn(esp)
        add sp,32 popad ret
    


P.S. Don't forget OctaOS! Very Happy
Post 20 Oct 2006, 02:56
View user's profile Send private message Visit poster's website Reply with quote
ForumJoiner



Joined: 19 Oct 2006
Posts: 8
ForumJoiner 20 Oct 2006, 09:36
Kain wrote:
The closest thing to what you are looking for is Terse.

Take a look here: http://terse.com/ddj.pdf

Mind you, it's not free.

Wow! That is exactly what I need.
It's not free, but it's possible. I was wondering, would it be so hard to implement this kind of parser in fasm? What books should I read to implement my own parser?

This is from the ddj.pdf
>> The terse language syntax and compiler are Copyright © 1987-1995, Jim Neil, All Rights Reserved.
What does it mean? If I want to make my own parser that understands eax = 1, am I not allowed? I thought it's not about copyright when it comes to ideas, but to patents.


Last edited by ForumJoiner on 20 Oct 2006, 09:54; edited 2 times in total
Post 20 Oct 2006, 09:36
View user's profile Send private message Reply with quote
Niels



Joined: 17 Sep 2006
Posts: 255
Niels 20 Oct 2006, 10:42
Hello ForumJoiner,

First the common worldly-interpretation of reality...

Well, idea and or patent copyrights differs from country to country.

Second, the less known upper-reality...

GOD knows who is getting what and who stole whatever, those get judged, not by 'a country, man-made law', but His, the only real law.

Niels.


ps.
Making a parser that understands eax=1, is of course allowed, making and implementing the exact copy of Terse is not allowed, unless you accidently made it the same and being through a similar process Jim had to go through to make it in the first place. There is more to it, the real idea behind copyright is honesty.
Post 20 Oct 2006, 10:42
View user's profile Send private message Reply with quote
ForumJoiner



Joined: 19 Oct 2006
Posts: 8
ForumJoiner 20 Oct 2006, 10:58
That's a relief. If honesty is the main thing, that it will be easy for me.

I don't want to replicate Terse. First of all, I don't even know how it looks, as long as I couldn't find on terse.com a trial copy to download.

What I want is to have an easy syntax and not to spend unnecessary time thinking in instructions, rather than thinking in actions. I want to set eax = 1, not to know how the computer does this. If set eax = 1 can be translated by a parser to mov eax,1 I'm happy.

That's something special about fasm: with one minor exception, ALL the examples I tried worked from the very first time.
This includes compiling the IDE. Well, it never happened for me before.
The only thing didn't work at the beginning was due to the INCLUDE statement.
I didn't know why WIN32A.INC was not found and the way I understood how to fix this error took me 5 minutes.
I was thinking about putting a little hint near to the error.
"WIN32A.INC was not found. Did you set the environment INCLUDE to FASM_FOLDER/INCLUDE?"
If, at one point, I'll be able to write my own preprocessor (or how it is called), I want to share it with the others.
Who knows, maybe someone else would be interested in an easier syntax.
Post 20 Oct 2006, 10:58
View user's profile Send private message Reply with quote
Niels



Joined: 17 Sep 2006
Posts: 255
Niels 20 Oct 2006, 14:44
Hello ForumJoiner,

To be honest, I am quite happy about ASM-syntax in general, instruction operand,operand. Sometimes a length specifier is needed, FASM needs byte, word, etc, maybe these could be shortened to sb, sw, etc. or lb, lw, etc. but these are minor things.

Niels.

ps.
I do agree that programming ASM needs a way of thinking, this is still the 'BASIC' way to me. So if one learns BASIC and after this ASM, things will work out and no HLA is needed. I must say that learning the object-oriented way can help making better 'top-down-code' as assembly for the greater part is.
Post 20 Oct 2006, 14:44
View user's profile Send private message Reply with quote
Niels



Joined: 17 Sep 2006
Posts: 255
Niels 20 Oct 2006, 15:05
I believe a good tutor book could teach you ASM rightaway with the apropriate thinking method.

Niels.
Post 20 Oct 2006, 15:05
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-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.