flat assembler
Message board for the users of flat assembler.

Index > Non-x86 architectures > Can FlatAssembler g be used to target WebAssembly?

Author
Thread Post new topic Reply to topic
UniverseIsASimulation



Joined: 23 Sep 2016
Posts: 31
UniverseIsASimulation
I am interested, can FlatAssembler g be used to target WebAssembly, like it can be used to target Java Virtual Machine or ARM? I've made a compiler for my programming language targeting WebAssembly, and you can see some results. However, I used WebAssembly Binary Toolkit for that. The only two assemblers that can target WebAssembly right now are, as far as I can tell, WebAssembly Binary Toolkit and Emscripten LLVM-AS. Emscripten LLVM-AS, if you ask me, sucks a hell lot, it can't even parse a floating-pont number. WebAssembly Binary Toolkit doesn't have such problems (after all, it was made to be used by end-users as well as compilers, just like FlatAssembler), however, it lacks a powerful macro system. So, I am asking, is it possible to use FlatAssembler g to target WebAssembler? As far as I can tell, WebAssembly is rather different from x86 assembly in some important ways, like that, for instance, the assembler is supposed to complain if you try to write an expression without storing it to a variable (and that includes calling a function of a non-null type without storing its result). Can FlatAssembler g usefully deal with that?
Post 22 Aug 2020, 13:10
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 7802
Location: Kraków, Poland
Tomasz Grysztar
I've done some work on it back in 2017 (you can find it on the main list of fasmg-related resources), but it is just a basic framework with only a subset of instructions actually implemented, serving more as a demonstration of fasmg capabilities. I have later included it in the official GitHub repository, but I did not work on it further.
Post 22 Aug 2020, 13:45
View user's profile Send private message Visit poster's website Reply with quote
UniverseIsASimulation



Joined: 23 Sep 2016
Posts: 31
UniverseIsASimulation
Tomasz Grysztar wrote:
I've done some work on it back in 2017 (you can find it on the main list of fasmg-related resources), but it is just a basic framework with only a subset of instructions actually implemented, serving more as a demonstration of fasmg capabilities. I have later included it in the official GitHub repository, but I did not work on it further.
Thanks for the information!
By the way, do you mind my GitHub profile name? It's kind of a funny story. I wanted to name my GitHub profile after some archaic piece of software nobody uses. And, back at that time, I thought assembly language compilers were such software, and that the development of FlatAssembler stopped sometime in the late 1990s. But, as I know now, I ended up naming my profile after a piece of software which is relatively actively developed.
Post 24 Aug 2020, 17:46
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-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.