Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

ACK i86/i386 output & DOS (Developers)

posted by ecm Homepage E-mail, Düsseldorf, Germany, 22.04.2012, 23:24

> BTW, I think you meant (T)ACK, the Amsterdam Compiler Kit, and that was
> never ported to DOS host or target, that I know of anyways. I know Pat
> Villani ported it to Cygwin "host", but I never tested it. But yeah, that's
> a nice compiler, still very *nix specific, so it wouldn't be easy to
> bootstrap for DOS (at least without lots of tweaking, even with DJGPP).
> You'd have to do similar to what the Linux port did, add some stub
> functionality in the library and a quick converter to native DOS executable
> format. Either that or revive em44 intermediate code interpreter.

Over the recent years, there's been some work on a new version 6.0 (it is licensed under the 3-clause BSD license), which as of yet allows creation of (Real 86 Mode, naturally) 8086 code or (only(?) 32-bit Protected Mode, I assume) 386 code out of the box, as far as I understand it. However, the former's only targeted platform is "pc86 (bootable floppy disk images)" (probably uses BIOS services?) and the latter's only one is "linux386 (ELF Linux executables)". The names of those formats are specified here: http://tack.sourceforge.net/about.html

It probably wouldn't require great amounts of effort to add a simple "dos86" platform sharing the i86 code generator; at first, this would minimally only have to create programs that are loadable as DOS executables*, which consider what resources (memory etc) they are provided by DOS, and which terminate the DOS process when they exit. It should also (allow) switch(ing) to DOS's I/O functions instead of the BIOS's (which as I noted I think it currently uses; it is a while ago that I skimmed the source), though that is not strictly necessary of course.

* Of course this could potentially be programmed to create .COM (flat) executables if the output is small enough, but .EXE (MZ header) executables are the more general case and additionally (seen strictly) require less run-time stack space validation if the header fields are correctly used to make DOS take care of insuring that enough stack space is available.

---
l

 

Complete thread:

Back to the forum
Board view  Mix view
22049 Postings in 2034 Threads, 396 registered users, 186 users online (0 registered, 186 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum