Reputation: 303
I study assembly on High-school and I would like to try to make assembly programs at home.
I downloaded NASM but I don't understand how to run the .s files with it - if you can write a simple way here to run it I'd glad :-)
and in addition I have a question: when I use ADC for exmaple: AL = 01 and BL = 02, and CF = 1, when I make this: ADC AL,BL Will AL be 3 or 4? (with the CF addition or without?)
Thank you!!
Upvotes: 1
Views: 1489
Reputation: 19881
From your command prompt (bash for Linux):
nasm myasm.s -o myasm.bin -f bin
This is the basic command line structure. I don't know which OS you are writing on, but for Linux use:
nasm -h // (I believe, or --help)
for a list of command parameters.
Anyway, the -o
tells nasm what the output file is, and the -f
tells nasm what the format is. In this example, we are simply writing a flat binary.
For a lot more information see Compiling an assembly program...
For more information on using ADC, see this question.
Upvotes: 2