I actually use a few DOS programs for real work, too. I use modern spreadsheets like Google Sheets, but if it's just for me and it's pure numbers, I'll do it in AsEasyAs on DOS. (It's my favorite spreadsheet.)
How up to date is the Watcom compiler? Can it do C99 or is it too old for that? Do you know if there's a C compiler that can do up to C11 and can target DOS?
@@anon_y_mousse I believe the answer is mostly C99 but as with most C compilers for DOS they tend to also add custom extensions, in addition to the DOS stuff which usually lies outside C99 or indeed C11. I didn't see any C11 mentions so I don't expect C11 specifics to be supported. I don't see anything in C11 which would be specifically useful for a DOS C program, what C11 features do you use?
@@SirWolf404 Not much, and it can mostly be replaced with older code, things like threads and atomics for which I just used pthreads before. Of course, _Generic would be harder to replace and it would require some more configuration programs. I suppose if push comes to shove I could always just write my own and target C99 at a source level.
@@anon_y_mousse Hmm generic seems pretty cool, but with careful coding you can work around it. Threads and DOS won't really work, DOS is a single threaded OS and definitely not POSIX compliant, not even close. There are ways to get things to operate in the background like how the PRINT command hioks the idle interrupt (int 28 I think, to operate while DOS is busy waiting for the user or IO), but that would require utilizing hacks like that, nothing really documented nor standard.
@@SirWolf404 I guess if there's no pthreads for DOS then I'd have to implement something myself. Of course there is a similar mechanism in TSR's, but I do wonder, since this is in real mode, couldn't we just supercede DOS and set it up ourselves? If this requires switching to protected mode, could DOS run that way?
@@anon_y_mousse Yes, you could implement it on your own, but you won't get any support from the OS, so you will have to implement your own scheduler and whatever else you need for it. But you would also need to handle the fact that DOS is not re-entrant and that when you make a call to DOS for e.g. I/O you often can't run anything else. You really want to read the book called Undocumented DOS which explains many of these concepts. TSRs, usually lay dormant and aren't really active until a hotkey is run, or else they utilize the int 28 or similar hacks I mentioned earlier. Switching to protected mode is of course possible and a lot of programs do that by utilizing the DPMI and a DPMI server like DOS/4GW. That said, you will still need to handle concurrency in I/O etc on your own. Also in DPMI your application is going to be running in ring 3, mostly. So that is something you might need to overcome if you want to task switch, you'd probably end up with either co-operative multitasking or end up implementing your own kernel for that, and now you are no long really targeting DOS... You might as well target windows or linux at this point... In theory you could boot linux to run your application from DOS 😅 Point being there is no true multi-tasking or threads in DOS.
@@freedosproject The text graphics library of ow seems to be pretty neat indeed! I like how easy it's to just make color text in arbitrary places. Does it require an ANSI driver or does it work regardless of it?
Sure you could! I think the easiest way to do that is to move the "tree rendering" code to a function (draw_tree) and then loop to that from the main() function as frequently as you'd like.
@freedosproject If it still occurs with v1.4, I will see if I can figure out what the cause is. It happens when a floppy disk is first formated with /u in DOS 6.22/7. (No errors returned) Then format it with /u in v1.3 "Dos driver error (hex): 01" is shown after 100 percent completed is shown. If you then format a: /q, it works correctly, and then a format a: /u will complete with no errors. P5T30-B4, Award BIOS, Intel chip set. Something with this BIOS, I think.
Sure thing! I just posted the code on my GitHub. Here's a link that also includes the EXE programs. This has both the Christmas Tree and Fireplace programs: github.com/freedosproject/christmas2024/releases/tag/v2024
DOSCEMBER!!!!
Merry Christmas! I really enjoy these code videos, they are so relaxing to watch. :D
Thank you, I'm glad you enjoy them!
Merry DOSmas!!!
The end product brings back memories of ZZT and MegaZeux. Guess I'm off to download those. 🙂
Merry Christmas. Thanks for FDOS
Thanks for watching!
Inspirujące
Both programs run great on the original Compaq Portable. Merry Christmas!
메리 크리스마스!
Merry Christmas!
지금 이 시대에도 dos를 잘 사용하시는군요
멋집니다 !!!
I actually use a few DOS programs for real work, too. I use modern spreadsheets like Google Sheets, but if it's just for me and it's pure numbers, I'll do it in AsEasyAs on DOS. (It's my favorite spreadsheet.)
Great program!
Thanks!
Nice! 👍
Great video. Well explained. You’re masterful
Thank you!
Merry X-DOS
That was fantastic programming session.
Thanks Jim!
Thanks, glad you liked it! More coming in 2025 too.
Merry Christmas man!!!
I love you lots, Grandpa. Merry Christmas!
Merry XMAS!
How up to date is the Watcom compiler? Can it do C99 or is it too old for that? Do you know if there's a C compiler that can do up to C11 and can target DOS?
@@anon_y_mousse I believe the answer is mostly C99 but as with most C compilers for DOS they tend to also add custom extensions, in addition to the DOS stuff which usually lies outside C99 or indeed C11. I didn't see any C11 mentions so I don't expect C11 specifics to be supported. I don't see anything in C11 which would be specifically useful for a DOS C program, what C11 features do you use?
@@SirWolf404 Not much, and it can mostly be replaced with older code, things like threads and atomics for which I just used pthreads before. Of course, _Generic would be harder to replace and it would require some more configuration programs. I suppose if push comes to shove I could always just write my own and target C99 at a source level.
@@anon_y_mousse Hmm generic seems pretty cool, but with careful coding you can work around it. Threads and DOS won't really work, DOS is a single threaded OS and definitely not POSIX compliant, not even close. There are ways to get things to operate in the background like how the PRINT command hioks the idle interrupt (int 28 I think, to operate while DOS is busy waiting for the user or IO), but that would require utilizing hacks like that, nothing really documented nor standard.
@@SirWolf404 I guess if there's no pthreads for DOS then I'd have to implement something myself. Of course there is a similar mechanism in TSR's, but I do wonder, since this is in real mode, couldn't we just supercede DOS and set it up ourselves? If this requires switching to protected mode, could DOS run that way?
@@anon_y_mousse Yes, you could implement it on your own, but you won't get any support from the OS, so you will have to implement your own scheduler and whatever else you need for it. But you would also need to handle the fact that DOS is not re-entrant and that when you make a call to DOS for e.g. I/O you often can't run anything else. You really want to read the book called Undocumented DOS which explains many of these concepts. TSRs, usually lay dormant and aren't really active until a hotkey is run, or else they utilize the int 28 or similar hacks I mentioned earlier. Switching to protected mode is of course possible and a lot of programs do that by utilizing the DPMI and a DPMI server like DOS/4GW. That said, you will still need to handle concurrency in I/O etc on your own. Also in DPMI your application is going to be running in ring 3, mostly. So that is something you might need to overcome if you want to task switch, you'd probably end up with either co-operative multitasking or end up implementing your own kernel for that, and now you are no long really targeting DOS... You might as well target windows or linux at this point... In theory you could boot linux to run your application from DOS 😅 Point being there is no true multi-tasking or threads in DOS.
that's a good one
Thanks! And I like that it's so simple!
@@freedosproject The text graphics library of ow seems to be pretty neat indeed! I like how easy it's to just make color text in arbitrary places. Does it require an ANSI driver or does it work regardless of it?
I was going to ask why not read from /dev/urandom then I was like, oh yeah, dos.
:-)
Would be possible to animate with a loop to clear the screen and re render it , every half a second ?
Sure you could! I think the easiest way to do that is to move the "tree rendering" code to a function (draw_tree) and then loop to that from the main() function as frequently as you'd like.
I have a TekRam P233 MMX motherboard, and I am hoping v1.4 fixes the format a: or b: /u bug.
I have to look that up -- I'm not familiar with the TekRam motherboard.
@freedosproject If it still occurs with v1.4, I will see if I can figure out what the cause is. It happens when a floppy disk is first formated with /u in DOS 6.22/7. (No errors returned) Then format it with /u in v1.3 "Dos driver error (hex): 01" is shown after 100 percent completed is shown. If you then format a: /q, it works correctly, and then a format a: /u will complete with no errors. P5T30-B4, Award BIOS, Intel chip set. Something with this BIOS, I think.
Could you post a link to an executable?
Sure thing! I just posted the code on my GitHub. Here's a link that also includes the EXE programs. This has both the Christmas Tree and Fireplace programs: github.com/freedosproject/christmas2024/releases/tag/v2024
@@freedosproject This is great! Maybe I will show it to you running later.