Since this was requested, I'll make a little "hello world" program in assembler. Note that it's designed for Nasm. Different compilers have subtle differences in syntax.
Code:SEGMENT .data message db "Hello world." # our message db 0Ah db 0Dh # return carriage and line feed SEGMENT .text mov eax,04h # eax = 4 for system call to write to file mov ebx,01h # file descriptor, in this case 1 for stdout mov ecx,message # address of message mov edx,0Eh # number of bytes long int 080h # call linux mov eax,0h # system call to exit int 080h


Reply With Quote
Bookmarks