It's cool and all, but does FreeDOS support something similar to Data Execution Prevention? I know MS-DOS probably don't have it, and searching "'FreeDOS' 'Data Execution Prevention'" on DuckDuckGo yielded no result.
Serious answer to silly question: DOS applications have full control over the hardware, so it's entirely up to them. In real / V86 mode, there is no distinction between code and data pages, however you can have separate segments for code, data and stack. There are separate CPU instructions for "near" and "far" jump/call/return, and if all code fits into a single 64K segment ("small model"), there would be no need to…
Since it was including the word "seriously", I thought maybe I should just ask about it for sure. It's not really fun if it's a simple web page hosted on FreeDOS one fine day, a hacked BIOS another.
I got it, it's a fun project made for fun, but still, security is always something to think about.
I learned it the hard way from my childhood SOCKS 5 proxy experiment where I tested a SOCKS 5 proxy on public network. Long story short, within 2 days of running it, one guy discovered the port via scanning, proxied it to login to my ISP account without a password (that's how the ISP set it up), and then stole all the funds in it by purchasing value add-on services for himself. It was a seemingly an all harmless and fun experiment until that happened.
My point it, if the OS don't support such basic security feature (and many other security features), maybe it's just not worth the effort? (other than just-for-fun of course)