I\'m very new to NASM and I\'m trying to execute a MASM example online that I found, but has been a pain translating to NASM.
It compiles and generates an output fil
The assembly code you’ve got there is for DOS, but you’re assembling it to an ELF and trying to run it with Ubuntu. NASM will assemble it either way (it’s doing its job, converting the assembly to machine code), but Ubuntu won’t be able to understand the result.
If you want to run that code, have NASM assemble a flat binary with a com
file extension, and then run it in DOSBox or a virtual machine or something.