From owner-freebsd-questions Tue Nov 7 11:59:36 2000 Delivered-To: freebsd-questions@freebsd.org Received: from mail.oaklandnet.com (ens-1.oaklandnet.com [209.232.103.162]) by hub.freebsd.org (Postfix) with ESMTP id C5CA037B4C5 for ; Tue, 7 Nov 2000 11:59:32 -0800 (PST) Received: by mail.oaklandnet.com from localhost (router,SLMail V3.2); Tue, 07 Nov 2000 11:53:37 -0800 Received: from oaklandnet.com [10.15.1.185] by mail.oaklandnet.com [10.1.33.203] (SLmail 3.2.3113) with ESMTP id 0D028BFEB4E011D49F180050DA0C9A1C for ; Tue, 07 Nov 2000 11:53:37 -0800 Message-ID: <3A085E29.4BA73D22@oaklandnet.com> Date: Tue, 07 Nov 2000 11:55:22 -0800 From: "Howard Blue" X-Mailer: Mozilla 4.75 [en] (Win95; U) X-Accept-Language: en MIME-Version: 1.0 To: questions@FreeBSD.org Subject: C Programming using FreeBSD Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SLUIDL: 1E5784E9-B4E011D4-9F180050-DA0C9A1C Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG How to use outb( ) and inb( ) with gcc and FreeBSD? The following program compiles and run in linux but it does not compile using FreeBSD. It compiles in linux using: gcc -O2 prog1.c -o prog. It dos NOT compile using FreeBSD because of the include file "asm/io.h". #include #include #include #define BASEPORT 0x378 /* lpt port. */ int main() { /* Getting accesss to io port. */ if (ioperm(BASEPORT, 3, 1) {perror("ioperm"); exit(1);} again: outb(0, BASEPORT); sleep(1); outb(0xFF, BASEPORT); sleep(1); printf("Testing...\n");\ goto again; } What changes would be necessary for a simillar program to work with FreeBSD? email: blujazz@earthlink.net. Thanks. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message