Thursday, April 2, 2020

DOS spreadsheets - building a work plan

I love spreadsheets and the myriad things you can do with them. Spreadsheets are excellent at crunching numbers. When you're presented with a problem that requires updating numbers as you go, there's no better tool than a spreadsheet.

Let's apply spreadsheets to a staple of project management: the work plan. I like to plan ahead by three months at a time (a business quarter). I used work plans in previous organizations when I needed to plan staff time across multiple projects. And I teach work planning as part of the IT Management training program that I offer as part of my consulting practice.

The DOS spreadsheet As-Easy-As is my favorite DOS spreadsheet. So in this video, let's walk through how to create a work plan in As-Easy-As:


The concept of building a work plan is this:

1. Create a list of projects you plan to work on
These tasks should not be so small that they are individual work items, nor so large that they are "projects." For example: building a new website involves identifying the message and content, crafting the design, generate the artwork, and create the web pages. Each of those might take multiple days or a few weeks to complete, so you would list each as a task on the work plan.

Don't forget about non-project items, as well. How many meetings do you attend in a given week? Do you plan to take advantage of holidays or vacation time? I like to track those at the bottom of the work plan.
2. Build a list of weeks for the next quarter
I like to have my weeks start on a Monday. That seems to be how most people think. For example: someone might say "Let's meet the week of March 30" and most people understand that to be "anytime from Monday, March 30 to Friday, April 3." That makes for a good standard in a work plan.
3. Estimate the time per week for each task
My rule is that time should be no shorter than half a day per week. It's tempting to write down a task that you know will take an hour; maybe you can plan for that short of a time in the first week or two of a quarter, but by week ten, you can't make the estimate that precise. Enter your times in units of 0.5 (half a day in a week). Note that there are five working days in a standard work week, so your time estimates should not be above 5.0.
As you enter the time for each task in each week, keep track of the total for each week, also at the bottom of the work plan. The @SUM function will do this for you, calculating the sum of a range (the cells above it).

Once you enter your estimates, look more closely at the sum for each week. Most organizations plan for a five-day work week, so make sure your weekly totals are exactly 5.0. The need to adjust time is most obvious when you take vacation or holidays, but you'll need to adjust time for most weeks to accommodate multiple projects.

Spreadsheets do all the calculations for you, and As-Easy-As handles the work easily.

If you're interested in the As-Easy-As spreadsheet, TRIUS Inc. has released As-Easy-As 5.7 for free (gratis). You can find it on the TRIUS website: AS-EASY-AS for DOS - Free!

Tuesday, March 31, 2020

Using FreeDOS - Getting sound to work

DOS doesn't support "drivers" in the same way that other operating systems do. For example, on Windows, if you install a new sound card on your system, you usually need to install a software driver to make it work. Once you do that, all other Windows programs and games will be able to use sound.

That's because Windows and other operating systems like Linux and Mac use some level of hardware abstraction to separate the programs from the hardware. On modern systems, games talk to the sound driver and the driver talks to the sound card. With that model, it's much easier to write games without having to worry (too much) about what hardware the user is running.

But DOS predated that concept. On DOS, programs and games talked directly to the hardware. That means when you install a new game, you probably have to configure it to talk to your sound card. The most popular sound card at the time was the SoundBlaster card. And the most popular SoundBlaster model was the SoundBlaster-16. There were a few other sound card manufacturers out there, and some provided their own ways for software to send sound events to the sound card. But it was common for other sound cards to adopt compatibility with SB16.

All of this means that when you install a game on FreeDOS, you'll need to configure the sound yourself. Because FreeDOS is just DOS, and DOS programs and games talked to the sound hardware directly, we can't provide "emulation" of a sound card.

There are a few tricks to getting sound to work. Here's a quick demo using DOOM, the popular first person shooter:



Many people use a PC emulator to run FreeDOS these days. This is a very safe way to run FreeDOS, and we recommend it. To get sound to work in your DOS games, you'll need to make sure your PC emulator or virtual machine is providing a virtual sound card that DOS supports. Look for SoundBlaster-16 for a sound card, and AdLib for digital music. That's the most common configuration from the 1990s.

Once you've set up your PC emulator, you will need to know the parameters for DOS applications to communicate directly to the sound hardware. The values you need to know are: DMA, IRQ, and I/O.

Direct Memory Access (D)
Usually has a value of 1 or 5

Interrupt Request (I)
Usually has a value of 5

I/O Address (A)
Usually has an address of 0x220 or 0x240.

You can set this in a DOS environment variable called BLASTER, to help most DOS games look up the sound card values. We set a value for you as part of the default FreeDOS install, so you should see this value on your FreeDOS 1.2 or 1.3RC system:
BLASTER=A220 I5 D1 H5 P330

With that value set, most PC emulators should "just work," provided you have defined a SoundBlaster-16 or compatible sound card.

Thursday, March 26, 2020

DOS applications - As-Easy-As

DOS was king of the office, and what's more "office" than a spreadsheet? My favorite spreadsheet on DOS was the As-Easy-As spreadsheet, by TRIUS Software. As-Easy-As was a shareware program; you could download it, and try it before you bought it.

Registration for shareware programs was usually pretty expensive, typically less than $100. And when most commercial software like Lotus 1-2-3 could cost $300 to $500, depending on the application, that's a pretty good deal!

As-Easy-As provided a similar look and feel to Lotus 1-2-3. The 1-2-3 spreadsheet dominated the DOS office environment. So it was important for As-Easy-As to work just like Lotus 1-2-3, and be as easy as 1-2-3 to use. (Do you see what I did there?)


In this video demonstration, I show how to use As-Easy-As spreadsheet to calculate your grade in a class. I did this all the time when I was an undergraduate student. The spreadsheet helped me stay organized, and track my progress throughout the semester. Today, your course management software will track and report your progress for you. In the 1980s and 1990s, you had to calculate your progress yourself.

Note how As-Easy-As uses a different way to to start calculations. If you want to make a reference to another cell, you have to use notation like +A2+1 to add 1 to the value in A2. The + makes it look like a calculation, so A2 is correctly interpreted as a cell reference and not as plain text. This was common across all DOS spreadsheets at the time. Today's spreadsheets use the equal sign to denote calculations, so you would use =A2+1 instead.

Also note that As-Easy-As uses the @ sign to indicate functions. This was also common in all DOS spreadsheets. To calculate a sum over a range from B1 to B15, you enter @SUM(B1..B15). But modern spreadsheets are able to understand function names, so you do not use the @ sign today.

You can download As-Easy-As for free! Thanks to TRIUS for providing the DOS version of As-Easy-As at no cost. This is technically freeware, not open source software. You can find the download and the free activation code on the TRIUS As-Easy-As forum.

Tuesday, March 24, 2020

Navigating FreeDOS - FreeDOS for Linux users

If you've come to FreeDOS via Linux, you may be slightly confused about some of the commands in FreeDOS. In this quick guide, I'll provide a few "translations" to help Linux users quickly adapt to FreeDOS.


On Linux, you use the ls command to display a list of files in a directory. To get details of each file in the list, you use the ls -l command, where -l provides a long version of the output.

On FreeDOS, use the DIR command. That's very similar to ls -l. To get something similar to the plain ls command, give DIR a few options to put it into "bare" mode (/B) with lowercase letters (/L) using a wide display (/W). By default, DIR does not sort the output, so you'll need to instruct DIR to order the output (/O…) by grouping directories first (G) then sorting by base filename (N) and extension (E).
DIR /OGNE /B /W /L

And we can create an alias for this using the built-in FreeDOS ALIAS command:
ALIAS LS=DIR /OGNE /B /W /L

On Linux, to change to new directories and paths, you use the cd command. It's the same under FreeDOS.

On Linux, you use mkdir and rmdir to create and delete directories. These commands also exist on FreeDOS.

On Linux, to display a file, you use cat. On FreeDOS, you need to use a different command, TYPE. The usage is basically the same:
TYPE filename.txt

(Note that Linux Bash has a completely different type command.)

On Linux, you can send the output of cat into more or less to display the contents one screenful at a time. The same idea exists under FreeDOS. You can use the vertical bar as a "pipe" to different commands.
TYPE filename.txt | MORE

And you can direct output into a file using the greater-than symbol, the same as on Linux:
TYPE filename.txt > newfile.txt

I hope this helps our Linux users get started on FreeDOS.

Thursday, March 19, 2020

Comments are turned off

Sorry, but I've had to turn off comments for the FreeDOS blog. Every day, I spend a ton of time just deleting spam comments.

If you'd like to contribute to the conversation about FreeDOS, I encourage you to subscribe to our FreeDOS email lists, or join us on Facebook.

Using FreeDOS - FDIMPLES

So you've installed FreeDOS, but you don't see the program that you need. How can you install programs on FreeDOS?

There are actually two ways to install programs on FreeDOS.

1. Install it manually

This is usually pretty straightforward, because unlike on some other operating systems, DOS programs are statically linked. That means you can just install that program and everything should be fine - in almost all cases. There are very few instances where one program depends on another. But for most programs and games, you can just install it and you're off.

Once you find the program and download it, you usually just need to extract the archive. Most programs are distributed as zip files, so you just need to unzip the program. Look for the EXE or COM program inside that.

Larger DOS programs and many games require an "Install" process. Look for an INSTALL.EXE or a SETUP.EXE program to run. This should be a simple process of following the prompts.

2. Install it as a package

FreeDOS includes lots of programs and games in the FreeDOS distribution. Each program is contained in a package. Starting with FreeDOS 1.2, we include other "extras" on the install CD. These extras are not installed as part of the regular FreeDOS installation—otherwise, that would be way too big. Instead, you need to install these programs after installing FreeDOS.

FreeDOS 1.2 (and the upcoming FreeDOS 1.3) uses a package manager program called FreeDOS Installer—My Package List Editor Software. Or FDIMPLES for short.

And here's how to use FDIMPLES to install these extra packages:

Tuesday, March 17, 2020

DOS programming - ECHO and TYPE

If you're new to programming, this how-to video is for you. Let's explore how to write some simple FreeDOS utilities, using C.

I think the easiest programs to demonstrate are ECHO and TYPE.


In the video, I walk through how to write a simple ECHO command, which is a great first example when you're learning to write C prorgams. The ECHO command just prints the command line arguments it was given (it echoes them back to the user). In FreeDOS, ECHO is an internal command, so it's part of the COMMAND.COM shell. But for this programming example, we'll write our own version of ECHO as an external command (a standalone EXE or COM program).

Every C program starts with a few lines to include parts of the C library:
#include <stdio.h>
#include <stdlib.h>

The stdio.h file contains definitions for functions that do input or output (called "I/O"). The stdlib.h file contains definitions for other parts of the C standard library of functions (hence "lib" is short for "library").

Now let's write a program to perform the ECHO command. In C, the main part of the program is the main function.
#include <stdio.h>
#include <stdlib.h>

int
main (int argc, char **argv)
{
  int i;
  
  for (i = 1; i < argc; i++)
  {

    printf ("%s ", argv[i]);
  }
  
  putchar ('\n');
  
  exit (0);
}

A few things in that example:

The command line is represented as argc and argv. The argc value is the argument count. This tells the program how many arguments came to the program. And argv is the argument vector that contains a list of strings on the command line. A string would be defined as char *, because char * defines a pointer to a string value. But since this is a list of strings, you need another * to indicate the pointer to the list. That's why you get char ** instead of just char *. Some older programs might instead use char *argv[].

The for loop runs through all arguments starting at position 1. That's because the "0th" entry in argv is actually the program's name. We want to print all arguments after the program's name, so we start at position 1.

The i++ is shorthand to increment by 1. You could have instead written i=i+1 and that would have been fine here. But I learned it as i++, so that's how I write it. On a similar note, i-- is similar to i=i-1. If you use the ++ and -- notation, note that ++i and i++ are subtly different.

The printf() function is a formatted print statement. The quoted string as its first argument is the format that printf() uses. Here, %s means to print a string. You can also use %d to print an integer (decimal, as opposed to some other number format like binary).

End the program with exit() or return(). You can use return() to exit the main() function, but I learned C in an earlier standard, so I prefer to exit the program using exit(). In the main() function, both do the same thing.