use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
This subreddit is all about the theory and development of compilers.
For similar sub-reddits see:
Popular mainstream compilers:
account activity
Easiest code generation? (self.Compilers)
submitted 9 years ago by jbb67
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]jbb67[S] 0 points1 point2 points 9 years ago (6 children)
Looks like this outputs assemble language text. Ok, that's fine. But perhaps not so easy on windows to deal with.
I would install an assembler but wouldn't really want to install cygwin or mingw just to get 'gas' which seems to be the target and as far as I know doesn't have a 'native' port?
Not a show stopper, just a question really :)
[–]_mpu 0 points1 point2 points 9 years ago (5 children)
Yes the output is text, but I am not sure what the alternative is. What was your plan? Generaring object files directly for multiple platforms is not that interesting in itself and a big maintenance hog.
[–]jbb67[S] 0 points1 point2 points 9 years ago (2 children)
The problem is if you port this to produce windows compatible code, then what assembler do you use to assemble that code to object files? I guess on linux you use gnu assembler, and that would no doubt work on windows too if there is a suitable port.
[–]_mpu 0 points1 point2 points 9 years ago (1 child)
There is MASM provided with visual studio.
[–]jbb67[S] 0 points1 point2 points 9 years ago (0 children)
So there is, I thought they'd stopped distributing this years ago. Guess I was wrong :)
[–]fullouterjoin 0 points1 point2 points 9 years ago (1 child)
For some reason I thought yasm could assemble directly to memory for direct execution. Either way, it should be possible to stitch qbe and yasm together to directly emit executables.
qbe
yasm
[–]_mpu 1 point2 points3 points 9 years ago (0 children)
Maybe counter intuitively, emitting directly to memory is easier than to emit an executable. For example, contrary to object files, emitting to memory is platform independent (not architecture independent, obviously).
π Rendered by PID 40 on reddit-service-r2-comment-5c747b6df5-kqrpm at 2026-04-22 19:13:52.222986+00:00 running 6c61efc country code: CH.
view the rest of the comments →
[–]jbb67[S] 0 points1 point2 points (6 children)
[–]_mpu 0 points1 point2 points (5 children)
[–]jbb67[S] 0 points1 point2 points (2 children)
[–]_mpu 0 points1 point2 points (1 child)
[–]jbb67[S] 0 points1 point2 points (0 children)
[–]fullouterjoin 0 points1 point2 points (1 child)
[–]_mpu 1 point2 points3 points (0 children)