I thought at first it's gonna be redbean (https://redbean.dev), but turns out Cosmo/APE (despite the .com file extension) "only" supports x86-64/Windows.
I like the idea of using the attached screen to scroll logs / show stats. My next server build has a 9" touchscreen on the front panel, and I'm looking for ideas on what (&how) to show there.
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 ever have the "far" version of these instructions in your code. So if for example a return address or function pointer were overwritten, there would still be no way for an attacker to execute data, since it is in a different segment and all control transfer would be limited to the current code segment.
A lot of the more modern software included in FreeDOS is compiled with GCC and uses a flat 32-bit address space, so it doesn't have that protection. Most of it is command line utilities ported from UNIX-like systems, with even the most trivial of them being more than 100K in file size - IMO this goes very much against the "spirit" of DOS!
It should be possible to modify the compiler and runtime library to use separate segments for code and data. Since there is no size limit in 32-bit mode, there would be no need for far pointers, just two separate address spaces. Of course the UNIX and RISC zealots don't like this because it isn't portable to every other CPU, as if that matters somehow.
Enabling page-based DEP would also be theoretically possible, but require even more effort, I think. And for what purpose?
maximinus_thrax|2 years ago
thecodedmessage|2 years ago
rollcat|2 years ago
I like the idea of using the attached screen to scroll logs / show stats. My next server build has a 9" touchscreen on the front panel, and I'm looking for ideas on what (&how) to show there.
dang|2 years ago
DOS on Dope: The last MVC web framework you'll ever need (2010) - https://news.ycombinator.com/item?id=38706483 - Dec 2023 (18 comments)
k8svet|2 years ago
("Run macOS, Windows and more via a single Nix command, or simple nixosModules", aka, declarative DOS VM images)
sebazzz|2 years ago
shrubble|2 years ago
bluedino|2 years ago
enormousness|2 years ago
slim|2 years ago
KRAKRISMOTT|2 years ago
nirui|2 years ago
rep_lodsb|2 years ago
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 ever have the "far" version of these instructions in your code. So if for example a return address or function pointer were overwritten, there would still be no way for an attacker to execute data, since it is in a different segment and all control transfer would be limited to the current code segment.
A lot of the more modern software included in FreeDOS is compiled with GCC and uses a flat 32-bit address space, so it doesn't have that protection. Most of it is command line utilities ported from UNIX-like systems, with even the most trivial of them being more than 100K in file size - IMO this goes very much against the "spirit" of DOS!
It should be possible to modify the compiler and runtime library to use separate segments for code and data. Since there is no size limit in 32-bit mode, there would be no need for far pointers, just two separate address spaces. Of course the UNIX and RISC zealots don't like this because it isn't portable to every other CPU, as if that matters somehow.
Enabling page-based DEP would also be theoretically possible, but require even more effort, I think. And for what purpose?
hulitu|2 years ago
chungy|2 years ago
1970-01-01|2 years ago
mbbrutman|2 years ago
tetrisgm|2 years ago
ithkuil|2 years ago
redder23|2 years ago
m00x|2 years ago