flat assembler
Message board for the users of flat assembler.
 Home   FAQ   Search   Register 
 Profile   Log in to check your private messages   Log in 
flat assembler > High Level Languages > Mathematical Expression

Author
Thread Post new topic Reply to topic
Mino



Joined: 14 Jan 2018
Posts: 42

Mathematical Expression

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: 1019

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: 42


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: 75

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: 15497
Location: Necropolis

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: 42

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: 151
Location: N 5.43564° E 100.3091°

Re: Mathematical Expression


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.

_________________
鸟⼉唱歌不是因为它们有了答案,⽽是因为它们有歌要唱。
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: 42

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


Powered by phpBB © 2001-2005 phpBB Group.

Main index   Download   Documentation   Examples   Message board
Copyright © 2004-2017, Tomasz Grysztar.