;;; Adding two numbers (for Linux) ;;; To assemble, link and run under Linux ELF (ssh.itu.dk) ;;; nasm -f elf tryadd.asm -o try.o ;;; gcc try.o -o try ;;; ./try global main ; Define entry point for this code extern printf ; Refer to C library function SECTION code main: mov eax, 2 mov ebx, 3 add eax, ebx push dword eax push dword mystring call printf add esp, byte 8 ret segment DATA myint dd 1234 mystring db 'The result is ->%d<-', 10, 0