how can I compile C to nasm? all tools i find (objconv, c2nasm) are for windows
how can I compile C to nasm? all tools i find (objconv, c2nasm) are for windows and
WINE or dos2unix need sudo to install which i don't have
Ummm, nasm isn't a language. It's a compiler for x86 (and other types, but that's not important) Assembly.
If you want to create assembly code from a C or C++ file, you can feed the -S flag to gcc and it'll do that. https://stackoverflow.com/questions/8021874/how-can-i-compile-to-assembly-with-gcc
@mkcodes Huh, that's interesting. I've just now taken a look at both objconf and c2nasm, I never knew there was actually a nasm flavor of assembly. Something about that seems strange to me, but /shrug.
Anyway, c2nasm doesn't look like it's specifically for Windows. In fact, it doesn't even natively support Bash scripts. Is it not working for you? It seems to run just fine for me.
@SixBeeps but it requires objconv, and when i unzipped it it just shows EXE file meaning its probably a windows terminal tool. (tester/objconv/objconv.exe) BUT it says u can run it on unix in help file ("The latter three platforms are all based on the UNIX heritage. I will use "Unix" as a common
name for Linux, BSD and Mac on x86 an x86-64 platforms in this manual. [..] The source code for objconv can be compiled and run under any of these platforms.")
- Go to this site http://www.agner.org/optimize/#objconv
- Click on download and extract the objconv.zip
Extract the source.zip and run build.sh for linux ( run objconv.exe for window ), this creates an executable objconv
- move objconv to your binaries (do it now !!) or just run ./objconv (maybe you must run chmod 777 objconv before if you're not allowed)
[note that i gave up on making objconv to work but there were instructions to make from source i just cant find it]