Back to basics: Exploring MS-DOS and Turbo Pascal
ฝัง
- เผยแพร่เมื่อ 10 ก.ย. 2024
- As part of #doscember I have been going back the memory lane of my own use of MS-DOS and Turbo Pascal in the beginning of the 90's. Setting up a 20 years old PC and installing the necessary software (from real, 30 years old floppy's) to get it up and running as a Turbo Pascal development machine.
I also explore some of my own programs from back in the days. And of course, a little 90's gaming as well.
#doscember official playlist: • #DOScember 2020
#doscember Participating Channels:
8-Bit Show And Tell: / 8bitshowandtell
Adrian's Digital Basement: / adriansdigitalbasement
ctrl-alt-rees: / ctrlaltrees
DaveJustDave: / mrdavejustdave
Jan Beta: / janbeta
Josh Malone: / joshmalone_48kram
LGR: / lazygamereviews
MindFlareRetro: / mindflareretro
Mr Lurch's Things: / mrlurchsthings
Noel's Retro Lab: / noelsretrolab
Ovesen.net: / ovesennet
RetroBytes: / retrobytesuk
RetroSpector78: / retrospector78
RMC: / rmcretro
RoseTintedSpectrum: / rosetintedspectrum
Tech Tangents: / akbkuku
The 8-Bit Guy: / adric22
TheRetroChannel: / theretrochannel
My friend KOJRO's channel: / @kojrori
I am using a Prusa 3D-printer, find one here: shop.prusa3d.co...
I am using a DJI Osmo Pocket camera. Find it on Amazon: amzn.to/32WiAAy
I am filming with an iPhone 12 Pro max. Find it on Amazon: amzn.to/3pz5jY6
Note: Some links are affiliate links that helps support my channel.
Buy me a coffee or a beer via PayPal here: paypal.me/Tomm...
Web: ovesen.net
Facebook: / ovesen.net
E-mail: support@ovesen.net
Twitter: ovesen
Instagram: ovesennet
Turbo Pascal was great. One of the best IDEs ever created in my opinion. You could do almost anything with it, and do it fast. I did a point of sale client using Turbo Pascal in a weekend in the 90's. Later I migrated everything to Delphi until the "web application" era came and turned everything as painful and miserable as it could be.
It's still a pretty accessible development environment for DOS even now - compared to something like Programmer's Workbench that came with Microsoft C, the Borland IDE was miles ahead.. Turbo Pascal in general is great - Borland wrote great documentation for it which is easy to grab online, it has a very decent runtime library, a text-based windowing library, supports features like inline assembly, and at the time was very cheap - less than $100 when other language packages easily cost 5-10 times as much. On top of that, it compiles blazing fast in general, and even compiles reasonably quickly on 8088/80286 CPUs, My last two DOS games were both written using Turbo Pascal, and the only reason I moved away from it for my current one is that I'm targeting protected mode (TP only supports real mode targets), and Free Pascal treats DOS like a second class citizen - there's usually something or other broken the few times I've checked it out over the years.
@@Damaniel3 Re: "Free Pascal treats DOS like a second class citizen" - I'm a Free Pascal developer and I'm the author of the 16-bit i8086 MS-DOS and Win16 port. We don't treat DOS as a second class citizen. It is just difficult to maintain, when there are only two people contributing. We need more contributors, so if you like Pascal and you like DOS, please consider spending some time writing a patch the next time you encounter a bug, instead of staying with Turbo Pascal. Thanks.
@@Damaniel3 I used Clarion for DOS for many years, and for building LOB apps like that, it killed anything on the market. But it was much less fun than writing games and utilities in Turbo Pascal!
I agree with you 100%!! All the "modern" tool and frameworks require a lot of maintenance, updates and your program sbecome obsolete in 6 months. What used to be called a "programmer" are today a " developer". ;-) Web developer, PHP developer, etc..
Totally agree !!! I still program in Pascal !!!
Turbo Pascal was one of the first languages I learned as a nine-year-old (the others were Turbo Basic and Turbo C) back in the 90's. Thank you for the nostalgia trip.
Your welcome. I learned it at engineering college in 1990.
Ahh, TurboPascal flashback. Still remember when I discovered that you could use inline assembly and prefix commands with db $66 to execute 32-bit instructions :)
I had Turbo Pascal, Borland Pascal 7.0 - 14 floppies if I remember correctly - and Turbo Basic - just 1floppy. Loved them all. The people at Borland really knew what they were doing with such talented creators of these IDEs! I ran DR DOS version 6 and 7 after MS-DOS 4 or 5.
Borland Pascal - That's how I learned programming by just using it's documentation in the IDE and some books from the local library.
You only had BBS's and the Internet was far far away :D Man, creating 'doors' and 'extensions' (external games/apps) for Remote Access (BBS software), so many great memories!
Have to admit, I do rather like the look of that Compaq keyboard too.
I used to work in Tech Support for PC World which was a Major computer retailer in Britain, certainly in the later 90's and 2000's and I do recall that there was a certain level of problems with compaq keyboards and if I recall correctly, they system we had to use to book a replacement for them was a bit of a pain in the ... rumpus ... 😀
That said, they did have some very fun designs and extra function buttons that even today wouldn''t be sniffed at! Although backmodding one with mechanical keys would be a nice project!
Turbo Pascal 5 what was made me not hate programming any more in 1990. Before that, we studied Fortran 77 in the Uni and I wasn't in love at all :)))
Hehe, good.
First used Turbo Pascal in school some time in the 80s. They had 8 bit MSX2 machines made by Philips. We had to boot into MSX DOS using the floppy drive and then start TP
I remember TP very fondly! I wrote some verry small stuff in GWBASIC on an 8086, then in 1994 as a senior in high school, I took a programming course that used Turbo Pascal. There I wrote my first real program, which was a graphical DOS based Othello program where the computer would play against you. Everyone thought I was a genius! LOL
Turbo Pascal. I got so much work done with it. First on a CP/M board in an Apple II. Hejlsberg is a hero.
Thanks for this video Tommy. It reminded me how difficult it was to do simple things back then!
You're welcome!
But all the steps were so much more fun than the easy stuff today!
Sweet the first programming language I used in college well after basic. Was easy to learn Reiner coding an etch a sketch program in pascal
I watch most of the DOScember in summer
Turbo Pascal 3 was a revolutionary product, it was a capable compiler and very fast, but a pretty rudimentary development environment. I was first running Turbo Pascal 3 on my original IBM PC with 2 floppy disks. Then Turbo Pascal 4 came out which was a more advanced development environment including a pretty good editor and a debugger. You could write very capable programs with it. Once Turbo Pascal went into Windows it was very capable for developing Windows apps, even compared to tools and compilers available today. I'm still running 32 bit Windows 10 which can run all of the old versions of Turbo Pascal, however I do my programming in a couple of descendents of Turbo Pascal- Delphi and Lazarus. You said "20 year old machine"- my machine is 14 years old, quad core processor overclocked to 3.8GHz, and upgraded to SSD drives and Windows 10.
Thanks for the comment. We still maintain software written i Delphi at my company where I work. However, now most is written i .NET / C#
wow, that's a blast from the past. We used Pascal at College, bit of a jump going from BBC / Acorn Basic to Pascal! Love the video's, so keep them coming!
Thanks!
FYI, FreeDOS is still actively maintained. v1.3 was released last year I think.
Right, and it has some useful drivers etc that can act as drop-in improvements for MS-DOS. The FreeDOS project even got an active TH-cam channel😉
I know I'm a super nerd, but I love the fact that you provide enough detail in your videos that I could replicate your steps if I wanted to. This raises your material from just entertainment to educational. I learned Pascal on my TI99 4/a in 1981. It was a Pascal called UCSD Pascal, developed by University of California, San Diego. SInce TI basic was a joke, and there was no machine language available either, this was really the only programming language I could use. Ironically I am working on a TI retrospective now, and was just playing around with that today.
Thanks for commenting. I have a TI99/4a. Maybe I will check that out
I started my career in Turbo Pascal (very briefly, then we moved to Borland Pascal with Turbo Vision). When Delphi 1 was released, we ported all our DOS code to Windows. Over the course of the following 25 odd years I stayed with Delphi all the way through to XE5. Then I moved to SQL Server and I just do SQL Development now. I still use Delphi from time to time, but favour C# now as my tool of choice.
Thanks for sharing. I use C# at work, but we still have some Delphi-developers there.
Ah the memories. Very similar story here Tommy, started my Computer Science course in '92. The first language we covered was Turbo Pascal 5.5 iirc. Good times. I wonder if I still have a floppy with some of those assignments on 🤔
It'a good to see TP running again!
Good video, all the best in 2023.
Happy holidays! I added this to a "Programming #DOScember" playlist - please let me know if you see others that I missed!
th-cam.com/play/PL2O6RH1Isy65nD8P400NpobCHsWB7Do7T.html
Thanks a lot :)
You realize you could have done most of the Turbo Pascal demo using Free Pascal in either Windows or Linux. After installing Lazarus, just type "fp" in a command prompt. Oh even in dos, I think you could have typed "tp" and weren't required to type it all out.
Terry
I taught myself Turbo Pascal when I was 15, just by using the in-built help and the examples. I didn't even have the manual that normally shipped with it. That was more fun than playing games most of the time.
The built in contextual help in Turbo IDEs was soooo good, true breakthrough for programming productivity!
I think the best thing about this DOScember theme is that we get to discover Retro-TH-camrs which we would be otherwise completely oblivious to even existed. Yeah, you've just gotten yourself yet another subscriber.
Now, I have done a mind-numbingly lot of Pascal programming, beginning with Kick Pascal on my Amiga 500 in the late '80s, Turbo Pascal and Borland Pascal up through the '90s, ending with several versions of Delphi up through the 2000s, before eventually moving onto C++ and C# like everybody else. Since far most of my coding was work-related and the company where I worked were for some reason clinging onto MS-DOS and DOS-related programs well into the WindowsXP years, with claws and teeth like a mad dog to its favorite toy.
I actually encountered the runtime error 200 in Turbo and Borland Pascal from pretty early on. And I also got so tired of having to use TPPatch that I eventually incorporated it into the CRT Unit, literally curing it for good. Whereas the original was called "CRT" and I wanted it to be easy to implement, I simply named my replacement "CRTUNIT". So all I had to do to fix my source-code would be to change the name from CRT to CRTUNIT in the USES statement at the very top.
I have just dug it out of one of my old backups, zipped it, and uploaded it to my website. So here is a little X-mas present from Denmark 😉
www.zhixalom.com/files/crtunit.zip
If you take a closer peek at the CRTUNIT.PAS file, you will notice that all I did was to replace the Delay procedure with the assembler-code from the TPPatch documentation.
Great comment! Thanks. I was thinking about finding a patched CRT unit.
@@Arcticretro Here are some other tips: if you use the FDISK command to create first 2 extra "Primary" partitions, so you have 3 in total), then 1 "Extended" and then more "Logical" partitions inside the extended one (I can't remember how many it can hold, I think it might be 4 per extended partition). Each primary and logical partition being 2GB... granted you do end up with a lot of drive letters, but that is one way of utilizing more of your hard drive space in MSDOS v6.22. You can boot from the primary partitions, not from the extended or logical, but those you can have a lot more of.
I totally get why you would want to show the installation of MSDOS v6.22 in a DOScember video. But as I am sure you already know, there really was no need to with your machine.
Because since Windows 95/98/ME basically all run on the same core, which actually runs on top of MSDOS just like Windows 3.x. Microsoft just increasingly tried to hide it with each version. But you could have simply disabled booting straight to GUI in the MSDOS.SYS file.
Now, in MSDOS up to and including v6.22, MSDOS.SYS is a binary file. But in Windows 95/98/ME it became a text-script-file just like CONFIG.SYS and AUTOEXEC.BAT. It is by default still protected by the "system", "hidden" and "read-only" attributes just like its predecessor, which makes you unable to directly edit it. But that is easily fixed with a simple "attrib" command from the DOS-prompt inside Windows:
ATTRIB -H -S -R C:\MSDOS.SYS
Now you should be able to "EDIT C:\MSDOS.SYS" or just use Notepad if you'd like. Then all you need to do is change the "BootGUI" setting and add a "Logo" setting to prevent the Windows boot-screen from overlaying and hiding the MSDOS boot up text-screen. It should look like this:
BootGUI=0
Logo=0
I always reapply the attributes with "ATTRIB +H +S +R C:\MSDOS.SYS" afterward, but I am not sure that it is actually needed.
This lets you use the MSDOS v8.0 of WindowsME (or v7.0 of 95/98) exactly as if it was MSDOS v6.22 and getting into Windows is just a matter of starting "win.com" like in Windows 3.x... and most importantly, this way your partitions are not limited to only 2 GB.
I have done this with my own RetroPC although it is running Windows98 SE, as I am not at all fond of WindowsME. Granted I have "stolen" MemMaker, QBasic, and some of the other commands from MSDOS v6.22 which are not present in MSDOS v7.x... and have set up a CONFIG.SYS boot-menu to easily select booting straight to Windows or DOS with various different memory settings... one of them including QEMM9 if I recall correctly.
Oh yeah, it is exceedingly important that you do NOT use any defragmentation or filesystem repair software meant for v6.2x (this includes CHKDSK) as they are incompatible with the Windows95/98/ME long filenames system, strip them from the FAT32 tables, and literally destroy your installation in the process.
Here is some more info on the MSDOS.SYS of Windows 95/98/ME.
www.pchell.com/software/msdos-sys.shtml
Yeah, I know - some of my friends used to call me "the head of the department for useless information"... and then I suppose that got old, as well 😆
@@Zhixalom Wow that was a lot of good info. Thanks. Yes I am aware that DOS lived on in Windows up until Me, but I still wanted to install 6.22 for a more authentic feeling:)
@@Arcticretro You are quite right 👍
I just remembered that I made a quick video of my RetroPC back in 2017 right after I had built and installed it up. I only had a horrible GoPro-clone fish-eye style camera at the time, so it really is nothing fancy. The RetroPC has evolved a bit since, with a new cabinet and a 1.2 MB 5¼" floppy drive (which I have yet to get working). But at the core, it is basically the same as the one in the video.
th-cam.com/video/KubDXk14fP4/w-d-xo.html
Thank you for sharing this! I was just messing with DOS not long ago. Its amazing how much I remember, and have forgotten..... CD, rd, dir, etc.
This brings back memories. I started with polypascal and later turbo Pascal. Later Borland Pascal and Delphi. Now I sometimes use Free Pascal and Lazarus, if I have to make something fast.
In 1990 i sold my first program. A communication program for a fine scale and report creation. Was made in TP5 I think.
Wooh... Haven't seen Turbo Pascal since c++ class in school! :D
That MIDEMO.EXE is what crack the memory bottle for me. Got turned into the Computer world from my childhood's dreams of becoming Pilot because of that DEMO in one of my friend. And here I am 28 years later, trying to learn another Flutter coding. :)
Somewhere you can find a patched copy of the CRT TPU file, then you can just write your code in the IDE and not get the issue.
Yes, I have it - done by one Pedt Scragg in August 1999. Seems for all versions 5.0 through 8.0 complete with instructions. If anybody wants it reply here and I'll put it on dropbox.
@@EssArrB I'd be very much interested
Fantastic video. Thank you.
Glad you enjoyed it!
Brings back memories :-)
Ah, Turbo Pascal! TP 6.0 was a great IDE/Language. Much better than just Standard Pascal.
The first time I used Turbo Pascal was in high school on an 5150, 5160, or 5170 running PC-DOS 3.31. Complete with green monochrome monitors.
Hi - Nice Video for Doscember
Very similar background, i completed accounting studies and as computers were popular and i had a C64 and amiga and was about to splurge on a PC 386 clone ( yes my parents believed i was crazy 3 computers everyone else has none in the extended family in 1986
So IT studies, system analasys and design, basic , cobal and pascal
Now turbo pascal 5 was released in 1988, but not when i done the cource, we were using free copies ( university copies for study ) or turbo 4 - which was fine
However towards the end of that year, one of the rich kids showed us version 5 and wow we all loved it.
Learnt to use object and modules better and in the following year some of us kept in touch and 5.5 was release - you could include assembler code - any external units we had made did not work, we rewrote some from scratch until some one said "hey the manual says just recompile the orignal code with the newer 5.5 version it will work 95% of the time then follow the error messages" once again i learnt RTFM but no one is going to read over 300 pages ( yes same mistake with delphi )
Ok - with the power of BBS bulletin boards and the blue wave mail reader i came across the technojocks turbo pascal tools - if you dont have it have a search , if you cant find it let me know and i will find it, i have many home burnt cd's but a lot of the cheap branded ones that are fault due to the cd rot or the dye melting. these tools are great much of the prettyness and flashiness is done as external modules that you just call and pass parameters, also things like reading bios and hardware information, auto calendars, conversion utilities eg litres to gallons, miles to whatever, nested submenus, billboard style scrolling in dos ( just pick a line in dos 1 to 25 and star and end characters, back fill dos with ansii characters, vga resolution and basically i think what was called stroked fonts, read pcx or gif or bmp files and display on screen in a window, mouse directory trees or select and load files as input or output
After basic / cobal / pascal i actually done visual basic and ended up hating every version of C C++ as by then it was frustrating it was similar but different and my brain would do a pascal thing and it would spit errors in compiling and it would look correct because i recognized it as accurate , but not accurate for that enviroment
Basic - no brainer , line basic is so easy
Quick basic / Turbo basic - same but more structured
Cobal - great for readability and structure, your declaration and structure types all laid out, output reports are beautifull
Turbo pascal - all of the above together, compiles fast created tiny exe's, it was so good at one stage i was given new projects and scribble diagrams and asked to make TP5 mock ups of screens using the TTT - technojocks modules of how different layouts would appear and present, screen / field inputs / sample reports. Then make runable demos that really just read a text file or binary file and some simple rearrangements of data or calculations so that management or users can press load file, do this process or run this task, save to floppy or file, send to printer
Re the div by 200 error, if you cant patch a existing exe ( and of cource you back up the original first ) what you can do is slow down the PC, there are programs like goslow / atslow / moslow i may have spelt some wrong, but they all create wait states between processor clicks effectively slow down a pc by x percsent , so it would be goslow 10 or go slow 90 , it would slow down 10% or slow down to 90% of max - same reason you can play cga frogger in dosbox, in 3 seconds he is dead and game over and you have not touched a key
Regards
George
Thanks for that story and comments :)
Ooh an IBM Deathstar drive.
Yes!! Turbo Pascal
very cool! I lost interest in computers after pc xt and didn't come back until win98 pentium 2 450 (also a compaq) so it's always interesting to see the stuff I missed.
great video! i would like to see more pc gaming as well...doom was and is great!!
Try setting the execution cap to 20% or somewhere around there for a Pentium. FreePascal is compatible with TP7 without the speed issues.
Yes I know. But this was a trip back the memory lane, and I had to use my own disks with the original version I used :)
Loved using TP and Cobol
🤯🤯🤯 WOW a Compaq PC super cool
Fun video! Thanks!
Glad you enjoyed it!
I remember those Presarios. We sold a lot of them at Best Buy. One shipment came in with a batch of bad hard drives. That was a fun month.
Programs fail to initialize as the System unit measures the speed of the CPU to initialize a variable used by delay.
TP7? Wow... When I first used TPx, I used TP2. Not my first language by any means, but it was interesting. WME - ugh!!! Used the MS Pascal compiler. I remember there was a QuickPascal and QuickC. Those diskettes probably should be imaged and stored some other media (with backups).
#loveit
win really my first time :)
I was considering relearning Pascal which I was taught in school, but never really used. I do have Turbo Pascal for DOS and some books on it. But I decided to learn LISP instead because it was used for early forms of artificial intelligence. It seems there were versions of LISP for MS-DOS but I'm studying Common LISP, GNU CLISP.
LISP is fun. But Scheme has continuations www.codecodex.com/wiki/Continuations . ;)
Now, I am use Free Pascal and Lazarus
$20 a good deal, currently it needs $100+
Ah Turbo Pascal...that takes me back. :)
I just received the computer I used ages ago. An IBM Aptiva Pentium 166 with 128 MB of RAM. Nice.
If you are interested in Delphi then maybe Lazarus is something to look at. Lazarus is an open source clone of Delphi. It closely resembles Delphi version 7 and its multi platform.
I didn't know TP became Delphi. I started out programming in Delphi and Visual Basic 4 on PC. After BASIC on the C64. Now I work mostly with C# and .NET like you for my day job, but also C for embedded programming.
Ho yes www.theregister.com/2016/05/20/verity_sons_of_khan_witch_of_wookey/ .
Kjempe kul pc for retro spilling os skaping med eks VB6.0 :D
jeg kjenner igjen sound-blaster live hehe, kjempe godt lydkort for windows og dos lyder/Spilling.
hva er skjermkortet orginalt? hvis ikke så er 3Dblaster(Vodoo2) eller Vodoo3 brae kort eller GForce2 :D kan tenkes det som er der er bra også :D
jeg så specs så er det maks 768mb ram max så 256 eller 512 så har du bra rask system men kansje lurt med 256 eller bare 128 for eldre os`er :D
Really cool setup for retro gaming and developing like in VB6.0 etc :D
DOSBox with Turbo Pascal 7 in a Pakegage for win10.
I was hoping for a Turbo Pascal tutorial to be honest :P
Maybe later:)
I have that Compaq tower, it was my ex-wife's and have been using that as my pfsense firewall for over a decade lol
Great video, thanks!
I have a keyboard just like that one, but with US-en layout. Unfortunately, it stopped working this August.
You can fix it
@@Arcticretro I hope so, but it could be the controller chip itself. Did not have time to investigate, but after a few failures and disconnects, it entirely stopped being detected.
Does anyone ever made an application with Turbo Pascal 7 that uses dBase files.??
Not that I know :)
great content, but last night i gave up after the 5th advert... pity
😂 that's too modern to me. I used Turbo-Pascal 3.2 !
@ovesen.net - there were a bit too many publicity breaks ;)
Sorry, TH-cam dictates it
@@Arcticretro you can select what kind of publicity you allow and where
Whenever I see, saw source in pascal that included every alphabet and number as variables, I could not help but wonder if the programmer was naïve, or just plain lazy.
Wow! My parents bought that exact same PC, but with a 17" CRT... Hehe... and never touched it.
🇨🇦🐧
FYI, your video has 10 "commercial" breaks 😩
This PC was actually almost unused. It came from someone who got it from their work as a home-computer, but they never used it.
I aslo cheated with Turbo Pascal and Delphi in th e 90s, but I wasnt very good so I didnt become a programmer..
The original Turbo Pacal ran on CP/M - you'll go to hell for your sin! (I'm just joking ! - but Turbo Pascal ran originally on CP/M)
Hehe. I know. But I used it on MSDOS back in the day. I learnt it at engineering collage back in 1990
@@Arcticretro I just remembered: so did I. Before that I used it on an Apple II+ with CP/M card.
Ну и что сейчас на MS-DOS можно сделать? Это возврат к пещере и мамонтам!
MS DOS is actually a very capable operating system, considering what hardware was available in those days. :) And "programmers" were real programmers. LOL not a "web app developer" of today. : ;0/
I agree! I started my developer career in MS-DOS using Turbo Pascal and C
No bueno.