Watchdog for Boser (HS-7001)

Christoph Mallon christoph.mallon at gmx.de
Mon Dec 1 00:38:54 PST 2008


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


More information about the freebsd-hackers mailing list