>From what I understand, the following should print "Hello, world." on
stdout. I stole the code from the Linux HOWTO, but I think it should
work on FreeBSD as well. Instead, the call to write returns 9 (EBADF).

.data
msg:            .string "Hello, world.\n"
                len = . - msg - 1
.text
                global _start
_start: 
                movl    $4, %eax
                movl    $1, %ebx
                movl    $msg, %ecx
                movl    $len, %edx
                int     $0x80

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

Can anyone explain what I've done wrong?

As a related question, can anyone point me to the source for the int
0x80 handler? I've looked all over but can't find it.

Thanks.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to