Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 15 Jan 2005 21:36:53 -0600
From:      John <john@starfire.mn.org>
To:        Street Chaman <street_chaman@hotmail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Hardware assembly
Message-ID:  <20050115213653.B20171@starfire.mn.org>
In-Reply-To: <BAY15-F2700A37DC0BA58F4D13FDC998D0@phx.gbl>; from street_chaman@hotmail.com on Sun, Jan 16, 2005 at 03:28:18AM %2B0000
References:  <BAY15-F2700A37DC0BA58F4D13FDC998D0@phx.gbl>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Jan 16, 2005 at 03:28:18AM +0000, Street Chaman wrote:
> hi everyone,
> 
> i need low level hardware control over some devices (kbd, sound, display) in 
> an assembly soft, and 'd like to know where i can find a list of 
> ioctl_syscall supported parameters for each device.
> Furthermore, if someone knows some good (more complete than 
> developpers-handbook) gas doc/sources, it would be a great help for me.

Well, Street, some may call this cheating, but it is probably worth
your while to try it this way.

Create empty routines in C to get your calling sequences down, then
use the compiler to create the linkages for you (see the -S option).
Then you can concentrate on your functionality, rather than trying
to do the stack work that you need.  If you are actually making
ioctl or syscalls, then write the C for the ioctl into your framework
and, again, let the compiler generate the linkages.  If you actually
want to make the syscalls directly, you should dig out the assembler
source from the system sources of the libraries and use them as a
template - just beware, the syscalls can CHANGE, which is one reason
we always rebuild the "world" with the kernel.  Part of the reason
for using the standard libraries is to put a layer of abstraction
between you and the basic OS calling sequence.

Just my $0.02.
-- 

John Lind
john@starfire.MN.ORG



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