Date: Sun, 17 Dec 2000 17:59:05 -0800 From: "Jeremiah Gowdy" <data@irev.net> To: <freebsd-questions@FreeBSD.ORG>, <freebsd-hackers@FreeBSD.ORG> Subject: DOS Emulation KLD Message-ID: <002701c06896$1a899060$aa240018@cx443070b>
next in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format. ------=_NextPart_000_0024_01C06853.0B91E960 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I've had this idea kicking around for some time, so I decided I would = throw it out there and see if anyone was interested or had any ideas. I'm wondering why we can't write basic DOS emulation as a KLD. DOS = programs are x86 code, a majority of it usually doing basic mundane = (userland acceptable) things. The only problems would come about when = interrupts were called and system memory locations were written to. It = is my understanding that under x86-32 virtual machines, such = instructions are "illegal" and therefore caught by the OS's virtual = machine driver, and emulated. I think for basic int 21h services, and = BIOS keyboard and text functions, this wouldn't be that difficult to do, = and would allow simple text based DOS programs to run under FreeBSD. = The DOS programs would see the file system in an 8.3 format, case = insensitive, and would be able to use and save files without any real = major modification. The same way VFAT handles long file names, DOS = could handle FFS file names (eg: alongfilename.txt becomes = alongf~1.txt). With the file system emulated, the basic interrupts = caught and emulated, and everything else stubbed, many simple dos = programs would function under FreeBSD. For example, although of course = we have midnight commander, there is no real reason why the original = Norton Commander could not run under FreeBSD. I'm not suggesting NC = would be better than MC, but what I am suggesting is that a simple = program like NC, which writes to the screen and manages files, should = have no problem running in the BSD environment. I know there are = emulation programs available in ports, but I was thinking along the = lines of a KLD, which is automatically loaded when a DOS exe file is = executed from the prompt. I'm going to look into this, and maybe with = some help, draft a simple implementation to see if it's feasible. Any comments or suggestions welcome. ------=_NextPart_000_0024_01C06853.0B91E960 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=3DContent-Type content=3D"text/html; = charset=3Diso-8859-1"> <META content=3D"MSHTML 5.50.4522.1800" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff> <DIV><FONT face=3DArial size=3D2>I've had this idea kicking around for = some time, so=20 I decided I would throw it out there and see if anyone was interested or = had any=20 ideas.</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>I'm wondering why we can't write = basic DOS=20 emulation as a KLD. DOS programs are x86 code, a majority of it = usually=20 doing basic mundane (userland acceptable) things. The only = problems would=20 come about when interrupts were called and system memory locations were = written=20 to. It is my understanding that under x86-32 virtual machines, = such=20 instructions are "illegal" and therefore caught by the OS's virtual = machine=20 driver, and emulated. I think for basic int 21h services, and BIOS = keyboard and text functions, this wouldn't be that difficult to do, and = would=20 allow simple text based DOS programs to run under FreeBSD. The DOS = programs would see the file system in an 8.3 format, case insensitive, = and would=20 be able to use and save files without any real major modification. = The=20 same way VFAT handles long file names, DOS could handle FFS file names = (eg:=20 alongfilename.txt becomes alongf~1.txt). With the file system = emulated,=20 the basic interrupts caught and emulated, and everything else stubbed, = many=20 simple dos programs would function under FreeBSD. For example, = although of=20 course we have midnight commander, there is no real reason why the = original=20 Norton Commander could not run under FreeBSD. I'm not suggesting = NC would=20 be better than MC, but what I am suggesting is that a simple program = like NC,=20 which writes to the screen and manages files, should have no problem = running in=20 the BSD environment. I know there are emulation programs available = in=20 ports, but I was thinking along the lines of a KLD, which is = automatically=20 loaded when a DOS exe file is executed from the prompt. I'm going = to look=20 into this, and maybe with some help, draft a simple implementation to = see if=20 it's feasible.</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>Any comments or suggestions = welcome.</FONT></DIV> <DIV> </DIV></BODY></HTML> ------=_NextPart_000_0024_01C06853.0B91E960-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?002701c06896$1a899060$aa240018>