Subject: NetBSD assembly
To: None <netbsd-help@netbsd.org>
From: Chris Huang <chris@integer.ca>
List: netbsd-help
Date: 03/25/2003 15:56:53
Hi all,
I was playing with x86 assembly code in NetBSD,
However I was unable to get NetBSD to print the output
Any suggestion ? ..I think I am missing somethings here
thanks
The assembly I wrote is a simple syscall to write.
.data
msg: .ascii "Hello NetBSD\n"
len = . - msg
.text
.global main
main:
movl $len, %edx
movl $msg, %ecx
movl $1, %ebx
movl $4, %eax #move the syscall index of write to eax
register
int $0x80 #invoke the system call
movl $1, %eax #exit
int $0x80 #invoke the system call