nasm assebly hello world code example
Example: nasm assebly hello world
section .data
getBanner db "Hello, World!", 0xa ; String To Be Printed
lenGetBanner equ $-getBanner ; Get Length of String
section .text
global _start
_start:
; Display Banner
mov edx, lenGetBanner ; Message Length
mov ecx, getBanner ; Message to write
mov ebx, 1 ; File Descriptor (stdout)
mov eax, 4 ; Call Sys_Write
int 80h ; Call Kernel