From owner-freebsd-questions Tue Dec 29 14:54:26 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id OAA24525 for freebsd-questions-outgoing; Tue, 29 Dec 1998 14:54:26 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from icicle.winternet.com (icicle.winternet.com [198.174.169.13]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id OAA24520 for ; Tue, 29 Dec 1998 14:54:24 -0800 (PST) (envelope-from nrahlstr@mail.winternet.com) Received: (from adm@localhost) by icicle.winternet.com (8.8.8/8.8.8) id QAA11521; Tue, 29 Dec 1998 16:53:56 -0600 (CST) Received: from tundra.winternet.com(198.174.169.11) by icicle.winternet.com via smap (V2.0) id xma011488; Tue, 29 Dec 98 16:53:51 -0600 Received: (from nrahlstr@localhost) by tundra.winternet.com (8.8.7/8.8.4) id QAA06925; Tue, 29 Dec 1998 16:53:50 -0600 (CST) Message-ID: <19981229165350.B6397@winternet.com> Date: Tue, 29 Dec 1998 16:53:50 -0600 From: Nathan Ahlstrom To: cucu , freebsd-questions@FreeBSD.ORG Subject: Re: DOS->FreeBSD port - int86x() Software Interrupt replacement Help. References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.93.2i In-Reply-To: ; from cucu on Tue, Dec 29, 1998 at 04:49:30PM -0600 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG cucu wrote: > Let me try again, > I would like convert the following piece of code from DOS to FreeBSD. > > This piece of code is accessing the ROM BIOS by software interrupts. > Basically in DOS world,int86x, copies register values to correspanding > resgisters in the microprocessor.Saves the DS register,copies new values > from segs structure into DS and ES.Generate software interrupt(0x15 in > this case) via INT instruction.Return from interrupt,copies registers to > out structure,and system carry flag.Restore DS back. (I hope I remember > evrything ...) > > What is the right way doing this? Can someone point me to the right > direction? The following url is an explanation of the __asm__ directive found in djgpp, but it is similar (same?) enough to do the same with gcc. http://www.castle.net/~avly/djasm.html Good Luck. Nathan -- Nathan Ahlstrom nrahlstr@winternet.com Run FreeBSD: http://www.freebsd.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message