So recently I've wanted to learn assembly, so I learnt a bit. I put this into nano and saved it as playground.asm. Now I'm wondering, how do I compile and run it? I've already searched everywhere and still cant find it. I'm really curious and there's no point learning a language if you can't even use it.
In all currently supported versions of Ubuntu open the terminal and type:
as31: Intel 8031/8051 assembler
This is a fast, simple, easy to use Intel 8031/8051 assembler.
nasm: General-purpose x86 assembler
Netwide Assembler. NASM will currently output flat-form binary files, a.out, COFF and ELF Unix object files, and Microsoft 16-bit DOS and Win32 object files.
This is the code for an assembly language program that prints Hello world.
If you are using NASM in Ubuntu 18.04, the commands to compile and run an .asm file named hello.asm are:
Ubuntu comes with as (the portable GNU assembler)
-o
: Tells where to send the output-e
: Tells ld the start symbol