Hello World in x86 assembly / programming workshop
section .data ;declare section
msg db "Hello World! :)",0xa ;our dear string
len equ $ - msg ;length of our dear string
section .text ; section declaration
global _start ; exporting entry point
; to the ELF linker
_start:
; write Hello World string
mov edx,len ;third arg: message length
mov ecx,msg ;second arg: pointer to message to write
mov ebx,1 ;first arg: file handle (stdout)
mov eax,4 ;system call nr. (sys_write)
int 0x80 ;call kernel
; and exit
mov ebx,0 ;first syscall args: exit code
mov eax,1 ;system call no. (sys_exit)
int 0x80 ;call kernel
; create object code with `
nasm -f elf hello.asm`; and use a linker to create the executeable: `
ld -s -o hello hello.o
We had a workhop today on programming. /me was trying to give an intro on how basic operations happen - from the processor to higher level languages. Therefore we created all kinds of
Hello World! programs. The most interesting one is hello.asm - the one written in x86 assembly. Shifting from dry grounds of operations to more applyed examples, we got our hands on Python's Imaging library (PIL) and figured out how to do basic image manipulations. Was a very interesting experience - also because the workshop was held bilingual in hindi and english.









