Classic Computer Magazine Archive COMPUTE! ISSUE 133 / SEPTEMBER 1991 / PAGE 80

Disk Update - End Macros the Right Way
by Richard C. Leinecker

We've streamlined COMPUTE's Menu Operating System to make it simpler to use. In the past, we've offered the option of running some of the programs directly from the menu. The menu program decompresses the files (or loads them straight off the disk if it's a 3 1/2-inch disk) and then executes the code. MS-DOS has some inherent problems, however, that make this impractical in most cases, so we've decided to eliminate this feature--at least for now.

If you try to run memory-resident programs, such as SCROLOCK from the April 1991 disk, your computer will crash after quitting the menu program. That's because the system can't keep track of where everything is in memory after the menu program is terminated.

Some programs may look for a configuration file or other files they need to run. That's the case with ASIC from the February disk. It attempts to run but aborts because it can't find its support files.

There's one last problem related to running programs from the menu program. We used to use a file called LAUNCH.EXE to help us run programs from the menu. If you typed LAUNCH from the command line, though, it tried to execute code that didn't exist. You won't find it on disk from this point on, but if you see it on old disks, don't run it. If you do, your computer will probably lock up, and you'll have to reboot.

Ending Macros Gracefully

SuperMAC (April 1991) loads a macro file that you create with your text editor or word processor. When the program runs, it loads the file and converts it to a format that its internal routines understand. The conversion routines are designed to alert you to any problems in the macro file. If problems are found, the program quits with an error message. We've gotten calls from several people who've receive these error messages, and we have some suggestions for avoiding them.

The most common problem is leaving off the carriage return at the end of the last macro. Your text editor will place a carriage return at the end if you press Enter. You can even add extra blank lines at the end of the life to make sure that at least one is there.

A second problem can occur when your editor places non-ASCII characters in the file. You have to make sure that your word processor saves the file as straight AS-CII text. Make sure, too, that your editor saves the file with hard carriage returns and not just linefeeds.

If you're still having trouble, you might have to resort to more thorough measures. Make sure that the DOS program called DEBUT is in your path or in the current directory. At the DOS prompt, type DEBUT filename. MAC and press Enter. You'll see a prompt that looks like a dash. Press D and then Enter. DE-BUG will show you the first several lines of the text file as hex data. Disregard the numbers in the left column; what you're looking for is to the right.

When your editor inserts a carriage return, it's actually inserting two characters--a 13 and then a 10. You'll see these in the DEBUG dump as a consecutive 0D 0A pair. If you don't see several of these pairs, your editor isn't saving in the proper format. If you don't see one of these pairs after the last macro, you haven't ended with a carriage return.

There's one more thing you can look for in the hex dump. Any character that's less than 20 hex or greater than 7F hex doesn't belong in there. If you see characters in these ranges, then your editor has inserted its own special formatting characters, and SuperMAC is reporting an error when it runs into these.

Getting the Best Support

If you call COMPUTE's office for technical support, you'll want to be prepared so you can get the best possible response. Here are some suggestions that will help our technical staff solve your problems.

Be ready to list your computer's equipment. Many programs require certain equipment configurations to operate properly. These programs may also need you to configure the program for the equipment on which it's running.

It's especially important to know your graphics configuration for programs that run in graphics modes and your disk drive types for programs that are disk utilities or that access the drives often. Being able to accurately identify your system and its components will help give the technical support person the information needed to identify your problem.

Know the version of DOS under which your computer runs. You can get this by typing VER at the DOS prompt.

Although not always possible, the most important factor is to be right at your computer when you call so the technical representative can talk you through any problems while you're on the telephone. That may save you from having to call again because something wasn't clear.