8 ms·
640k Really Is Enough for Anyone
- em3rgent0rdr 9y agoGreat article about using FreeDOS. However, the title is misleading because the article is not really addressing that specific claim.
- lnx01 9y agoSure - but I think the title is referencing the fact that 640K is the minimum required for a basic DOS system to run. Using that system you can write code for fun that would by definition fit in 640K.
- raverbashing 9y agoI'd rather pay for more hardware than use segmented memory again
- sp332 9y ago640k is the maximum available to applications on the original IBM PC. https://en.wikipedia.org/wiki/Conventional_memory#640_KB_barrier https://en.wikipedia.org/wiki/Conventional_memory#640_KB_bar...
- hsitz 9y agoProbably not this. 640k was actually the maximum amount of memory available for a user's DOS applications on an IBM PC or clone. There were many PC's sold that had only 64k of use-accessible RAM. It was only in later years, as memory got cheaper (and apps "ballooned") that machines maxed out at the 640k limit. With the 16-bit system the actual CPU-addressable limit was 1024kb (or 1MB), but the difference was reserved for use by the system for things like the ROM BIOS, graphic adapter bios, etc. My memory is vague on this, but I believe the core DOS commands (e.g., copy) were part of the ROM BIOS (or maybe they were just always loaded into non-user-accessible RAM as part of boot). So they were always present and did not affect available user RAM. The non-core DOS commands (e.g., xcopy) had to be loaded into user RAM to run. What's more, if you had a diskette-based system (i.e., no hard drive), you would have to load the floppy diskette that had the particular extended DOS command you wanted to run, before you could run it (because it had to be read off the diskette).
- dfox 9y ago640k is not maximum available to applications, but the maximum amount of RAM that would fit into PC, restof the 1MB address space was reserved for ROMs and memory mapped IO. No dos commands were normally part of ROM. In fact even command.com was designed such that large part of it could be thrown away if additional memory was required and then reloaded from disk when user program terminated (this was implemented by relocating the "transient" part onto the end of usable address space and detecting whether it was overwritten by user programs). Larger DOS file managers usually use similar approach, but simpler: the UI is implemented by separate binary that simply records what the user wants to run somewhere and then exits passing control to small stubbinary that starts requested program and restarts the UI when the program ends. Edit: MS-DOS 2.0's command.com detects that the transient part was overwritten by means of single byte checksum. The reason why it is done in this somewhat hackish way is that DOS allocates all of the available memory for most MZ EXE programs regardless of how many they actually use (MZ header specifies minimum and maximum amount of unitialized memory needed, with no maximum being the default).
- Stratoscope 9y agoThe minimum memory that IBM offered in the original PC was the 16KB my first PC came with. I upgraded it to 64K right away, but DOS certainly ran in the 16K configuration.
- DavidBuchanan 9y agoAmusingly, loading that page takes up 897kB.
- Cyberdog 9y agoMedium? More like Extra Large, am I right? Eh? Eh?
- Animats 9y agoDOS is only "real time" if you don't do disk I/O. Disk I/O is synchronous. There's something to be said for using FreeDOS simply as a loader for a real-time control program. It's not doing anything in the background. There's no networking stack. There's no way to attack it without physical access.
- stonemetal 9y agoDisk I/O being synchronous doesn't disqualify it from being real time. Disk I/O not having a bounded execution time would make it not real time.
- dfox 9y agoFilesystem IO through DOS APIs does not have bounded execution time by design (it can even cause user interaction, ie. the infamous "Abort, Retry, Ignore?"). On the other hand the timing is pretty consistent in non-error situations. Also synchronous (and also often non-preemptible) disk/FS IO was for the long time the only way it was done. For example the reason that on Linux process that got stuck accessing NFS or removable drive that got removed was unkillable (in 'D' state) was to preserve illusion of such semantics to user processes (ie. that IO to filesystem and block devices will never fail with EINTR). And I would not be surprised if many deeply-embedded RTOSes do the same to this day.
- boznz 9y agoTrue, DOS and BIOS interrupt calls stopped your program until complete, this lag was however fairly consistent and in the order of a few milliseconds on newer machines so could be used in higher latency real time control. "Proper" DOS real-time control generally used assisting hardware to buffer/offload processing or did not use the INT calls using interrupt driven system to make it real real-time, all DOS programs could be "Bare-Metal" if you did not use any DOS/BIOS INT calls which were generally written in assembly and not interrupt friendly. Also having no network stack or USB stack is pretty limiting these days. I'm sure FreeDOS can implement these, there are definitely DOS drivers out there for older network cards to get TCP/IP up and running and there was always serial modems which we used extensively in "the old days" (pause while audience cringes!) Being cut-off from the outside world is of course security bliss but the PC still needed to be physically secure as there were no passwords/encryption and remote maintenance is not an option.
- krylon 9y agoAs for the alleged Bill Gates quote, I read somewhere (Deep C Secrets by Peer van der Linden, I think, but I am too lazy to look it up), that "640k ought to be enough for anyone" did not mean that it was enough for anyone for all times. I am not a fan of Bill Gates, but he is not stupid. And at the time he - allegedly - said it, 640k of RAM was (for a single user!) was indeed a lot! Compare that to the 64k of the C64. It is idiotic to think that he meant that 640k would be sufficient 30 years in the future. That being said, I actually did install MS-DOS 6.22 on three computers over the last couple of years, because the company I work at does - among other things - industrial automation, and (at least) one of our customers has a plant built with automation technology that can apparently only be programmed and configured with a program running on DOS. And it must do some rather funky things, because the software will reliably fail to talk to the PLC if it is running in a virtual machine or on FreeDOS. And of course the company that has written this software has gone out of business a long time ago, so there won't be any updates, either. ;-) If I didn't have more important things to do, figuring out why it does not work on FreeDOS could have been a lot of fun, but just installing MS DOS was the faster solution. Still, installing DOS these days is an interesting experience. The whole system comes on three floppy disks, the installation procedure takes about 15 minutes, and the freshly installed system boots up in about 30 seconds, including the BIOS doing its thing. Admittedly, you cannot do very much with it without additional software. Three floppy disks - that is about 4.5 Megabyte, Ladies and Gentlemen. Today's high end CPUs have as much L2 cache, or more. And primitive as it is, there are situations where DOS is a reasonable choice. I'm still glad, though, that I never had to deal with segmented memory. That sounds horrible.
- katastic 9y ago> the freshly installed system boots up in about 30 seconds, including the BIOS doing its thing. Honest question/clarification, is that... considered fast? My DOS system used to boot that fast. A C64 is almost instant. And my old ~2013 Chromebook boots in ~7 seconds into Linux with an eMMC drive (slower than an SSD but still fairly fast). It's only got 2 GB of RAM so when it hits swap it'll bog to a standstill so it's often faster just to hit the reset key than try and recover.
- 9y ago
- Koshkin 9y agoIf you are looking for a truly minimalist OS for your PC, DOS is for you. I have a warm feeling when I try to imagine an HPC compute node running DOS instead of a fat OS with all the overhead that comes with it. I know, it sounds like a pipe dream, but wouldn't it be nice if there was something like DOS that is natively 64-bit and also supports multiprocessing and multithreading - basically, something that turns a machine into a modern high-performance "calculator", without any unnecessary overhead? I wonder how close one could get to such "ideal" by using Linux or a BSD.
- i80and 9y agoYou might be interested in BareMetal[1]! [1]: https://en.m.wikipedia.org/wiki/BareMetal https://en.m.wikipedia.org/wiki/BareMetal
- fragmede 9y agoOn Linux, you could set systemd to go right into 'octave' (matlab) or even rip out systemd and set `init=/usr/bin/octave` in grub, and have very little overhead. What would you do on the system as soon as you need to look something up though? Even though it's easy to look something up via smartphone, if the code snippet is more than a sentence, do you really want to retype the whole thing rather than just copy and paste? It's a very romantic notion though, and there's even a kickstarter for the writer's version [1], and I recommend setting up a system like that as a fun weekend project, but (at least for me) it turns out, through years of (mis)training, those 30 browser tabs I have open are an important part of my workflow, so I need an operating system that allows for that, in order to be productive (and unproductive) on a day-to-day basis. [1] https://www.kickstarter.com/projects/astrohaus/hemingwrite-a-distraction-free-digital-typewriter https://www.kickstarter.com/projects/astrohaus/hemingwrite-a...
- wott 9y agoOne problem in these days is drivers. There was a glorious period of the DOS days, when: * all sound cards had a mode compatible with SoundBlaster or at least AdLib cards; * all Ethernet cards had a mode compatible with NE2000 cards; * all video cards had EGA/VGA/VESA compatibles modes. So that defined an informal standard for PC/DOS. Your programs just needed to support these and you could get a working system (even if you didn't have specific driver to use the full power of the specific card). Nowadays, if you try installing DOS on a current machine, you won't be able to get your games to play sound, nor to connect to your LAN. Video cards still seem to honour VESA standards (however only old ones, with old resolution, there was no VESA update to support modern resolutions), but for how long? I hit that reality when I tried to install DOS on two machines a few months ago. Then you fetch old Ethernet or sound cards from dusty boxes in the attic and... there is no ISA (or even PCI) slot on your motherboard, damned! And modern chips have ditched the compatibility layer with older chips :-( And of course, it has been a while since manufacturer stopped providing DOS drivers for their specific chips.
- pnikosis 9y agoI love the idea that there's still an active community developing for old hardware. Specially on videogames since many times they apply modern design ideas in very old hardware. As a dumb example I saw a platformer for the ZX spectrum not long ago, where the falling speed was not linear but accelerated, which may seem trivial now but back then was something really unusual and I didn't realized how big was the difference after watching it. Then you have stuff way more complex such as the RTS for the Commodore mentioned by the author. About the quote. Bill Gates said once in an interview: > I've said some stupid things and some wrong things, but not that. No one involved in computers would ever say that a certain amount of memory is enough for all time.
- reaperducer 9y agoThere are new games coming out for the Atari 2600 just about every three months. And a guy in Texas recently released a very interesting looking Ultima IV-style game for the Commodore 64.
- orionblastar 9y agoThere is an ARM based 2600 cart to make games for the 2600 better. http://www.atari-forum.com/viewtopic.php?t=28171 http://www.atari-forum.com/viewtopic.php?t=28171 I think they can buy the ROM and put it on the Harmony cart Sdcard and it will play. There seems to be new games that can't afford to burn a ROM and ship a cartridge so they use this cart instead to download ROM images to it.
- s_gourichon 9y agoFor the Amstrad CPC too. There are a number of production and events every year. The article mentions coding in C++ (which, except for the << operator, is actually C) and with a generic (and therefore a little clumsy) interface to assembly-level DPMI stuff. 64kB is enough to run non trivial programs written in modern C. (Disclosure: I wrote it:) A cross-development environment with a thin and clean C API to the original assembly-level firmware interface of the Amstrad CPC. https://github.com/cpcitor/cpc-dev-tool-chain https://github.com/cpcitor/cpc-dev-tool-chain and a puzzle game to exercise the whole thing https://github.com/cpcitor/color-flood-for-amstrad-cpc https://github.com/cpcitor/color-flood-for-amstrad-cpc Do git clone ; configure ; make run and it runs.
- sauravc 9y agoBill Gates never said "640k ought to be enough for anybody." https://www.computerworld.com/article/2534312/operating-systems/the--640k--quote-won-t-go-away----but-did-gates-really-say-it-.html https://www.computerworld.com/article/2534312/operating-syst...
- nsxwolf 9y agoWhy does this myth keep getting pushed - by tech people no less? Bill Gates emphatically denied ever saying it and no one has ever come forward with a scrap of evidence he actually said it.
- johansch 9y agoGuess: it was perpetuated because lots of tech people hated him and what he did to the industry and to computing progress in general. He has since gotten way, way better PR handling though. Just look at the way Reddit absolutely adores him nowadays (he's done lots of very carefully managed AMAs). Heck, even on HN there's enough young people who have no idea how much this one individual repressed computing progress over 1-2 decades through market abuse. Here's one example of many of how the pro billg PR is done: https://www.reddit.com/r/secretsanta/comments/5iphpa/i_won_secret_santabill_gates_was_my_santa_link_to/ https://www.reddit.com/r/secretsanta/comments/5iphpa/i_won_s...
- deleted 9y ago[deleted]
- reaperducer 9y agoAnother guess: He actually said it and a few people heard it, but when he said it was before everything in the universe was constantly being recorded, photographed, and pushed to the internet, so there's not necessarily a record of it. Back then, you could just deny something happened, and often get away with it because you weren't being surveilled 24 hours a day. It's like when someone very knowledgeable about a subject posts information on Wikipedia. Even if they were there first hand; even if they were personally involved with the event; even if they wrote magazine articles about it and did radio interviews about it, and it was covered by television — if it happened before 2000, it'll get erased from Wikipedia by someone on the other side of the planet because there's not a web link or an ancient library book to cite for "proof." /Yes, I'm speaking from experience.
- indigodaddy 9y agoBelieve Josh Levine's The Island ECN (one of the first trading networks) ran on DOS. He released the source code years ago: http://www.josh.com/notes/island-ecn-10th-birthday/ http://www.josh.com/notes/island-ecn-10th-birthday/ https://en.wikipedia.org/wiki/Island_ECN https://en.wikipedia.org/wiki/Island_ECN
- indigodaddy 9y ago"It’s largely attributed to him, though, so he might as well have said it." This is such a reckless statement, IMO. Sort of like the opposite of "If a tree falls..."
- reaperducer 9y agoIt's like politics. If you tell a lie often enough it becomes the truth.
- reaperducer 9y agoI recently saw a video of Steve Jobs and Bill Gates at d5, and Gates talked about how you could run Word on the original Mac in a 14K OS. Jobs interjected that MacOS was more like 22K, but the point was made. Can you imagine an entire OS in 20-something being built today? BIOSes are larger than that.
- Shorel 9y agoThe actual 1989 quote by Bill Gates is this: "I have to say that in 1981, making those decisions, I felt like I was providing enough freedom for 10 years. That is, a move from 64k to 640k felt like something that would last a great deal of time. Well, it didn’t – it took about only 6 years before people started to see that as a real problem."
- AzzieElbab 9y agoAnyone remember Wing Commander game that required exactly 640K of conventional RAM?
- tigershark 9y agoI Never played wing commander but I don't think it is possible. With dos 6.22 using DOS=HIGH,UMB and loading everything possible in high memory and removing all the non essential stuff gave you 622k free memory if I remember correctly. I managed to get more only "cheating" using a boot disk from the dos version bundled with windows 95, but even in that case you couldn't get more than 635k of free conventional memory.
- mhd 9y agoThat's certainly one thing I don't miss about old DOS gaming, having specific boot disks around with the proper config.sys/autoexec.bat magic to make ornery games work -- base RAM, HMA, EMS, XMS etc.. I had to play some game without the mouse, as that cost precious kilobytes… But yeah, even when you moved drivers to the higher memory areas, there had to be the actual memory manager loaded to do that, so the full 640k wasn't really possible. And despite Origin games like Wing Commander and Ultima basically needing the next generation of PCs not released yet, they didn't really demand the impossible.
- wott 9y ago> That's certainly one thing I don't miss about old DOS gaming, having specific boot disks around with the proper config.sys/autoexec.bat magic to make ornery games work -- base RAM, HMA, EMS, XMS etc.. You could make menus items in the config.sys to chose between different options, you did not need several boot disks. I don't remember in which MS DOS version it was introduced (perhaps 5.0?), but that was the normal way to go after that.
- tigershark 9y agoDOS 6. In dos 5 you could only selectively load stuff in the autoexec.bat, not in the config.sys
- oktobercrisis 9y agoWhat a bait and switch. I came to read about the origin of that expression, only to have the author go balls-deep into running FreeDOS, never referencing the original lede.
- gkya 9y agoI'm really surprised that this article is flagged. Yes the title is clickbaity, but the topic itself is interesting and has created some interesting, relevant discussion.
- grzm 9y agoWhen you come across a post you believe is flagged in error, you can contact the mods via the Contact link to have them look into it. On occasion, they remove flags.