flat assembler
Message board for the users of flat assembler.

flat assembler > High Level Languages > Mathematical Expression

Author
Thread Post new topic Reply to topic
Mino



Joined: 14 Jan 2018
Posts: 142
Hello Smile
I must (or rather would like to) create a program that would transform a mathematical expression into FASM, for example this:
Code:
3*(a+b)
    

Considering that a and b are FASM variables.
But I'm "lost", the possibilities are quite vast.
So, do you know a way to help me do this?
I don't know me, a site, a program, or even a library...
I thank you and wish you a good day Smile
(This program will be written in C++)

_________________
The best way to predict the future is to invent it.
Post 16 Feb 2018, 17:51
View user's profile Send private message Reply with quote
Furs



Joined: 04 Mar 2016
Posts: 1201
So you want to write a tool in C++ that will convert an expression into assembly?
Post 16 Feb 2018, 18:38
View user's profile Send private message Reply with quote
Mino



Joined: 14 Jan 2018
Posts: 142
Furs wrote:
So you want to write a tool in C++ that will convert an expression into assembly?

Yes, that's right.

_________________
The best way to predict the future is to invent it.
Post 16 Feb 2018, 18:43
View user's profile Send private message Reply with quote
Mikl___



Joined: 30 Dec 2014
Posts: 85
Post 17 Feb 2018, 00:42
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 15904
Location: SDSS J140821.67+025733.2
Moved to HLL forum.
Post 17 Feb 2018, 01:29
View user's profile Send private message Visit poster's website Reply with quote
Mino



Joined: 14 Jan 2018
Posts: 142
Thanks for the links, I didn't see them.
And sorry I got the wrong forum Embarassed

_________________
The best way to predict the future is to invent it.
Post 17 Feb 2018, 09:15
View user's profile Send private message Reply with quote
yeohhs



Joined: 19 Jan 2004
Posts: 170
Location: N 5.43564° E 100.3091°
Mino wrote:

So, do you know a way to help me do this?
I don't know me, a site, a program, or even a library...
I thank you and wish you a good day Smile
(This program will be written in C++)


You can let your C++ compiler help you. Most C and C++ compilers can output assembly source code.

_________________
“It’s not that we have a short time to live, but that we waste a lot of it.”
-Lucius Annaeus Seneca
Post 17 Feb 2018, 10:11
View user's profile Send private message Visit poster's website Reply with quote
Mino



Joined: 14 Jan 2018
Posts: 142
Thank you for the information Smile
It's a shame that no compiler (which I know and which is known in any case) uses FASM as a target language.

_________________
The best way to predict the future is to invent it.
Post 17 Feb 2018, 15:29
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-2018, Tomasz Grysztar.

Powered by rwasa.