Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 01 Dec 2008 09:38:51 +0100
From:      Christoph Mallon <christoph.mallon@gmx.de>
To:        Won De Erick <won.derick@yahoo.com>
Cc:        freebsd-hackers@freebsd.org, freebsd-hardware@freebsd.org
Subject:   Re: Watchdog for Boser (HS-7001)
Message-ID:  <4933A29B.8060907@gmx.de>
In-Reply-To: <547602.79284.qm@web45809.mail.sp1.yahoo.com>
References:  <547602.79284.qm@web45809.mail.sp1.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4933A29B.8060907>