Won De Erick schrieb:
Hello,

I was trying the assembly language program that is specified in the following 
document (p24) to set, reset the built-in watchdog timer for the Boser Box.

http://www.boser.com.tw/manual/HS-7001v1.1.pdf

I then installed nasm in FreeBSD 6.2, and added the following lines at the 
beginning.

section .text
  global _start

  _start:

I did assemble, link (ld) and got no error. But when I run, I got the following 
error:

# ./watchdog.out
Bus error (core dumped)

MOV DX, 2EH
MOV AL, 87H
OUT DX, AL
OUT DX, AL

Userland is not allowed to write to ports. That's the bus error you see. Also without a call to the exit syscall at the end, it will segfault.

Regards
        Christoph
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to