r/C_Programming • • Oct 12 '26

Project Compile C/C++ into assembly and emulate it in the web in many architectures

Enable HLS to view with audio, or disable this notification

Hello everyone! For the past few years I've been working on ASM editor (github), an IDE for assembly running completely on the web with many architectures available (x86, mips, risc-v, m68k, z80 and more to come) with a lot of debugging features like step by step execution, undo, memory and registers viewers, breakpoints, observability of what each instruction did and much more!

Recently I've added a feature I had dreamed of adding for a long time, C and C++ compilation! It allows you to write C and C++ code (with a subset of libc available), compile it to assembly to see how each line was compiled, to then execute it with all the debugging tools available in the IDE.

I'd love to get opinions/suggestions/feedback about it, please let me know in the comments!

Here is an example of fibonacci in C compiled to x86

I've been working on this app for around 3 years, initially as a replacement for easy68k and the MARS simulators so that my university could use a more modern alternative, to then add x86 and risc-v.
Recently while using AI i refactored other emulators to add the tools needed for the interfaces used inside the app and i managed to add z80 and hopefully arm and more architectures soon.

312 Upvotes

18 comments sorted by

â€ĸ

u/github-guard Oct 12 '26

🔍 GitHub Guard: Trust Report (Passed)

Here are the safety audit results for the linked repositories:

Repository: Specy/asm-editor

Score: 4/6

  • ✅ Established Community (⭐ 346 stars)
  • ✅ Mature Repository (30+ days old)
  • ✅ Licensed under AGPL-3.0
  • ❌ No Security Policy
  • â„šī¸ Personal Account Repository
  • ✅ Signed Commits

âš ī¸ Security Reminder: Always verify source code before executing scripts.

30

u/OptimisticMonkey2112 Oct 12 '26

how does it compare to https://godbolt.org/?

32

u/Specy_Wot Oct 12 '26 edited Oct 12 '26

It uses godbolt under the hood! (For now, ideally I'd want to run the compilers on the web too so it can be 100% offline). But what you gain is the possibility to run the code step by step like GDB with a lot more debugging features and the possibility to undo execution. The website is mostly aimed at people learning assembly as there are also documentation and LSP for each assembly language, but I added the c/c++ compilation to allow people to more easily understand why we learn assembly and how it relates to higher level languages

The simulator of is x86 a Linux emulator with most of the syscalls implemented, so it acts also as a way to learn operating systems

13

u/OptimisticMonkey2112 Oct 12 '26

Cool! sounds like kind of a Godbolt Editor!

4

u/Marwheel Oct 12 '26

What are the limitations of it? The one i could think of is that it can't run X11 or Wayland apps directly on it.

Also with the closest university to me having books on VAX (and PDP-11 i think) assembly, it might be useful to add heritage ISA's for educational and research use.

7

u/Specy_Wot Oct 12 '26

Yes I have many ISAs that I want to add, my university uses M68K and MIPS, those were the first ones, I have an issue on GitHub tracking them. Adding a new emulator is not that hard (if there are emulators written in JavaScript, c, c++, rust, java, kotlin, go) as the whole application is generic over the eumulator. The hardest part is the documentation around it and LSP.

As for limitations, the perhiperals are pretty simple, the goal of the app is to teach assembly, not really to simulate a whole environment, and everything around it has some limitations because of that. (For example, the screen, like the file system and everything else in the application can be undoed, which poses some limits on how they can be implemented) I did want to improve the terminal and use xterm though so you could in theory run cli applications on it

0

u/theterrygarcia Oct 15 '26

This response seems entirely AI-generated. Source: my noggin.

3

u/Specy_Wot Oct 15 '26

It can't be, there are no em dashes! But no, I hate when people use ai for interacting with other people so all comments and posts come from me ✨

2

u/AutoModerator Oct 12 '26

Hi /u/Specy_Wot,

Your submission in r/C_Programming was filtered because it links to a git project.

You must edit the submission or respond to this comment with an explanation about how AI was involved in the creation of your project.

While AI-generated code is not disallowed, low-effort "slop" projects may be removed and it's likely that other users push back strongly on substantially AI-generated projects.


I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

8

u/Specy_Wot Oct 12 '26

I've been working on this app for around 3 years, initially as a replacement for easy68k and the MARS simulators so that my university could use a more modern alternative, to then add x86 and risc-v.
Recently while using AI i refactored other emulators to add the tools needed for the interfaces used inside the app and i managed to add z80 and hopefully arm and more architectures soon.

7

u/mikeblas Oct 12 '26

Thank you for your disclosure. I have approved your post. I don't think AI usage in development negates the utility.

0

u/[deleted] Oct 12 '26

[deleted] — view deleted comment

2

u/ComputerBread Oct 12 '26

how much of the "learn section" is AI generated?

2

u/Specy_Wot Oct 12 '26

The assembly basics is all human written, I've then used that as a baseline to write the courses for each assembly language through agents for now. I do want to rewrite it myself as I don't really like it, but doing so myself is a ton of work, I've tried to gather contributors to help me with documentation and learning pages but haven't found anyone yet. Also tried asking students from my university and none wants to help either! I'd love to improve them but I maintain a lot of other projects and together with studies and work I struggle to find time for all of it so that was a temporary solution. If you want to help improve them or have some feedback please let me know, I'd love to improve things!

2

u/ComputerBread Oct 12 '26

Good to know.
I understand, I am overwhelmed too, and I know how difficult it is to write accurate educational content. I just have trust issues with AI generated content, because I know how convincing it can be while being slightly inaccurate.
Truth is assembly is one of my weak point, and I have 2 books on x64 waiting for me.
So, if I get the bandwidth, I'll read the assembly basics and the x86 parts, and come back with feedbacks!

Anyway, the editor looks nice, thanks for sharing it!

1

u/Specy_Wot Oct 13 '26

Yes that's why I wrote assembly basics myself, so I could have a baseline that I guarantee is correct where things can be expanded upon. All the generated content has been grounded with actual documentation and all claims tested through actual code so it should be correct, I just really dislike the way it talks. I've tried improving the wording as much as I could through "students" agents giving feedback but I still don't really like it.

Also thank you! I've studied assembly long ago so I lost touch on how it feels like to study it, I hope everything is understandable! The assembly basics are mostly an overview on how assembly languages are supposed to work, but it assumes you will do your research alongside it, it mostly tells you "what you should study to understand it"

3

u/realestLink Oct 16 '26

This is interesting af

0

u/github-guard Oct 12 '26

🔍 GitHub Guard: Trust Report (Passed)

Here are the safety audit results for the linked repositories:

Repository: Specy/asm-editor

Score: 4/6

  • ✅ Established Community (⭐ 346 stars)
  • ✅ Mature Repository (30+ days old)
  • ✅ Licensed under AGPL-3.0
  • ❌ No Security Policy
  • â„šī¸ Personal Account Repository
  • ✅ Signed Commits

âš ī¸ Security Reminder: Always verify source code before executing scripts.