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.
(1)
Permalink
Posted in:

A slightly different Delhi ...

http://blog.var.cc/files/images/2004/11/mob107_1099837779.jpg
7a.m. on the rooftop of my colleagues house.

Had the chance to join a colleague from sarai on his weekend journey to his home. He lives in Faridabad, a place about 2hrs southwards from the center. The borders between Faridabad and Delhi are fluent - the city basically never stops. About ~5mio. people live there, mostly to work in one of the many factories around (Bata has a domicile there too). It's a complete different landscape in terms of the city as such but also socially, because the environment (working conditions, lower incomes, etc.) ineviteably reflects on peoples lives.
(1)
Permalink
Posted in:

Saturdays at the lab

http://blog.var.cc/files/images/2004/11/mob106_1099726007.jpg

Quietly working in the newly setup room of the lab ;)
Karim (2nd f.l.) got a new machine running on gentoo. Next step will be to install LTSP on it in order to act as a remote X server for various clients. Meanwhile im busy making the ApnaOpus BitTorrent tracker searchable.
Permalink
Posted in:

1-3/3

LiveSearch

Blogroll

Relayed

Archive

Buttons

  • RSS 2.0 Feed
  • Latest comments
  • XHTML 1.0 compliant
  • Powered by Flux CMS
  • Powered by Popoon

Login


BXCMSNG Errors:
Notice[8] Undefined index: 0 in [BX_PROJECT_DIR]/inc/bx/plugins/blog/categories.php at line 59.