From mboxrd@z Thu Jan 1 00:00:00 1970 From: Phil Goembel Subject: Re: please help this newbie running asm programs!!! Date: 10 Feb 2003 23:52:24 -0600 Sender: linux-8086-owner@vger.kernel.org Message-ID: <1044942743.1550.70.camel@Castle.goembel> References: <200301301341.h0UDf5Z25323@preshak.recjai.ac.in> <200302060016.28257.a.martone@retepnet.it> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <200302060016.28257.a.martone@retepnet.it> List-Id: Content-Type: text/plain; charset="us-ascii" To: linux-8086@vger.kernel.org Would the program start symbol also need to be _main, or is that only needed by the C runtime library? Phil On Wed, 2003-02-05 at 17:16, Alfonso wrote: > > i am a newbie trying to port and run dos based 8086 programs under > > linux using as86, ld86 and elksemu. i have written a simple program > > Under ELKS, you should use ELKS system calls (via INT 80h), instead of > DOS calls (via INT 21h)...! :-) > > If you want to port some DOS program, you must take into account that > almost any program has to be modified and recompiled because: > > - they assume DOS memory structures and interrupts (int 20h, int 21h, > PSP, environment variables, etc)... ELKS programs are definitely > *clean* with memory, hardware I/O, etc > > - they assume DOS memory handling (i.e.: every program can use all > remaining RAM upto 640k)... in ELKS, as in any Unix, a process cannot > say "let's get all available RAM"; > > - they assume the can do everything with hardware; ELKS programs use > the canonical "/dev/..." special files, and do not require special > handling; i.e.: a screen terminal, a pipe, a disk file, a serial port, > etc, everything uses the canonical open/read/write/close scheme (while > DOS world uses a library for soundcard, the open/close for files; BIOS > or write to screen-memory for terminal I/O, etc). > > alf > - > To unsubscribe from this list: send the line "unsubscribe linux-8086" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html