Hola mundo en ensamblador para Linux/x86

[ permalink ] [ download ]
section        .data

msg     db      'Hello, world!', 0Ah    ;message
len     equ     $ - msg                 ;length

section        .text

global _start

_start:
        mov     eax,04h                 ;system call number (write)
        mov     ebx,01h                 ;where? stdout == 1
        mov     ecx,msg                 ;what?
        mov     edx,len                 ;number of bytes
        int     80h                     ;call kernel
exit:
        mov     eax,01h                 ;system call number (exit)
        int     80h                     ;call kernel
hits counter