Sunday, February 26, 2006

A change-gas

The danger of reading Randall Hyde’s book, The Art of Assembly is that it contains addictive substances. Yesterday, I have decided to



joset@kee $ su -c "emerge -C nasm"

After cleaning up, a tune-up followed



.data

msg:
.ascii "A small step for me is a big leap for... me!\n"
len = . - msg

.text

.global _start

_start:

# write string to stdout

movl $len, %edx
movl $msg, %ecx
movl $1, %ebx
movl $4, %eax
int $0x80

# exit

movl $0, %ebx
movl $1, %eax
int $0x80

Now I have finally made a change-gas. Expecting a lot of maintenance work to follow.

No comments: