Open Fabrizio-Caruso opened 4 years ago
It's currently not supported but would be easy to do: .COM binary files are just a memory dump from 0x0100 onwards in a segment, the same as on CP/M.
The only thing which has prevented anyone doing this is that producing a reasonably useful syscall library is a bit of work: the main one is trying to decide how to map DOS drives and paths. (There is a standard, which I don't know.)
Ok, I understand that implement calls to the systems would be a major task. But why not provide a bare metal binary? I suppose the floppy image is sort of a bare metal PC binary that is read by reading a floppy with no proprietary file system.
Our pc86 platform uses BIOS calls to read the floppy drive, read/write the console, and reboot the system; see plat/pc86/boot.s and plat/pc86/libsys/*.s.
A DOS executable would need at least a different boot.s that doesn't read the floppy drive, and code for _exit() to return to DOS. So far, no one has written the code.
Hello @Fabrizio-Caruso, hello @kernigh,
In case it is useful to know: I am trying to see if I can get ACK to support MS-DOS .com
programs. I have started a separate development branch for this under my ACK fork.
Cool --- thanks!
FWIW, I do have DOS support in my cowgol project which might be useful --- look in rt/msdos and src/cowlink/archmsdos.coh. https://github.com/davidgiven/cowgol
@tkchia, this is really cool. I hope @davidgiven would one day integrate some DOS support in ACK. Even a minimalist library for input/output would be cool. At least ncurses or conio or anything equivalent would help.
Hello @davidgiven, hello @Fabrizio-Caruso,
FWIW, I do have DOS support in my cowgol project which might be useful --- look in rt/msdos and src/cowlink/archmsdos.coh. https://github.com/davidgiven/cowgol
Thanks for the pointer! ☺
Here is my reasonably complete first cut attempt at MS-DOS .com
program support: https://github.com/davidgiven/ack/compare/default...tkchia:a6c7ac2a280b895a7dfb29cda31510c757b50f77 . I will see if I can test and document the code further.
Thank you!
Is it possible to just build plain old .COM binary files for the 8088 target? or other binary formats (possibly executable in DOS)? Some old PC did not use 1.44 floppy. Some did not even have floppies at all (such as the Atari Portfolio). I would like to generate a .COM file (for the Atari Portfolio).
Is it already possible? If not, it would be nice to have this feature.