Quantcast
Channel: TechNet Blogs
Viewing all articles
Browse latest Browse all 34890

Open sourcing SuperDir, a file manager for CP/M written in the 1980s

$
0
0

Microsoft has open sourced the 1990s File Manager for Windows 3.0 this week. You can check it out at https://github.com/Microsoft/winfile/

So I went even further and open sourced my 1980s File Manager for the CP/M OS written in Turbo Pascal, which a called SuperDir: https://github.com/Jose-Barreto/SuperDir

Back then, the OS had only 6 resident commands: DIR, ERA, REN, TYPE, SAVE and USER. Everything else was done through utilities. You can read more about it at this blog post: The good old days of CP/M 2.2.

The SuperDir file manager has a total of 10 functions:

  • Select drive
  • Show file
  • Print file
  • Rename file
  • Delete file
  • Undelete file
  • Copy file
  • Mark file read-only/read-write
  • Delete selected files
  • Copy selected files.

Note that reading the directory was done by actually reading the 128-byte disk sectors at the beginning of the disk and figuring out the 32-byte data structure describing each file. Names and extensions were fixed at 8.3 characters at the time. Also, there were no graphics in this system, so this was all done with standard ASCII characters on a 24x80 screen.

I'm not particularly proud of the pre-allocated arrays for storing the data. My sort function was also pretty lame. But hey, I wrote this in the 1980 when I was only starting to learn programming...

I took the time to add some comments in English, since the original had variables, function names and messages all in Portuguese. Now all I need is Turbo Pascal 2.0 compiler...


Viewing all articles
Browse latest Browse all 34890

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>