Write your own math program for FreeDOS

preview_player
Показать описание
With a little programming, you can create your own tools to expand the command line. Let's see how to write your own math program for FreeDOS, to do basic arithmetic operations.

*Apologies for the sound issues on this one. I recorded it immediately after last week's video, and I didn't realize my sound setup was causing issues. I'll fix it for the next video.

Visit our website

Join us on Facebook

Follow us on Mastodon

Consider supporting me on Patreon

And don't forget to Like and Subscribe!

Standard comment rules apply.
Рекомендации по теме
Комментарии
Автор

It's unfortunate there are audio issues (brief moments where audio gets cut off) but this video was very informative. Thank you. I'm tempted to write my own.

sharoyveduchi
Автор

It's always a happy day when it starts with a retro programming session, it makes me think simpler and relaxes my brain muscles.
Thanks Jim,

ahmad-murery
Автор

❤Freedos The best Power
System❤Brazil❤

Flora-nggt
Автор

Even when atof does transform a string into the value 0 dot 0 you should check if the string given is a number with isdigit from ctype header.

OpenGLever
Автор

I'm wondering if the data type on a separate line before function name is just old convention or if this compiler needs that?

joeshmoe
Автор

Why don't you use the *default* clause inside the switch statement for the unrecongnized operation? I would assume, that the compiler can optimize it better, when you use a default clause, instead of writing the default message outside of the switch statement.

OpenGLever
Автор

Hey i wrote this program to practice c the program tells a person how many boxes he can buy depending how much money the person has what do you think is there anything that can make this code better?

#define BOX 6
Int main() {
double dollars;
double cost;

printf("a box is $6 how many dollars do you have? ");
scanf("%lf", dollars);

cost = dollars / BOX;
printf("you can buy %lf boxes", cost);

return 0;
}

DV-yexb
Автор

Someday I'll buckle down and learn C++.

ernietech-
Автор

Instead of returning 0 for invalid operations and division by zero, wouldn't it be more appropriate to return NaN?

SlideRSB
Автор

Очень хороший бесплатный компилятор - Free Pascal, имеет мощную IDE. Зачем этот C? Только если вы предпочитаете этот язык?

davemurey
Автор

If I ever get rich, I'm giving you 500K to make a modern DOS 64-bit, VESA graphics, Gigs of RAM, built in networking, no extenders, etc. I know, i know, here I am again. I'm telling you, there's a huge hole in the market for a debloated, stable, simple OS that works like DOS. Imagine banking systems, military, etc. Do they want to use windows? Probably not. Forced updates, instability, copious background processes constantly accessing the disk, so a power outage could result in corruption. Then there's Linux/Unix which is too complex and convoluted. Seeing hi-res text mode apps would be beautiful. It'd be like what we thought the future would look like in the 80s.
I wish I was a smarter programmer, cause I would make it. I was stuck with real mode back when I tried to make my own OS. If you think it's a decent idea, you could let other programming friends know.

joeshmoe