Answer the question
In order to leave comments, you need to log in
Is NASM Assembler better than MASM?
Wrote a program that prints "Hello" in NASM and MASM assemblers.
As a result, a program written in NASM weighs 2KB, and in MASM 2.5KB.
Can we say that NASM is better than MASM?
MASM:
include C:\masm32\include\masm32rt.inc
.code
start:
print "Hello"
exit
end start
NULL EQU 0
STD_OUTPUT_HANDLE EQU -11
extern [email protected]
extern [email protected]
extern [email protected]
global Start
section .data
Message db "Hello", 0Dh, 0Ah
MessageLength EQU $-Message
section .bss
StandartHandle resd 1
Written resd 1
section .text
Start:
push STD_OUTPUT_HANDLE
call [email protected]
mov dword [StandartHandle], EAX
push NULL
push Written
push MessageLength
push Message
push dword [StandartHandle]
call [email protected]
push NULL
call [email protected]
Answer the question
In order to leave comments, you need to log in
Apparently, the linker packed it that way.
Nothing wrong with that.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question