Live data from Hacker News

FreeDOS's Linux Roots

linuxjournal.com

41–50 of 58 posts

Re: FreeDOS's Linux Roots

#41

Curious. How exactly does one build embedded applications for FreeDOS? What languages/compiles can I use?

I think LLVM is adding 16 bit support of some kind. It's not something that's "self-hosted" on DOS itself like some of the other solutions are, but the flip side is that this gives you a lot of flexibility. You could even develop in Rust.

Re: FreeDOS's Linux Roots

#42

Earlier quoted context omitted.

I remember using FreeDOS for learning assembly through the `debug` command. Looking at the BIOS data was fun for me at the time. I've also tried DOSBox but since it's emulated the BIOS data wasn't "real". I have not yet found an equivalent of the `debug` command for Linux. Ppl told me `gdb` could do the same but I found debug easier to use.

You can do more or less the same with e.g. objdump, but the root difference is that DOS COM binaries are very simple: basically a tiny header then the whole program in a big chunk. More modern formats (be it PE, ELF, Mach-o, ...) are far more complex, with many different segments, running in a more complex CPU mode, generally dynamically linked, and all the other bell and whistles. So even if you had an identical deb…

> basically a tiny header then the whole program in a big chunk.

This is inaccurate. A DOS .com executable has no header whatsoever. It is literally just the program code and data with absolutely no metadata at all. It is loaded at memory address 0x100 and then execution begins, also at 0x100.

It is possible to have a 0 byte .com executable and it will perform a useful function. 0 bytes are loaded to 0x100 and then execution begins at 0x100, effectively re-running the last program run. Commonly such a file was named "go.com".

Re: FreeDOS's Linux Roots

#43

Earlier quoted context omitted.

You can compute like a PC user in the 1980s. There are various word processors, database utilities, and programming languages available. There are even old school networking tools for newsreading, IRC, telnet, and gopher. I remember "DOS for Dummies" (the seminal Dummies book) being helpful when I was starting out; you can probably find a used copy for the cost of shipping at this point.

"butwhy.gif"

To illustrate how unnecessarily complicated and slow modern computing has become? You can still perform many of the computing tasks you do today on 50GB monstrosity OSs that take 3 seconds+ to start an application from and SSD.

Re: FreeDOS's Linux Roots

#44

What can I do that is moderately interesting with freedos? I've downloaded it a couple of times, but I never found anything useful to do with it. I'm sure I could play some games, or something. I really want to actually learn it.

Used it after restoring some win95 backup tape: - old dos games - turbo pascal 7 coding sessions

This is exactly what I did. That stark blue TP7 editor is a thing of beauty.

Re: FreeDOS's Linux Roots

#45

Earlier quoted context omitted.

Used it after restoring some win95 backup tape: - old dos games - turbo pascal 7 coding sessions

This is exactly what I did. That stark blue TP7 editor is a thing of beauty.

oh yeah

600kB of pure joy

taught me one thing though, having a hard coded IDE hurts. I missed emacs so damn much..

Re: FreeDOS's Linux Roots

#47
post #16

Earlier quoted context omitted.

Unless you want to work specifically with FreeDOS, you might look at DOSBox instead. It's a MS-DOS emulator that runs in user space, rather than running as the OS, thus a lower barrier to entry.

The utilities provided by FreeDOS are generally more complete than those provided by DOSBox. You can copy them into your DOSBox installation for the best of both worlds.

You can even configure DOSBox to boot FreeDOS instead of using its built in "DOS" environment.

Re: FreeDOS's Linux Roots

#48

What can I do that is moderately interesting with freedos? I've downloaded it a couple of times, but I never found anything useful to do with it. I'm sure I could play some games, or something. I really want to actually learn it.

In Linux, I prefer using Dosemu instead of DOSBox to run old DOS software.

Dosemu requires you provide the OS so I use FreeDOS.

Re: FreeDOS's Linux Roots

#49

What can I do that is moderately interesting with freedos? I've downloaded it a couple of times, but I never found anything useful to do with it. I'm sure I could play some games, or something. I really want to actually learn it.

Program in the old BASICS, such as BASICA or QBASIC. Very fun.

Re: FreeDOS's Linux Roots

#50

Earlier quoted context omitted.

You can do more or less the same with e.g. objdump, but the root difference is that DOS COM binaries are very simple: basically a tiny header then the whole program in a big chunk. More modern formats (be it PE, ELF, Mach-o, ...) are far more complex, with many different segments, running in a more complex CPU mode, generally dynamically linked, and all the other bell and whistles. So even if you had an identical deb…

> basically a tiny header then the whole program in a big chunk. This is inaccurate. A DOS .com executable has no header whatsoever. It is literally just the program code and data with absolutely no metadata at all. It is loaded at memory address 0x100 and then execution begins, also at 0x100. It is possible to have a 0 byte .com executable and it will perform a useful function. 0 bytes are loaded to 0x100 and then e…

I thought you could stuff some metadata aboce the org 100h directive, but my bad if it is not the case.
Post reply on HN