Classic Computer Magazine Archive CREATIVE COMPUTING VOL. 10, NO. 6 / JUNE 1984 / PAGE 204

Apple cart. (evaluation) Steve Arrants.

Much to do this month! PEEKing and POKEing in Pascal, some DOS answers, and an assortment of new products. But before we begin, let's take a look at the almanac.

On the evening of June 5, 1833, Ada Lovelace and Charles Babbage first met. Babbage, inventor of the Analytical engine, was one of the early pioneers in computer science. And Ada, of course, is remembered for her ideas on what exactly an Analytical Engine should do. Apple shipped its first Apple II in 1977. Blaise Pascal was born on June 19, 1623 and Atari was founded by Nolan Bushnell on June 29, 1977. Printer Utilities

Apple, sadly, is famous for not supporting the tricks and abilities of their hardware via software. It was left to Peter Joselow to create DoubleStuff to show us what double hi-resolution graphics could be. The same thing happened with the Apple Dot Matrix Printer. The DMP allows downloading of alternate character sets, but selecting this option gives you a FUNCTION NOT AVAILABLE message. Enter the third party developers who have exploited Apple's mistakes.

Apple Dot Matrix Printer Utilities is what Apple should have included with the DMP. The programs in this package let you edit characters, set printer specifications, and convert high-resolution fonts from other programs to DMP format.

The character editor is simple to use. Proportional or fixed-width characters are edited on a text display of about one-fourth screen size. The remainder of the screen displays the standard character, the type of character set (English Bold, Quadrata Bold, etc.), available commands, and the ASCII code for that character.

The cursor is controlled from the keyboard. You can select an M, J, I, K diamond, left/right arrows and A and Z keys, or the cursor control keys if you are using an Apple IIe. The spacebar turns the dots on or off. A nice feature is that at any time during editing, you can dump your work to the printer.

The printer setup lets you specify which font is default, line spacing, character width, page length, and other information. After selecting the specifications, one key downloads these to the DMP. The setting remains in effect after you boot another disk, because the settings are in the printer, not the computer RAM.

The font converter is useful if you have a library of fonts created with other software, such as Fontrix. Be warned, though. A few large fonts can't be converted to DMP format.

If you bought a DMP on the strength of its ability to use different characters, you were probably disappointed. Apple Dot Matrix Utilities will let you make full use of the DMP capabilities.


Basic is the computer language most of us started out with. We find it easy enough to use now--after years of writing programs. It might be hard for us to believe, but there are still people who have never had their hands on a computer. What looks easy to us is as baffling as Attic Greek to new users.

Basic Tutor from SuperSoft Inc. is an excellent Basic language teacher. Although most of the program is text, it does include some graphics to illustrate important concepts of Basic. It is well organized, well written, and idiot proof.

After booting the disk, you select the first information level. A short bit of text with examples is displayed on-screen. Merely glancing at an example isn't enough, however; you must participate with Basic Tutor. To go to a higher level, you must correctly answer a series of questions. Make too many errors, and the program tells you what information you must review before continuing. Unlike some other educational packages, you can't skip ahead to higher sections. Until your Apple is satisfied with your knowledge, you are stuck at a low level.

You are allowed to review a section after working through it, but unfortunately, you can't scroll back to a previous page in a section. You must return to the beginning and skim through the pages.

Basic Tutor assumes no prior knowledge of the Apple, Basic, or mathematics. It explains what various symbols mean; how to use variables, functions, and subroutines; and how to structure a program.

The best part of Basic Tutor is that it lets you proceed at your own speed, step-by-step, with simple language and instruction. No novice could be intimidated by this program.

Basic Tutor is a bit expensive at $99, but the cost may be justified; until you learn Basic you won't get too far with your Apple. You can play games and use a word processor or a spreadsheet, but the real fun and power of a computer comes through your own programming.

CIRCLE 438 ON READER SERVICE CARD Print-It! Graphics Printer Card

It is easy enough to print text from the Apple. All you need do is issue a PR#1 command to send output to a printer. Depending on your printer, special control codes might have to be issued to print italics, bold, and other fonts. Printing a graphics screen is another matter. Before intelligent printer interfaces became available, you had to load a graphics image into a specific area of RAM and do some lengthy calculations to get a nice, neat image on paper.

Print-It! from Texprint Incorporated provides software independent printer operation for a hard copy of any image--text, graphics, or mixed. It will work with almost any printer. PRint-It! will print this screen image at any time during a program and then resume program operation. We used to get screen dumps of software by using an ancient Apple II with a non-Autostart ROM. But with the advent of more sophisticated protection schemes, and the death of that venerable Apple, we have come to rely upon photographs of our screens. Now we can use Print-It! The program seems to bypass the protection schemes and produces the screen image on paper everytime. Note that this is not a pirate card. You can't copy a protected disk. You can dump any screen image from any program, however.

Print-It! consists of three pieces: the interface card, the button and cable, and a cable to connect Print-It! to your printer. Print-It! can be installed in any free slot. Attach the button to the card and the cable to your printer, and installation is complete.

The button makes Print-It! the easiest of all available printer cards to use. When you are satisfied with a screen image, pressing the button interrupts the program. There are several print options you can select, including text only, graphics, mixed text and graphics, inverse screen, rotated image, Page 1 or Page 2 graphics, and double high-resolution graphics. Each requires a one-letter code to be entered from the keyboard. When you press RETURN, printing begins. At any time, tapping the spacebar stops printing and returns control to the program.

The manual looks sparse at 18 pages, but then, this is a printer card, not a computer. Print-It! lists for $179, which is less than some other cards that do not offer as much ease of use.


Visually impaired computer users can now connect with BBS's, remote hosts, and on-line information services with the help of Transend Corporation and Computer Aids Corporation.

Talking Transend incorporates Transend 2 software, a Transend modem, and an Echo II speech synthesizer. All information that the program writes to the video display is also spoken through the speech synthesizer.

Computer Aids Corporation develops products which it integrates with Apple computers and sells as turnkey systems to the visually impaired. Medalist Courseware

Hartley Courseware, Inc., has released six new packages for elementary and secondary social studies. The Medalist series was designed to provide an enjoyable way for more advanced elementary and jr. high school students to study and learn important facts about various subjects. Subjects in the series include Medalist Continents, Medalist States, Medalist Black Americans, medalist Women in History, Medalist Presidents, and Medalist Create. The latter allows the teacher to create new learning courseware in the Medalist format for anything from astronomy to zoo animals.

The Medalist programs, six disk-based programs for the Apple II and IIe, cost $39.95 each. Glossary Disk for AppleWriter

MinuteWare, publishers of Minute Manuals, quick reference guides to many Apple programs, has released the Glossary Disk for Apple Writer. The disk contains separate glossary files of print commands for the Epson series, Gemini 10/10X, Apple DMP/Imagewriter, PRowriter, NEC 8023A, and Okidata printers. Any print code can now be accessed with a single keystroke from within AppleWriter II or AppleWriter IIe. The disk also includes the alternate character set needed to do super/subcripts on the Apple DMP. An explanation on patching AppleWriter IIe to use the NUL code for underlining and superscripting on the Epson MX and Gemini printers is also included. Price is $14.95. PEEKing and POKEing in Pascal

Although Pascal has been touted as the computer language that outperforms Basic, I find it lacks some features that Basic programmers take for granted. For example, the PEEK and POKE commands used in Basic are not really available in Pascal. There are some "byte-oriented built-ins" in Pascal such as MOVELEFT and MOVERIGHT which emulate PEEK and POKE, yet they do not perform exactly as the Basic commands do.

It is not too difficult to write Pascal routines that PEEK and POKE. One method is to write a set of simple machine code routines and call them in as external procedures. Since using the Pascal Assembler and Linker are not my strong points, and since Pascal is supposed to be an easy programming language, I turned to Pascal itself.

An obvious method is to create variables that can be used for more than one purpose. For our purposes, this will be something that will be either an integer or the address of an absolute location in memory.

The Pascal declaration we can use will look like this: ppd:record case b: boolean of true: (pointer: byte); false: (address: integer) end;

The variable is made up of two parts. The first is Boolean, which can have the values true or false. The second can be one of two different types of object. When the Boolean part (ppd: b) is true, the information contained in the second part is treated as a pointer to a byte. When the Boolean part is false, the information is treated as an integer.

To PEEK at a location then, you need only two lines of Pascal to define a suitable function: ppd. value: = addressyou wanttoPEEKat; peek: = ppd.pointer (*the thing being pointed at*)

But there is still one more Pascal problem we need to deal with. Pointers in Pascal tend to point at words (any two consecutive bytes). Even if you define a byte as a number from 0 to 255, when Pascal points at it, it will point at a number between -32768 and 32767.

It is easy enough to get around this. All we need to do is use a technique known as packing, as Pascal can even point to the exact bit when it is pointing at a packed item. The declaration becomes: byte= packed array [0..0] of 0..255 that is, an array of one entry, which is a number between 0 and 255.

the code in Listing 1 is written in the format of a Unit, so if you copy it exactly, compile it, and use LIBRARY.CODE to link it into your SYSTEM.LIBRARY you will be able to PEEK, POKE, DPEEK, and DPOKE (the last two being two-byte equivalents of PEEK and POKE) in any of your Pascal programs by putting in the USES PEEKLIB in the usual place.

If you do not want to make a library unit, you will need to copy the TYPE declaration from Listing 2 into your program along with whichever functions/procedures you want.

Once you can POKE into Pascal, there are many useful things you can do. It is possible to tell the system to forget where it booted from and to look somewhere else for the boot disk. If you see a RAMcard as a book disk, for example, you can cut compiling time by almost 60 percent.

A simple example of a good use is shown below. It is a short routine that sets an IDS printer to 132 characters per line. A similar program can be written for Epson, Okidata, and most other printers. program ids; uses peeklib; var f: file of char; begin poke (1668, 132) rewrite (f, 'printer:'); writeIn (f, chr (15)); close (f) end.

With the Pascal operating manual at your side, you can find more interesting things to do with PEEKs AND POKEs. Be careful, however. It is possible to wipe out every disk in the system with one careless POKE. Whenever experimenting with POKES, use a backup disk that won't be missed if something goes wrong. DOS Responses

Letters are still coming in with your answers to my question about an unusual feature of DOS. When you issue CATALOG via a CALL 42350 with the drive door open, DOS answers ROGRAM NOT AVAILABLE (note the missing P) instead of the expected I/O ERROR. Some readers not only answered the question, but provided other interesting information about DOS.

Jay Nabonne (who forgot to include a return address) gave the best explanation. As he explains it, DOS is not disconnected when the drive door is left open. DOS uses one memory location ($AA5C) for both an error code and the last character output. When an error message is printed, its number is stored in $AA5C. A RETURN BELL RETURN is printed. Then the error number is retrieved, compared against the index table, and printed out. If DOS is not disconnected, the RETURN printed before the error message places a RETURN ($8D) in $AA5C. This is then used as the error message. Since there is no error message for $8D, it points beyond the index table into memory. It just so happens that the number it points to in memory is the first R in PROGRAM NOT AVAILABLE. So DOS, not being too smart, prints the error message from there.

Thanks, Jay. And thanks to all the other readers who wrote in with explanations. Now another question. Have you discovered any ProDOS tricks, errors, or oddities? Send them in!

that's all for June. Questions and comments should be sent to me here at the magazine, to CompuServe 76703,654, or MCI Mail address SARRANTS. Firms Mentioned in This Column

Products: Apple Dot Matrix Printer Utilities (computer program)
Basic Tutor (computer program)