I'm rather new to asm, and started playing around.
The purpose of write is to write the string char by char. any ideas why this 
wouldn't be working? I'm not totally sure how to debug it. it just runs and 
stopps--I finally got past the seg fault:
section .data
buff db "Hello world!",10,0
section .text
global _start:
_start:
mov eax,buff
call write
call exit
hlt

write:
mov esi,eax
;we'll get the other three registers set up so we don't have to keep setting 
those:
mov eax,4
mov ebx,1
mov edx,1
loop:
mov ecx,[esi]
cmp ecx,0
je end
inc esi
int 80h
jmp loop
end:
ret

exit:
mov eax,1
mov ebx,1
int 80h
ret

Thanks,
Tyler Littlefield
email: [EMAIL PROTECTED]
web: tysdomain-com
Visit for quality software and web design.
skype: st8amnd2005

Reply via email to