From owner-freebsd-questions@FreeBSD.ORG Sun Jan 16 03:38:11 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 15E7D16A4CE for ; Sun, 16 Jan 2005 03:38:11 +0000 (GMT) Received: from dexter.starfire.mn.org (starfire.skypoint.net [66.93.17.236]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7BEA043D4C for ; Sun, 16 Jan 2005 03:38:10 +0000 (GMT) (envelope-from john@dexter.starfire.mn.org) Received: (from john@localhost) by dexter.starfire.mn.org (8.11.3/8.11.3) id j0G3arO20287; Sat, 15 Jan 2005 21:36:53 -0600 (CST) (envelope-from john) Date: Sat, 15 Jan 2005 21:36:53 -0600 From: John To: Street Chaman Message-ID: <20050115213653.B20171@starfire.mn.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: ; from street_chaman@hotmail.com on Sun, Jan 16, 2005 at 03:28:18AM +0000 cc: freebsd-questions@freebsd.org Subject: Re: Hardware assembly X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Jan 2005 03:38:11 -0000 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