Oh my god! No way!! What a incredible charity after 37 years! With such progression my grandchildren would see sources of MS-DOS 6.22! Very encouraging!!
You joke around, but this actually is a rather useful code dump for a lot of reasons. Most important is probably the gaming community. In a few years, you will see this code being used in ways you couldn't imagine right now. People *will* get creative with it, and something cool and new and useful will come from it.
This is really important for preservation reasons. This means that everyone can now make extensions easily and handy things like newer device drivers. Yes most of this stuff was mapped out many years ago but lots of the data was in magazines and books. Having actual source code (that compiles) is a much better reference.
@@DavesGarage In my opinion V6.2 (apart from v7/opendos v7) is the best all round DOS. It had a reasonably low memory footprint. Good basic memory management tools. Had dosshell (which was clunky but kind of worked) and was compatible with most software. Add in Qemm,Norton commander 5(VC is not as memory friendly) and DESQview. That was my all round fun Dos system back in the day. Mind you I switched to OS/2 shortly after that and then windows 2000 x64 (the last service pack was good) and then XP x64. OS/2 was what windows should have been. The pure object oriented design was funny. You could drag and drop fonts and change them in any program. The real power of OS/2 was the multi tasking though. I had a 486 dx/2-66 with 20mb of ram and OS/2 would chugg away running 8 or 10 copies of pkzip all compressing different files at the same time and OS/2 would still let you type in the keyboard buffer and would remember it. Windows would just start clicking the internal PC speaker and break. Serious question though? Who wrote the Mouse code for microsoft back then? I swear its the most robust code microsoft has. The entire PC would fall down but you could still move the mouse around and it'd display perfectly on the screen when everything else froze.
@@gaborm4767 A hint at legal implications where re-implementations of MS OSs like FreeDOS and ReactOS are expected to be made from scratch, same behavior but different source from the original.
It's really sad, that Microsoft didn't add the sourcecode of LINK and GW-BASIC to their MS-DOS 4.0 source code release. At least binaries of LINK, EXE2BIN and MASM can be found in the TOOLS directory of this release.
@@lindoran Yes i know, but that's a much older GW-BASIC version, it's only version 1.0. MS-DOS 4.02 shipped with the newest GW-BASIC version and as far as i know the last one.
The script to cleanup the character encoding mess would've been really useful yesterday... I wanted to build DOS 4.0 on DOS 6.22 running on real hardware and I used an already sanitized source from someone that also helped me on X but it still required fixing pretty much each skl file which I did manually... In the end I did manage to build and boot it though which is pretty cool
I really like the FreeDOS Edlin editor. And I use it today- and without irony. ☺ I just like how Gregory avoided the control characters and instead borrowed some features from ed(1) like "." to stop editing.
Interestingly, the TOOLS folder contains not only MASM and LINK, but also the Microsoft C 5.10 compiler including the C library and its header files. The library is in the folder BLD backslash LIB and the header files in BLD backslash INC. The library is called SLIBCE LIB For testing purposes i just compiled a simple hello world and it worked. The necessary compiler options are slash I followed by the folder to the include files, your source file and -link followed by the library folder.
In the tools folder there are some other text files that might be converted to DOS format too. These have the file ending ERR, H, HLP and INI. You can adjust the command in 3:12 to convert them too.
Here is the adjusted command, but I'm not sure if YT changes it. find TOOLS -iname '*.ERR' -o -iname '*.H' -o -iname '*.HLP' -o -iname '*.INI' | xargs unix2dos -f
@@andrewlankford9634 If you want to learn 16-bit real-mode assembly, there are numerous old books available in many languages that use MASM. But you won't find many books that use NASM or FASM. At least not in any language other than English.
outside of Sun workstations using MC68000, the DOS 8088/86 was pretty much first microprocessor personal computer where it became pragmatic to use C complier to write commercial software - prior to that it was assembly language for most notable software titles And of course its the platform where Turbo Pascal took off and lots of corporate in-house software could be written in that
over 20 years ago in my technical college our teacher/admin just migrated everything to windows 2000 and after some time ran into the problem that norton ghost for dos couldn't create disk images anymore because the file size exceeded the fat16 limit. i remembered something about freedos supporting fat32 back in my head and tried it out. to my surprise norton ghost was "upwards-compatible" with freedos and was able to write larger disk images 🎉 the school immediately migrated to freedos as the second os afterwards (we also used it for c lessons)
Seeing that mount into /tmp reminds me of a mistake I made many, many years ago: I had two servers, one BSD running on a VAX machine, and another running Ultrix on a MIPS machine. I mounted the Ultrix root directory using NFS into a directory under /tmp on the BSD machine. I worked on this for a bit and then went home, but left the directory mounted. I came back the next day and noticed there was some weird thing going on in the Ultrix system. The system itself was running fine, but a lot of stuff seemed to be missing. What had happened was that a nightly maintenance script had tun on the BSD system which had deleted all files under /tmp which had not been touched in 7 days. Since the root of the Ultrix system was mounted under /tmp, the maintenance script had performed this operation on every single file on the system. That meant that everything that was needed to run the Ultrix system was still there, but any file that hadn't been touched in the last week was now deleted. It took a while to recover this. After this, I never mount anything under /tmp anymore.
Yeah, you're supposed to use /mnt for temporary mounts, and someone started a trend of using /mount. I see that one on a lot of Debian based distros so I'm assuming it started there, but it could also be that the FreeDesktop organization is to blame. Annoys me when I go to tab complete /m and have to cycle.
I used to admin some "Big Iron" Unix systems (Apollo, HP-UX, SunOS) and yeah, I shouldn't use /tmp for that. Only temp files. But guestfstools ("guestmount") is plain userspace, and as a general user I don't have write access to /mnt. I guess I should get in the habit of mounting only inside my $HOME somewhere.
@@freedosproject Why not just change fstab so everyone in `users` can mount specific devices? If we're talking about removable devices, then use its UUID. I've got several portable drives that I setup that way and any user can do `mount /mnt/betty` or `mount /mnt/sammy`, which is what I named my SAMBA share for Windows devices. I generally only mount in $HOME if it needs to be private.
I wonder if they will release windows 3.11 as open source. Imagine having win 3.11 running on freedos. Could run all those old shareware and freeware win 3 programs.
Thanks for this video. Nice overview of the build process to get these commands built under FreeDOS. BTW: You are aware, I hope, that 'edlin' really sucked. Not too many of us liked it even when this stuff was new. It was just a carryover from when our computers didn't have enough storage to be having programs like 'edit' included in the operating system itself.
I am one of the rare ones that actually likes Edlin. Although I prefer FreeDOS Edlin, which does things a bit like ed(1) on Unix - and I also like ed. ☺
Yeah, that's kind of weird. I didn't have time to dig into it, though.
7 місяців тому+3
@@freedosprojectI had a look on the MSDOS source, though first time for me to see any DOS source (I haven't even seen source code of FreeDOS) I managed to find the ASM source file where it's handled, and it's suspect it will be some code page setting functionality. Maybe ... TYPE seems to be label TYPEFIL in file CMD/COMMAND/TCMD1B.ASM Well, if I am correct at all here, just guessing ...
I did (for a floppy) and it errored out. But ecm's note on the freedos-devel email list [the news item on the website has a link to ecm's discussion] shows how to make a bootable system with this.
I installed FreeDOS in an old Latitude E6400 I had lying around and it works perfectly to play old DOS games... and that's the whole extent of my knowledge of "systems" or "computers". But I have an honest request, would it be too much to ask if one day you could make a video laying out what the purpose of a DOS system is in 2024? What is it being used for, other than playing old DOS games? Serious question. Hope you can do it for us newbs. Love FreeDOS!
There are still quite a lot of old codes running nowadays and yeah its not for gaming but business apps 😂 Besides someone can just create a port that could use it within a docker to run apps which we know its way smaller than modern OS. Of course security wise it must goes through patches first and support for modern features need to be added. But well then again it depends a lot of peoples imaginations.
There are machines in the industry that cost over 10 million dollars and are operated with a program that runs natively under MS-DOS. Such machines cannot simply be replaced. Instead, you try to operate it for as long as possible. So if their old PC no longer works, they will look for another old retro PC to operate the machine and this is where FreeDOS becomes interesting because the compatibility with newer hardware is a little better in FreeDOS than with the old MS-DOS. So this is an example of a useful application. In other cases, people collect old hardware but do not have enough MS-DOS licenses to install MS-DOS on every computer. FreeDOS is also very helpful here.
One specific example of such a machine is CNC milling. I worked with someone last year who used a CNC milling machine in his shop, but didn't know DOS, so helped with getting it running again. CNC milling is something you *do not change* so once you have a working config, it just churns out part after part after part.
How can you make an MS-DOS 4.0 hard drive or floppy drive bootable? Do you need to write a boot loader or it is included? Also it could be interesting to see what parts remained and what changed between version 2 and version 4.
I'm going to respond to this, so that (in case you get a reply) I can be notified for it I'm completely unsure how you're supposed to make this a bootable image, despite using the "MSBOOT.BIN" file inside of the "BOOT" folder in the source code as the Boot Image, and actually making the bootable image with ImgBurn, it still doesn't work.
There are two DOS ways to make a bootable disk (both floppy and harddisk). 1) format format a: /s 2) sys sys a: Note: format formats and is destructive
FreeDOS supports long file names (LFN), FAT32, more modern hardware and its tools are usually much more powerful. Therefore, MS-DOS 4.0 should only be interesting for historical reasons and for CPUs with 286 or older. A big leap would be MS-DOS 5.0, which ships with XMS memory support and HIMEM SYS. It is also capable of running Windows 3.x in enhanced mode and any later DOS game. It wouldn't have FAT32 and LFN support, but LFN support is not that important in the DOS world anyway because most programs for DOS can't handle it anyway.
Not sure with the MIT license Microsoft released this on, but I know that some licensed code can't be forked to other works of a differing licence. Most FOSS developers of reverse engineering projects like to steer clear of the original's code for legal reasons so I don't see FreeDOS adding old Microsoft code into the project unless it's absolutely necessary and ok to do so.
Considering that it had to be fixed to compile, I'd say he just proved Lunduke right. In fact, if you watch that video again, you'll notice that he doesn't say that it won't ever compile, just that it needed corrections from a poor upload to compile. To be clear, he was saying that it didn't compile out of the box and surely no one would dispute that.
Actually according to the source (v4.0-ozzie/bin/DISK1/README) this is: "Microsoft's first beta release of Multi-tasking MS-DOS. This version is based upon MS-DOS Version 2 sources, we will be reimplementing the multi-tasking enhancements on top of Version 3 sources shortly." So 4.00 beta? 😵🤔
Since projects licensed under a copyleft F/LOSS license like the GNU GPL - like yours - can borrow from projects licensed under a permissive F/LOSS license like MIT (but not the other way around), do you as a developer think this deluge of now F/LOSS official MS-DOS source code being publicly available on GitHub under MIT can be used &/or studied to benefit the future accuracy & compatibility of reverse engineered projects FreeDOS & DOSBox?
The command shown at 1:36 replaces all of the following three letters: ĿĴ� with #, in the three explicitly named files in src/. The three symbols were _intended_ to be ╗, ╣, and various other line-drawing characters respectively, but were destroyed due to incompetence when the code was uploaded to GitHub.
Yes I should have explained that more carefully in the video. As you said, the way the code was uploaded to GitHub caused the CP437 line drawing characteres to be expanded .. and if you try to compile, the build fails with "line too long" errors. This basically shortens the line, undoing the "line too long" damage from GitHub conversion.
If Microsoft really cared about open-source they would have released something with the NT kernel. DOS is pretty cool, but it's been a while since Microsoft made money using DOS. I see them open-sourcing DOS as a last-ditch effort to squeeze some more publicity out of a project that otherwise is just obsolete. Still great to have it, but if I want to learn how to build a DOS-like OS I'd read the FreeDOS sources anyway, who wants to read ASM? Plus you can actually build it easily in 2024.
There is a reason I got rid of the control characters like ^C in FreeDOS Edlin. I thought it was too complicated to add them when all I needed was a period.
Will you be able to use this source code to make freeDOS more MS-DOS compatible, and overall better? I love using freeDOS to make a quick usb drive to boot a legacy computer up into a ms-dos compatible environment to do a bios update or firmware update or something, super useful.
@@mgord9518 I have never had a problem. I guess I don't know! I'm just curious if any of this assembly code going on in 4.0 that he's talking about belongs in freeDOS. I'm not exactly a software developer if you could tell
Lunduke is not the smartest person around. He says things to make a scene and try to make himself relevant. Best just to ignore him and have a much happier life.
@@freedosproject The GPL version 3 has a right to repair clause and a clause preventing people from claiming FreeDOS violates an effective technological measure. This prevents companies from using freeDOS in a product and then preventing people from exercising their four freedoms through effective technological measures.
Oh my God!!! You had me at FREE DOS!! ..... Wasn't it always free... When my window 95 crashed, it was free to get stuck in dos and play dos games because you couldn't figure out how to fix the registry from dos and couldn't find the windows floppies to reinstall.. all 35 of them.
They are there, but not in an obvious place. Look in the SRC directory .. they are in SRC\TOOLS\BLD\INC .. and you can use the CL compiler in SRC\TOOLS to compile. Here's my environment that I have (this is `SET > SET.TXT` so there's extra stuff in there): CONFIG=2 DOSDIR=C:\FreeDOS COMSPEC=C:\FreeDOS\BIN\COMMAND.COM PATH=C:\src\tools;C:\freedos\bin COUNTRY=usa-ms BAKROOT=C: LIB=C:\src\tools\bld\lib INIT=C:\src\tools INCLUDE=C:\src\tools\bld\inc And with that, I was able to compile several C programs, using CL, including a "hello world" program, another program that used strlen, and another program that used malloc to allocate memory and store values. They all ran fine. I try not to do too many "programming" videos on the channel, but would it help to do a quick video about using the MS-DOS 4.00 build environment to compile these demo C programs?
edlin, the editor I always look back at and wonder - how could I ever have written anything on any length in that? The answer? I was a kid, I had all the time in the world, and my programs were basically just menues with choices of games or demos. (And choice of drivers and locale, because the most taxing games on my 286-clone couldn't run if I loaded everything.)
I actually like Edlin- at least, the version we use in FreeDOS. The FreeDOS Edlin (thanks, Gregory!) is an excellent Edlin that doesn't use the control characters from MS-DOS Edlin. I find this *much* easier to use. I also compiled FreeDOS Edlin on my Linux box, and use it there sometimes. (I'm also one of those guys that also uses ed(1) sometimes- and without irony, too.) $ edlin /tmp/f […] /tmp/f: New file. *i : This is an example of using FreeDOS edlin on Linux. Yes, I really am : using this on Linux, because FreeDOS edlin compiles fine on Linux. : Use "." to stop inserting text, then "e" to write and exit. : . *e Abort edit (Y/n)? y /tmp/f: 3 lines written
Presumably because it's still used to small extent, I remember 10+ years back when I got access to MSDN (or something like that) via school and I could use various MS software for free during my studies, among software offered was DOS 6.22! Altough I don't think MS still sells it today.
On a real machine i would use Linux and FreeDOS in a dual boot setting to transfer data over the network. Linux can read and write to fat file systems.
Github didn't make the conversion does it, to LF i mean? You mean the machine of whomever committed it make that conversion because they had autocrlf set on their git config right? If Github does that automatically that's a ridiculous assumption on their part
MS-DOS 4.x wasn't very popular because it had to high memory requirements in conventional memory area (below 640 KiB). The problem was only solved with MS-DOS 5.0 after the competition did it with DR-DOS 5.0. So Microsoft had to make improvements so as not to lose ground against Digital Research. In MS-DOS 5, parts of DOS were moved to UMA and HMA, which freed up more space in conventional memory.
I wish they had released 3.x. 4.x changed a ton of DOS internal memory structures that made writing, among other things, redirectors more difficult. 5.x reverted those changes - or more accurately evolved from the 3.x code base rather than the 4.x.
Well this seems to pre-date 3.xx at least according to the source documentation: v4.0-ozzie/bin/DISK1/README says "Enclosed you will find Microsoft's first beta release of Multi-tasking MS-DOS. This version is based upon MS-DOS Version 2 sources, we will be reimplementing the multi-tasking enhancements on top of Version 3 sources shortly."
You need an assembler that is compatible to old MASM syntax and a C Compiler that is compatible to old Microsoft C syntax. The original versions are both 16 bit real mode applications, thus they won't run natively on a modern 64 Bit windows. But emulation is an option.
I like MS-DOS but what is the benefit of open source it when we have Free-Dos especially that MS-DOS source code is mostly assembly as you mentioned so the contribution may not be that big (I think)? BTW, Is there any programming video coming soon? Thanks Jim!
Compatibility for a start. There can be stuff FreeDOS didn't get _quite_ right that this can help with. Further, it's good to see stuff like this released if only from a historical POV. Not everything needs to be useful.
I think this is more of an academic release, less a practical one. But by reading the source you can learn a lot on how DOS was built and use that knowledge not only when coding FreeDOS, but any DOS program, and understanding the hardware.
O/S2 v1.3? If I remember correctly, both MS and IBM released their own packages of 1.x Interestingly, Windows NT had an OS/2 subsystem. There were "bound" executables that contained a DOS and OS/2 executable. If you ran the bound executable it used the OS/2. For a long time there was no NT version of LHarc. So, you wanted the bound executable to use in NT. It was observably faster (at least on my 486-33 at the time).
can't do a like, the number of likes is kinda perfect, makes me think of my DOS computer "486" likes hahahaha but i did enjoy the video so consider this my like :D
It would be far more interesting to rewrite that in C now. Otherwise its just historical value. Rewrite in C, do it in 64 bit, then give it the ability to run 16 bit and 32 bit binaries via the virtualization features. It would work better, be faster, and more reliant to today's processors.
@@scottfranco1962 I have to strongly disagree with that. The problem starts with the algorithms used. Modern processors allow you to pack data into an array if it's not too large, because processing that array is faster than using a linked list on modern CPUs. The cache sizes on modern CPUs are so gigantic that the array wins over the linked list. With an old 8086 it's exactly the opposite, the linked list is faster. So it's not enough to just use a high-level language and hope that the compiler will adapt it to the CPU. Because the problem starts with the design and choice of algorithms. And no high-level language compiler can optimize away an unsuitable design or choosing the wrong algorithm. So if you write a program for DOS, you should optimize it to suit the hardware of that time.
DOS5 is a fixed DOS4, very little changed between 2 releases other than bugfixes in non IBM hardware, and the IFSFUNC FS redirector module was striped and bolted back into MSDOS.sys to make it use less memory. EMM, and the XMA driver got updated and became the widely known EMM386 and HIMEM, but the core is almost the same, and if you give it a chance, you can use the updated versions on DOS4 as well.
Typical microshart, "releasing" the worst dos version, the equivalent of Me and Vista. Make 6.22 open source and I'll be impressed. There is zero reason to keep it locked.
This is uh.... more confusing than I expected. I followed the steps to clean up the source files, I moved them over to a Windows 95 VM.... it fails to build after a while, getting stuck in xma2ems. Well okay. I switch over to a FreeDOS VM. You got it built, surely it'll work.... nope, bombs out even earlier in BOOT. Is there anything missing from the video presentation?
Nothing missing. I installed a vanilla "plain DOS" FreeDOS 1.3 in a fresh disk image, replaced the FDAUTO.BAT with a single PATH statement, and updated my SETENV.BAT file. That's all I did before the video. And the rest you watched me do in real time in the video. I even repeated the procedure several times before recording this video, just to be *very* sure I had the right steps in the right order. That's why there's that line in the msdos-prep.bash script to delete the 'MS-DOS-main' directory if it exists, and start over by unzipping - because I had repeated this process maybe five or six times to make sure I had it down smooth, and that line made it just that much easier to start over. If you're having problems, I'd double check the SETENV.BAT file to make sure your environment is set up correctly. Especially the LIB, INIT, and INCLUDE variables. Skip ahead to 6:02 in the video.
Oh my god! No way!! What a incredible charity after 37 years! With such progression my grandchildren would see sources of MS-DOS 6.22! Very encouraging!!
You joke around, but this actually is a rather useful code dump for a lot of reasons. Most important is probably the gaming community. In a few years, you will see this code being used in ways you couldn't imagine right now. People *will* get creative with it, and something cool and new and useful will come from it.
This is really important for preservation reasons. This means that everyone can now make extensions easily and handy things like newer device drivers. Yes most of this stuff was mapped out many years ago but lots of the data was in magazines and books. Having actual source code (that compiles) is a much better reference.
I worked on it, so I'm hoping they do release 6.2 eventually so I can see my old ASM code!
@@DavesGarage In my opinion V6.2 (apart from v7/opendos v7) is the best all round DOS. It had a reasonably low memory footprint. Good basic memory management tools. Had dosshell (which was clunky but kind of worked) and was compatible with most software.
Add in Qemm,Norton commander 5(VC is not as memory friendly) and DESQview. That was my all round fun Dos system back in the day. Mind you I switched to OS/2 shortly after that and then windows 2000 x64 (the last service pack was good) and then XP x64.
OS/2 was what windows should have been. The pure object oriented design was funny. You could drag and drop fonts and change them in any program. The real power of OS/2 was the multi tasking though. I had a 486 dx/2-66 with 20mb of ram and OS/2 would chugg away running 8 or 10 copies of pkzip all compressing different files at the same time and OS/2 would still let you type in the keyboard buffer and would remember it. Windows would just start clicking the internal PC speaker and break.
Serious question though? Who wrote the Mouse code for microsoft back then? I swear its the most robust code microsoft has. The entire PC would fall down but you could still move the mouse around and it'd display perfectly on the screen when everything else froze.
I used the DOS to build the DOS
It's a bit like compiling Linux on Linux 🙃
@@SirWolf404OKAY WINDOWS ON WINDOWS.
Wake me up when they publish 6.22
At the current pace thats about in 2064.
Wake me up when they publish Windows XP.
Old commercial software should be made extinct.
source code of MSDOS 6 is leaked
@@HRJosef a lot of code has leaked, but thats no use. What we expect and want is a MIT licensed official opening of the code base.
v7 of opendos is officially released. Personally that's my favourite.
FreeDOS: Did you view the microsoft source code?
FreeDOS Developer: No
FreeDOS: Proceed
What do you want to say?
@@gaborm4767 Search the wikipedia for "Clean room design"
@@gaborm4767 A hint at legal implications where re-implementations of MS OSs like FreeDOS and ReactOS are expected to be made from scratch, same behavior but different source from the original.
It's really sad, that Microsoft didn't add the sourcecode of LINK and GW-BASIC to their MS-DOS 4.0 source code release. At least binaries of LINK, EXE2BIN and MASM can be found in the TOOLS directory of this release.
Gw basic was released already -- I'll agree it would be nice to have the sources for the assembler, linker and exe2bin.
@@lindoran Yes i know, but that's a much older GW-BASIC version, it's only version 1.0. MS-DOS 4.02 shipped with the newest GW-BASIC version and as far as i know the last one.
Plenty of source codes for good basics out there.
@@OpenGL4ever There have been some user updates to that old GW-BASIC.
GW BASIC sources released years ago.
The script to cleanup the character encoding mess would've been really useful yesterday...
I wanted to build DOS 4.0 on DOS 6.22 running on real hardware and I used an already sanitized source from someone that also helped me on X but it still required fixing pretty much each skl file which I did manually...
In the end I did manage to build and boot it though which is pretty cool
edlin, the only true real editor to end the editor wars once and for all !
editor from DR-DOS 3.41 was much better.
I really like the FreeDOS Edlin editor. And I use it today- and without irony. ☺ I just like how Gregory avoided the control characters and instead borrowed some features from ed(1) like "." to stop editing.
Interestingly, the TOOLS folder contains not only MASM and LINK, but also the Microsoft C 5.10 compiler including the C library and its header files.
The library is in the folder BLD backslash LIB and the header files in BLD backslash INC. The library is called SLIBCE LIB
For testing purposes i just compiled a simple hello world and it worked.
The necessary compiler options are slash I followed by the folder to the include files, your source file and -link followed by the library folder.
In the tools folder there are some other text files that might be converted to DOS format too.
These have the file ending ERR, H, HLP and INI.
You can adjust the command in 3:12 to convert them too.
Here is the adjusted command, but I'm not sure if YT changes it.
find TOOLS -iname '*.ERR' -o -iname '*.H' -o -iname '*.HLP' -o -iname '*.INI' | xargs unix2dos -f
Wunnerful. Now a new generation can learn how crappy old versions of MASM were.
@@andrewlankford9634 If you want to learn 16-bit real-mode assembly, there are numerous old books available in many languages that use MASM. But you won't find many books that use NASM or FASM. At least not in any language other than English.
outside of Sun workstations using MC68000, the DOS 8088/86 was pretty much first microprocessor personal computer where it became pragmatic to use C complier to write commercial software - prior to that it was assembly language for most notable software titles
And of course its the platform where Turbo Pascal took off and lots of corporate in-house software could be written in that
over 20 years ago in my technical college our teacher/admin just migrated everything to windows 2000 and after some time ran into the problem that norton ghost for dos couldn't create disk images anymore because the file size exceeded the fat16 limit. i remembered something about freedos supporting fat32 back in my head and tried it out. to my surprise norton ghost was "upwards-compatible" with freedos and was able to write larger disk images 🎉 the school immediately migrated to freedos as the second os afterwards (we also used it for c lessons)
Seeing that mount into /tmp reminds me of a mistake I made many, many years ago:
I had two servers, one BSD running on a VAX machine, and another running Ultrix on a MIPS machine. I mounted the Ultrix root directory using NFS into a directory under /tmp on the BSD machine. I worked on this for a bit and then went home, but left the directory mounted.
I came back the next day and noticed there was some weird thing going on in the Ultrix system. The system itself was running fine, but a lot of stuff seemed to be missing.
What had happened was that a nightly maintenance script had tun on the BSD system which had deleted all files under /tmp which had not been touched in 7 days. Since the root of the Ultrix system was mounted under /tmp, the maintenance script had performed this operation on every single file on the system. That meant that everything that was needed to run the Ultrix system was still there, but any file that hadn't been touched in the last week was now deleted. It took a while to recover this.
After this, I never mount anything under /tmp anymore.
Yeah, you're supposed to use /mnt for temporary mounts, and someone started a trend of using /mount. I see that one on a lot of Debian based distros so I'm assuming it started there, but it could also be that the FreeDesktop organization is to blame. Annoys me when I go to tab complete /m and have to cycle.
I used to admin some "Big Iron" Unix systems (Apollo, HP-UX, SunOS) and yeah, I shouldn't use /tmp for that. Only temp files. But guestfstools ("guestmount") is plain userspace, and as a general user I don't have write access to /mnt. I guess I should get in the habit of mounting only inside my $HOME somewhere.
@@freedosproject Why not just change fstab so everyone in `users` can mount specific devices? If we're talking about removable devices, then use its UUID. I've got several portable drives that I setup that way and any user can do `mount /mnt/betty` or `mount /mnt/sammy`, which is what I named my SAMBA share for Windows devices. I generally only mount in $HOME if it needs to be private.
I wonder if they will release windows 3.11 as open source. Imagine having win 3.11 running on freedos. Could run all those old shareware and freeware win 3 programs.
You can run Windows 3.11 even now without source code.
Thanks for this video. Nice overview of the build process to get these commands built under FreeDOS.
BTW: You are aware, I hope, that 'edlin' really sucked. Not too many of us liked it even when this stuff was new. It was just a carryover from when our computers didn't have enough storage to be having programs like 'edit' included in the operating system itself.
I am one of the rare ones that actually likes Edlin. Although I prefer FreeDOS Edlin, which does things a bit like ed(1) on Unix - and I also like ed. ☺
Will the source code of the MEMM386 ASM file be useful for FreeDOS's JEMMEX drivers?
you are welcome :)
I'm curious now: what a simple command like "type" can use which is not implemented in the FreeDOS kernel?
Yeah, that's kind of weird. I didn't have time to dig into it, though.
@@freedosprojectI had a look on the MSDOS source, though first time for me to see any DOS source (I haven't even seen source code of FreeDOS) I managed to find the ASM source file where it's handled, and it's suspect it will be some code page setting functionality. Maybe ... TYPE seems to be label TYPEFIL in file CMD/COMMAND/TCMD1B.ASM Well, if I am correct at all here, just guessing ...
Can you boot? So, next step will be adding network capabilities, and the system will be useful after.
Did you try "sys c:" and actually boot ms-dos 4.00 ?
I did (for a floppy) and it errored out. But ecm's note on the freedos-devel email list [the news item on the website has a link to ecm's discussion] shows how to make a bootable system with this.
I installed FreeDOS in an old Latitude E6400 I had lying around and it works perfectly to play old DOS games... and that's the whole extent of my knowledge of "systems" or "computers". But I have an honest request, would it be too much to ask if one day you could make a video laying out what the purpose of a DOS system is in 2024? What is it being used for, other than playing old DOS games? Serious question.
Hope you can do it for us newbs.
Love FreeDOS!
There are still quite a lot of old codes running nowadays and yeah its not for gaming but business apps 😂
Besides someone can just create a port that could use it within a docker to run apps which we know its way smaller than modern OS.
Of course security wise it must goes through patches first and support for modern features need to be added.
But well then again it depends a lot of peoples imaginations.
There are machines in the industry that cost over 10 million dollars and are operated with a program that runs natively under MS-DOS. Such machines cannot simply be replaced. Instead, you try to operate it for as long as possible. So if their old PC no longer works, they will look for another old retro PC to operate the machine and this is where FreeDOS becomes interesting because the compatibility with newer hardware is a little better in FreeDOS than with the old MS-DOS.
So this is an example of a useful application.
In other cases, people collect old hardware but do not have enough MS-DOS licenses to install MS-DOS on every computer. FreeDOS is also very helpful here.
One specific example of such a machine is CNC milling. I worked with someone last year who used a CNC milling machine in his shop, but didn't know DOS, so helped with getting it running again. CNC milling is something you *do not change* so once you have a working config, it just churns out part after part after part.
I recommend the Norton Commander clone, Necromancer's Dos Navigator (NDN) for various platforms, including (Windows/Linux/Dos - also 64-bit)
How can you make an MS-DOS 4.0 hard drive or floppy drive bootable? Do you need to write a boot loader or it is included?
Also it could be interesting to see what parts remained and what changed between version 2 and version 4.
I'm going to respond to this, so that (in case you get a reply) I can be notified for it
I'm completely unsure how you're supposed to make this a bootable image, despite using the "MSBOOT.BIN" file inside of the "BOOT" folder in the source code as the Boot Image, and actually making the bootable image with ImgBurn, it still doesn't work.
There are two DOS ways to make a bootable disk (both floppy and harddisk).
1) format
format a: /s
2) sys
sys a:
Note: format formats and is destructive
If Microsoft keeps releasing the source code for more versions of dos what does this mean for Freedos if anything?
FreeDOS supports long file names (LFN), FAT32, more modern hardware and its tools are usually much more powerful. Therefore, MS-DOS 4.0 should only be interesting for historical reasons and for CPUs with 286 or older. A big leap would be MS-DOS 5.0, which ships with XMS memory support and HIMEM SYS. It is also capable of running Windows 3.x in enhanced mode and any later DOS game. It wouldn't have FAT32 and LFN support, but LFN support is not that important in the DOS world anyway because most programs for DOS can't handle it anyway.
Not sure with the MIT license Microsoft released this on, but I know that some licensed code can't be forked to other works of a differing licence.
Most FOSS developers of reverse engineering projects like to steer clear of the original's code for legal reasons so I don't see FreeDOS adding old Microsoft code into the project unless it's absolutely necessary and ok to do so.
Lunduke said it doesn't work, 56 minutes 💥
Y'know, Lunduke...
well he was right -
Considering that it had to be fixed to compile, I'd say he just proved Lunduke right. In fact, if you watch that video again, you'll notice that he doesn't say that it won't ever compile, just that it needed corrections from a poor upload to compile. To be clear, he was saying that it didn't compile out of the box and surely no one would dispute that.
Note this is MS-DOS 4.0 not 4.01 which isnt the same thing
A better way to put it is this is Multitasking DOS called 4.0. Not MS-DOS 4.0 that Microsoft ran back to after this failed.
@@grappydingus Actually, it _is_ "MS-DOS 4.0 that Microsoft ran back to".
In a way, but only after running away from it first. Lol.
Actually according to the source (v4.0-ozzie/bin/DISK1/README) this is: "Microsoft's first beta release of Multi-tasking MS-DOS. This version is based upon MS-DOS Version 2 sources, we will be reimplementing the multi-tasking enhancements on top of Version 3 sources shortly." So 4.00 beta? 😵🤔
@@SirWolf404 That's not the source he's looking at, though.
Can someone make a video how to BOOT into DOS 4.0? I don't want to run a FreeDOS kernel to run the DOS 4.0 "user space" tools
Since projects licensed under a copyleft F/LOSS license like the GNU GPL - like yours - can borrow from projects licensed under a permissive F/LOSS license like MIT (but not the other way around), do you as a developer think this deluge of now F/LOSS official MS-DOS source code being publicly available on GitHub under MIT can be used &/or studied to benefit the future accuracy & compatibility of reverse engineered projects FreeDOS & DOSBox?
nice, dos built dos :D
The command shown at 1:36 replaces all of the following three letters: ĿĴ� with #, in the three explicitly named files in src/.
The three symbols were _intended_ to be ╗, ╣, and various other line-drawing characters respectively, but were destroyed due to incompetence when the code was uploaded to GitHub.
Yes I should have explained that more carefully in the video. As you said, the way the code was uploaded to GitHub caused the CP437 line drawing characteres to be expanded .. and if you try to compile, the build fails with "line too long" errors. This basically shortens the line, undoing the "line too long" damage from GitHub conversion.
If Microsoft really cared about open-source they would have released something with the NT kernel. DOS is pretty cool, but it's been a while since Microsoft made money using DOS. I see them open-sourcing DOS as a last-ditch effort to squeeze some more publicity out of a project that otherwise is just obsolete. Still great to have it, but if I want to learn how to build a DOS-like OS I'd read the FreeDOS sources anyway, who wants to read ASM? Plus you can actually build it easily in 2024.
the source code helps anything in developing of free dos or it is already mature enough to not need it ?
A bit off topic but I'm curious, is there a specific reason why W3.x 386 enhanced mode isn't supported in Freedos?
Because you've got to be almost exactly identical under the hood to MS-DOS for Windows.
There is a reason I got rid of the control characters like ^C in FreeDOS Edlin. I thought it was too complicated to add them when all I needed was a period.
I like the FreeDOS Edlin better! And I like that FreeDOS Edlin compiles on non-DOS systems. I run it on my Linux box at home sometimes.
@@freedosproject Edlin didn't have to be complicated. ;-)
Will you be able to use this source code to make freeDOS more MS-DOS compatible, and overall better? I love using freeDOS to make a quick usb drive to boot a legacy computer up into a ms-dos compatible environment to do a bios update or firmware update or something, super useful.
What compatibility issues does it have?
@@mgord9518 I have never had a problem. I guess I don't know! I'm just curious if any of this assembly code going on in 4.0 that he's talking about belongs in freeDOS. I'm not exactly a software developer if you could tell
MS-DOS is mainly assembler and FreeDOS is mainly C.
🔥🔥🔥🔥🔥🔥
I watched this after seeing Bryan Lunduke's video making fun of MS since the source code would not compile according to him.
I lol with the brain damage censor (it didn't censor the expression but the name) 😂
Tbh Lunduke is rarely right on anything but the political spectrum.
@@lucyinchat He's daring people on his channel to prove him wrong about stuff on his blog. You should take the challenge.
Lunduke is not the smartest person around. He says things to make a scene and try to make himself relevant. Best just to ignore him and have a much happier life.
i dont understand this stuff too much. reading and watching so i get better. his video was so convincing. i am really happy i saw this video.
What is the progress of upgrading to the GPL version 3 for Freedos.
Why "upgrade" the GPL to version 3? If you read the GPL v3, this doesn't really add anything for a DOS system. GPL v2 is fine.
@@freedosproject The GPL version 3 has a right to repair clause and a clause preventing people from claiming FreeDOS violates an effective technological measure. This prevents companies from using freeDOS in a product and then preventing people from exercising their four freedoms through effective technological measures.
I'd like to see them open source one of the QBasic versions. Not that it's really needed, but I'm curious.
That would be interesting too. I'm sure the folks at FreeBASIC Compiler would be interested in that too, since FreeBASIC has "QB" mode.
Oh my God!!! You had me at FREE DOS!! ..... Wasn't it always free... When my window 95 crashed, it was free to get stuck in dos and play dos games because you couldn't figure out how to fix the registry from dos and couldn't find the windows floppies to reinstall.. all 35 of them.
The word "free" means "freedom", not "free beer".
ms-dos 4.00 sources are missing the stdio.h and other .h files
They are there, but not in an obvious place. Look in the SRC directory .. they are in SRC\TOOLS\BLD\INC .. and you can use the CL compiler in SRC\TOOLS to compile. Here's my environment that I have (this is `SET > SET.TXT` so there's extra stuff in there):
CONFIG=2
DOSDIR=C:\FreeDOS
COMSPEC=C:\FreeDOS\BIN\COMMAND.COM
PATH=C:\src\tools;C:\freedos\bin
COUNTRY=usa-ms
BAKROOT=C:
LIB=C:\src\tools\bld\lib
INIT=C:\src\tools
INCLUDE=C:\src\tools\bld\inc
And with that, I was able to compile several C programs, using CL, including a "hello world" program, another program that used strlen, and another program that used malloc to allocate memory and store values. They all ran fine.
I try not to do too many "programming" videos on the channel, but would it help to do a quick video about using the MS-DOS 4.00 build environment to compile these demo C programs?
Now try to compile Freedos in DOS 4.0
edlin, the editor I always look back at and wonder - how could I ever have written anything on any length in that? The answer? I was a kid, I had all the time in the world, and my programs were basically just menues with choices of games or demos. (And choice of drivers and locale, because the most taxing games on my 286-clone couldn't run if I loaded everything.)
I actually like Edlin- at least, the version we use in FreeDOS. The FreeDOS Edlin (thanks, Gregory!) is an excellent Edlin that doesn't use the control characters from MS-DOS Edlin. I find this *much* easier to use. I also compiled FreeDOS Edlin on my Linux box, and use it there sometimes. (I'm also one of those guys that also uses ed(1) sometimes- and without irony, too.)
$ edlin /tmp/f
[…]
/tmp/f: New file.
*i
: This is an example of using FreeDOS edlin on Linux. Yes, I really am
: using this on Linux, because FreeDOS edlin compiles fine on Linux.
: Use "." to stop inserting text, then "e" to write and exit.
: .
*e
Abort edit (Y/n)? y
/tmp/f: 3 lines written
Why did MS release the source code for DOS 4.0 and not 6.22?
That will be in another 20 yrs lol
And Windows 1 through 3.11? @@wherami
Presumably because it's still used to small extent, I remember 10+ years back when I got access to MSDN (or something like that) via school and I could use various MS software for free during my studies, among software offered was DOS 6.22! Altough I don't think MS still sells it today.
@@snap_oversteer Yeah that's it, they only 'open source' truly worthless old stuff that nobody would dream of using.
@@illegalsmirf do we even need MS DOS when we have FreeDOS?
💖💖💖💖
Nice. Boot it up?
I wish there was modern SMB2 client for DOS. SMB1 is basically gone.
On a real machine i would use Linux and FreeDOS in a dual boot setting to transfer data over the network. Linux can read and write to fat file systems.
Github didn't make the conversion does it, to LF i mean? You mean the machine of whomever committed it make that conversion because they had autocrlf set on their git config right?
If Github does that automatically that's a ridiculous assumption on their part
nice
I don't understand the motive behind this...releasing 6.22 or even 5.0 would have bene more beneficial.
Well this introduces Multi-Tasking support, reading that source can definitely be interesting
@22:30 Did you forget the F3 trick, Jim? ;-)
F3 will load only the previous command, which was "del". I wanted to do the "dir" command, which was the command before that. ☺
so they skipped DOS 3.3, it was really popular, much more than 4.0
MS-DOS 4.x wasn't very popular because it had to high memory requirements in conventional memory area (below 640 KiB). The problem was only solved with MS-DOS 5.0 after the competition did it with DR-DOS 5.0. So Microsoft had to make improvements so as not to lose ground against Digital Research.
In MS-DOS 5, parts of DOS were moved to UMA and HMA, which freed up more space in conventional memory.
I wish they had released 3.x. 4.x changed a ton of DOS internal memory structures that made writing, among other things, redirectors more difficult. 5.x reverted those changes - or more accurately evolved from the 3.x code base rather than the 4.x.
Well this seems to pre-date 3.xx at least according to the source documentation: v4.0-ozzie/bin/DISK1/README says "Enclosed you will find Microsoft's first beta release of Multi-tasking MS-DOS. This version is based upon MS-DOS Version 2 sources, we will be reimplementing the multi-tasking enhancements on top of Version 3 sources shortly."
Do not edit partitions with that version FDISK. You are asking for a corrupted disk.
Does this create a bootable disk image?
If not how to do it
I mention it in the video. You have to use ecm's fix. I didn't demo that here because I didn't have the asm file to do it.
There is no way a court would enforce that oppressive licensing rule.
Definitely a stupid rule. But we wanted to take the safe route and avoid problems later. And I'm glad we did.
@@freedosproject Yeah, it's understandable.
A court is not there to say what is ethical, it is there to say what is lawful, very different.
is it possible to build this on modern windows? or other os’?
You need an assembler that is compatible to old MASM syntax and a C Compiler that is compatible to old Microsoft C syntax. The original versions are both 16 bit real mode applications, thus they won't run natively on a modern 64 Bit windows.
But emulation is an option.
@@OpenGL4ever thank you. I started learning all these. Will try to compile myself
I like MS-DOS but what is the benefit of open source it when we have Free-Dos especially that MS-DOS source code is mostly assembly as you mentioned so the contribution may not be that big (I think)?
BTW, Is there any programming video coming soon?
Thanks Jim!
Compatibility for a start. There can be stuff FreeDOS didn't get _quite_ right that this can help with.
Further, it's good to see stuff like this released if only from a historical POV. Not everything needs to be useful.
@@talideon 👍
Also, despite being older than the “target level” it’s useful for making backwards compatibility better.
@@lucyinchat 👍
I think this is more of an academic release, less a practical one. But by reading the source you can learn a lot on how DOS was built and use that knowledge not only when coding FreeDOS, but any DOS program, and understanding the hardware.
Wish they'd release the source code to OS/2. 😕
You can always email them and ask, I guess. 😉
O/S2 v1.3?
If I remember correctly, both MS and IBM released their own packages of 1.x
Interestingly, Windows NT had an OS/2 subsystem. There were "bound" executables that contained a DOS and OS/2 executable. If you ran the bound executable it used the OS/2. For a long time there was no NT version of LHarc. So, you wanted the bound executable to use in NT. It was observably faster (at least on my 486-33 at the time).
can't do a like, the number of likes is kinda perfect, makes me think of my DOS computer "486" likes hahahaha but i did enjoy the video so consider this my like :D
You can do a 👍Like now. We're well over 1000 likes at this point. ☺
@@freedosproject fair enough, worth it😁
Need OSS MS-DOS 6.22, 7.x, win95, 98, me, 2k, xp, 7 and 8
Just wait for approximately 200 years, and you will see them all 🤣
@@DanielLenskiy Why 200? Not 58 from now (for win8 released in 2012)?
TL;DR - Is it C or assembly?
assembler
Yes. Mostly ASM, but some commands are C.
It would be far more interesting to rewrite that in C now. Otherwise its just historical value. Rewrite in C, do it in 64 bit, then give it the ability to run 16 bit and 32 bit binaries via the virtualization features. It would work better, be faster, and more reliant to today's processors.
@@scottfranco1962 Once it no longer runs on 16-bit PCs, it's arguably not DOS anymore.
@@scottfranco1962 I have to strongly disagree with that. The problem starts with the algorithms used.
Modern processors allow you to pack data into an array if it's not too large, because processing that array is faster than using a linked list on modern CPUs. The cache sizes on modern CPUs are so gigantic that the array wins over the linked list. With an old 8086 it's exactly the opposite, the linked list is faster.
So it's not enough to just use a high-level language and hope that the compiler will adapt it to the CPU. Because the problem starts with the design and choice of algorithms. And no high-level language compiler can optimize away an unsuitable design or choosing the wrong algorithm.
So if you write a program for DOS, you should optimize it to suit the hardware of that time.
I was never a phoenix BIOS fan. AMI BIOS all the way.
DOS-4.0 is a turkey. DOS 3 was good. DOS 5 was good. DOS for was horrid.
DOS5 is a fixed DOS4, very little changed between 2 releases other than bugfixes in non IBM hardware, and the IFSFUNC FS redirector module was striped and bolted back into MSDOS.sys to make it use less memory. EMM, and the XMA driver got updated and became the widely known EMM386 and HIMEM, but the core is almost the same, and if you give it a chance, you can use the updated versions on DOS4 as well.
@@hyoenmadan Most DOS software from back then that was written for 386 required at least MS-DOS 5.0 or higher.
Typical microshart, "releasing" the worst dos version, the equivalent of Me and Vista.
Make 6.22 open source and I'll be impressed. There is zero reason to keep it locked.
The day Microsoft releases the MS-DOS 5 or MS-DOS 6 source code … will be an *interesting* day. 😀
MS-DOS 4.00, arguably the WORST DOS ever.
... NT 4, NT 6 (vista) ... Crap
NT 3, NT 5 (2000), NT 5.1 (XP), NT 7 (windows 7) good
See a pattern? I don't know if they come back as NT after that.
the worst version of dos
actually the worst version is 1.04
This is uh.... more confusing than I expected. I followed the steps to clean up the source files, I moved them over to a Windows 95 VM.... it fails to build after a while, getting stuck in xma2ems. Well okay. I switch over to a FreeDOS VM. You got it built, surely it'll work.... nope, bombs out even earlier in BOOT.
Is there anything missing from the video presentation?
Nothing missing. I installed a vanilla "plain DOS" FreeDOS 1.3 in a fresh disk image, replaced the FDAUTO.BAT with a single PATH statement, and updated my SETENV.BAT file. That's all I did before the video. And the rest you watched me do in real time in the video.
I even repeated the procedure several times before recording this video, just to be *very* sure I had the right steps in the right order. That's why there's that line in the msdos-prep.bash script to delete the 'MS-DOS-main' directory if it exists, and start over by unzipping - because I had repeated this process maybe five or six times to make sure I had it down smooth, and that line made it just that much easier to start over.
If you're having problems, I'd double check the SETENV.BAT file to make sure your environment is set up correctly. Especially the LIB, INIT, and INCLUDE variables. Skip ahead to 6:02 in the video.