7 ms·
What would writing DOS programs and extenders with modern tooling accomplish? Trying to understand the goal.
by tored 5y ago
What would writing DOS programs and extenders with modern tooling accomplish? Trying to understand the goal.
- ok123456 5y agoMaking easy to understand and maintain programs in C++, with compilers that can that can do aggressive optimizations and inlining that compilers of the day could not do. The STL didn't exist until the late 90s, and before C++98 it was a wild-west.
- krkixohjk 5y agoBut what is the goal in having maintainable ms-dos software? The OS is still ancient and lacks most every possible security measure. Every program can r/w any memory and so on…
- ok123456 5y agoThe fact that it gets out of your way is a feature. Why does security matter on a single user, non-multitasked environment with no networking? The netsec industrial complex has really set back computing.
- wyldfire 5y agoMSDOS did have MMU support since 80386, IIRC. So I think GPs claim might be inaccurate. But it wasn't a security feature, it was a productivity feature. It protected your programs from defects in other programs and vice versa. This helps programmers find defects during design and helps users for defects that escape testing.
- spc476 5y ago[citation required] for the MMU support of MS-DOS.
- ok123456 5y agohttps://en.wikipedia.org/wiki/Control_register https://en.wikipedia.org/wiki/Control_register
- spc476 5y agoJust replying with a web page showing the 80386 has having control registers doesn't imply that MS-DOS used them in any meaningful way.
- ok123456 5y agoThe MMU is inside the processor. Any operating system running on an 80386 or higher has set registers/tables and gets hardware provided memory management.
- shadowofneptune 5y agoIf it uses it. Later versions of DOS did very little with the features the 386 offered, which is why there were MS-DOS extenders. https://en.m.wikipedia.org/wiki/DOS_extender https://en.m.wikipedia.org/wiki/DOS_extender
- ok123456 5y agoYou can make your own minimal DOS Extender just by setting those registers. This is what some games did.
- lproven 5y agoDR and MS DOS 5 and later have a 386 memory manager which can put an x86-32 CPU into Virtual 86 mode, remap RAM over any unused blocks in the I/O and ROM area (between 641kB-1024kB) to make Upper Memory Blocks, and load small resident parts of the OS into those blocks in order to keep as much base memory (0kb-640kB) free. These memory managers could also turn the extended memory (above 1024kB) into managed XMS or EMS memory. LIM EMS was accessible to DOS apps and XMS to DOS-extender apps. These were killer features in 1990 or so, and I made good money from optimising DOS memory for clients around that time.
- xunn0026 5y agoI agree with the sentiment but note there were still viruses being circulated through floppy disks. So, 3rd party code may still be executed on a non-networked machine. Indeed, it would be awesome to see how much a machine can do without all the layers. Even the Intel CPU security fixes could be bypassed and gain some extra speed.
- tored 5y agoStuxnet is the modern variant. Regardless of the qualities of DOS, the user interfaces of the graphical programs was in many cases superior compared to today, everything keyboard controlled, clearly labeled shortcut keys, views that usually only did one thing, distinctive coloring.
- ok123456 5y agoStuxnet happened even with all of those protection mechanisms in place.
- tored 5y agoTo my knowledge the targeted PLC lacked any form of protection when infected.
- ok123456 5y agoIt spread first as windows worm that exploited several 0-days. If the host didn't have the Siemens PLC device drivers with a configuration that matched the exact configuration of what they were expecting for the centrifuges, they payload was dormant and it just replicated. Only if it matched would it patch the PLC's programming upon re-connection to fake reporting that the speed was normal while it was actually spinning out of control.
- tored 5y agoThus the security model of DOS is still a problem even without internet connection.
- alophawen 5y agoWhy did you invent the constraint "no networking"? I had coax network on MS-DOS even back then.
- lproven 5y agoDR DOS 7 did have built-in peer-to-peer networking: Netware Lite. MS DOS did not, because that was the main selling point of Windows for Workgroups.
- alophawen 5y agoYea, there was alot of features that one is used to in modern OS that was missing in MS-DOS. It does not mean those features didnt exist or wasnt being used. We used 3rd party TSR drivers for it. Examples: - MOUSE.COM driver https://www.vogons.org/viewtopic.php?t=58777 https://www.vogons.org/viewtopic.php?t=58777 - CDROM driver http://manmrk.net/tutorials/DOS/cdrom.htm http://manmrk.net/tutorials/DOS/cdrom.htm - Network stack https://en.wikipedia.org/wiki/IPX/SPX https://en.wikipedia.org/wiki/IPX/SPX - Graphics driver https://dosdriver.de/graph.php https://dosdriver.de/graph.php - Sound card drivers https://dosdriver.de/sound.php https://dosdriver.de/sound.php
- lproven 5y agoSome of these things were included later on. For instance: DR DOS 6 had Netware Lite; DR DOS 7 had Personal Netware. https://en.wikipedia.org/wiki/Personal_NetWare https://en.wikipedia.org/wiki/Personal_NetWare I think several versions of DOS included MSCDEX.EXE (or DR's equivalent), but not the device driver, because back then there were lots of different CD interfaces: Mitusmi, Panasonic and Sony on sound cards, some early EIDE ones, and SCSI on higher-end kit. Mouse drivers came with your mouse. ;-) MS did have a network stack bundled for free on the NT Server installation CD, and some versions of it support server mode for peer-to-peer operation. DOS could do all this stuff, but you had to assemble the bits from different sources, and this was sometimes for good reasons, sometimes technical (a profusion of incompatible CD-ROM interfaces) and sometimes commercial (P2P LAN support).
- kevin_thibedeau 5y agoDOS serves as a good bootloader for an embedded system.
- Koshkin 5y agoE.g. https://en.wikipedia.org/wiki/Loadlin https://en.wikipedia.org/wiki/Loadlin
- Koshkin 5y ago> lacks most every possible security measure So do calculators and typewriters. (Some people use computers to, gasp, perform computations, and low or no overhead is nice.)
- deckard1 5y ago> with compilers that can that can do aggressive optimizations we're still talking about real-mode DOS here. Most of those optimizations aren't going to work. Regardless, you can target DOS just fine today. You'll need some code to bootstrap your program into protected/long mode and then your app has full freedom. You'll need to figure out the correct switches to pass to gcc to get it output a freestanding binary, and possibly a special linker script, etc. Freedom but, let's be honest, no real utility today. You can't access the network because you'll need to write the entire network stack from scratch. You'll need to write a driver for your network hardware. Can't touch video without writing a driver for your Nvidia hardware. Or sound card. I suspect what most people want from a "modern" DOS would be something like this: a very thin API layer that contains OpenGL (or Vulkan), audio, and networking capability. As well as drivers for common USB devices and something that can read/write FAT/exFAT. But once you add all of that you realize it's nowhere near as lightweight as old DOS was and your app now has a thousand more responsibilities that something like the Linux kernel is currently handling for you.
- lmm 5y ago> I suspect what most people want from a "modern" DOS would be something like this: a very thin API layer that contains OpenGL (or Vulkan), audio, and networking capability. As well as drivers for common USB devices and something that can read/write FAT/exFAT. But once you add all of that you realize it's nowhere near as lightweight as old DOS was and your app now has a thousand more responsibilities that something like the Linux kernel is currently handling for you. I think people may be looking for something like a unikernel framework. Something like Linux is a lot of overhead if all you want to do is run a single program on a machine (virtual or physical).