Installing TurboC++ on FreeDOS

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
someone asked me online if it's possible to install other dos applications without using FD impulse like can you install Borland turbo C and the answer is yeah of course you can free s is just dos so you can install any dos application the usual dos way you know FD impulse helps you to install the packages that we include on the free Dash distribution but you can install any regular dos application by unzipping it or running its installer and in fact here I've grabbed the Borland turbo C compiler and Borland released that for free you know slash Gratis Once Upon a Time in their Museum websites that's the free version I have here I've unzipped the installer to my temp directory and into a TC subdirectory and if you run that installer and so there's the installer hit enter to continue you'll notice it's actually expecting to install from a floppy uh you know in some software installers made that assumption because that's probably how you got the software so in this case uh I I want to install it from D but I I want it once to install from a so let's go ahead and just hit Escape here to cancel and let's instead use the SW subst command and we're going to tell it that uh a the floppy it should actually be addressed at the D colon temp uh Slash TC directory and now if I go back to the root of ID just to show that it's not going to be pulling from my current directory and I go to the a drive well there it is there's my installer so now I can go ahead and install and we'll hit enter to install and yes I'm going to go ahead and use the a drive as my source and so I'll hit enter on that and I'll just tell it to install into the the DTC uh drive just because I happen to have more room there so we'll do d d t c and that'll change the paths for everything underneath there we'll just go ahead and install everything so I'll hit F9 to install and it'll take a little bit but it'll install everything from the uh the a drive which is where I grab extracted the the installer and it's going to install it under the D drive on my virtual machine under the TC directory and so we'll go ahead and let it finish up so installing is pretty easy and when it's done it's going to give us this note that it's installed in our system and and but we're going to need to update some things so for example we need to make sure that files equals 20 is in the config sys and that the path to the compiler which is now DTC bin is in our path and so we can just hit any key to continue out of that and it's going to remind us about the tour because I happen to install the tour here so I had any key to get out of that and now I am back at the uh the a drive so let's go back to the D drive and verify that yes indeed there's my TC directory so I'll go into TC now I wanted I wanted to make sure that we had the compiler in the path and so I'll just do a path instruction that grabs the current value of path that's the percent path percent will expand to the current value of path and I'll do a semicolon and then I'll do the current drive so it's D and then and that was TC and then bin and so let's go ahead and compile some sample programs that come with turbo C just to show that you know everything works and so we'll go into the examples uh directory and it's a pretty big directory here so I'll just kind of do a wide directory and so you can see we got a lot of different sample files I'm going to do just a couple of simple programs just to show that it works you can explore this on your own so for example they've got a hello world program in here as every compiler should so we'll do type on hello.c and that's a very short file that's just going to print out hello world and so if I do TCC on Hello dot C it's now compiled a hello program and so we'll do a directory wide on Hello dot star and sure enough there it is there's my hello.exe so we'll just run hello and it says hello world so there you go so that's uh that that's one program now another one here is a a program called game and game.c is just going to simulate a a baseball game with by generating some random scores on a scoreboard and so let's go ahead and run TCC on game dot C and then there it is so we'll just run game and there we go it simulates some scores between the Dodgers and the Giants and every time you run that by the way you will get a different scoreboard so I'll run game one more time you can see that we get a different scoreboard so if you want to see how to do random numbers that's an example how to do random numbers uh and then uh there's another one in here for example solar solar um yep and so we only have the one file so we'll just run TCC on solar.c and now we can run solar and this allows you to to see an array of structures and so here is just printing out two entries Mercury and Venus now one problem that I had is that the TC editor is really slow uh so I'll just run TC as an example and so there's there's the turbo C editor uh and so we'll say okay and if I just type the words I'm just going to type the words hello world and I've typed it now and we're now going to wait for it to finish the the reading everything from the buffer clearly I've mistyped it because I missed the W but you can see how slow this is um I haven't really looked into this problem so I don't know if that's an issue with the virtual machine or maybe there's something else but but that's okay we can actually uh use any editor that we like to edit programs and so we'll just do uh go into the menu here and we'll quit and I don't need to save that so we can actually run for example C uh and then apps and then fed and then the program in there called fed and we'll just do a simple program called args.c which doesn't exist yet so we'll just do an include standard io.h and this is very similar to a hello world I'm going to be doing a program that will do an INT Main and then int rxc care arc V and all I'm going to do here is I'm going to run through the argument list and print those out back to the user so we'll do an integer variable called I and then we're going to do a for Loop where I starts at 0 which will in the argument Vector will be the name of the program itself and as long as I is less than ARG C then at the end of every Loop we'll increment I by One and we'll just do a very simple print F and we'll print out the now the value of I and so that's a decimal value and then we'll also print out the string itself and then do a new line and now we need to print out I and then ARG V I and then once we've done that we can finish the loop and we can return back to the operating system so I'm just doing this program just to demonstrate that yeah absolutely you can write your own programs using edit any editor that you like and compile them using turbo C so I'll go ahead and save and quit and now I have an args program and then I can now run TCC on args.c and there it is I've got args and I can just say hello world and so there it is there's a sample program that we were able to write ourselves we don't have to use the turbo C editor we can use any editor that we like and use this compiler if that's what you want to do so what do you think about this video let me know in the comments below uh before I go I have to thank everybody who supports me on patreon you really do make this channel happen I know I said it every time but you really do make a huge difference to me some of you are sponsoring me at a higher level and I want to thank you especially here for that visit our website at freedos.org join us on Facebook follow us on Mastodon and consider supporting me on patreon thank you
Info
Channel: FreeDOS
Views: 7,250
Rating: undefined out of 5
Keywords: freedos, open source
Id: 2W6fHooKRB0
Channel Id: undefined
Length: 9min 13sec (553 seconds)
Published: Sun Aug 27 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.