[LLVMdev] Hello World assembly without clib "puts"?

Andrew Pennebaker andrew.pennebaker at gmail.com
Sun Sep 30 10:30:01 PDT 2012


>
> The more important question is: why would you want to do that?  What
> problem are you trying to solve?


As weird as it sounds, I'm looking for multiplatform assembly languages. I
want to learn assembly, but I want my knowledge and code to carry over no
matter which operating system I'm using. I regularly use Windows, Mac, and
Linux, and I don't want to have to rewrite my codebase every time I boot
into another operating system.

I can do this by writing assembly code that calls C functions, but I get
the distinct feeling: *Why am I doing it this way? Why not just write
in C?*And there's only so much assembly you can learn by calling C
functions,
instead of writing lower level code.

I understand that OS's have different conventions for I/O, but what I don't
understand is why multiplatform assembly languages like LLVM, NASM, YASM,
FASM, and Gas don't give coders an macro or instruction set that gets
expanded to the actual, per-OS instructions during assembly. I guess it
lowers development efforts to reuse libc rather than add multiplatform I/O
assembly macros. Smaller, non-libc dependent binaries don't matter in a
world with hefty hard drives.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120930/e0783d32/attachment.html>


More information about the llvm-dev mailing list