Monkey Wrench

Prehensile Programming

John Anderson


Name: Monkey Wrench
Type: Basic Utilities Package
System: Atari 800 8K
Format: ROM "Firmware"
Language: Machine
Summary: Provides several helpful
additions to Atari Basic
Price: $49.95
    Eastern House Software
    3239 Linda Dr.
    Winston-Salem, NC 27106

Basic programmers, whether professionals or struggling novices, stand to benefit from any help they can get. Atari Basic is a relatively friendly language in which to work, thanks to extensive syntax checking and a versatile editor. It is an excellent system for learning--yet it has some drawbacks.

Monkey Wrench attempts to correct some of these, and does a very good job of it. It provides nine new Basic commands, as well as a machine language monitor with 15 commands. It also bears the real distinction of being the first (and currently only) ROM board for the right hand slot of the Atari 800.


I cannot in good conscience call Monkey Wrench a ROM cartridge, as it has no case to speak of. The only disadvantage of this is the possibility of installing it backwards in the computer--a potentially devastating disadvantage. Atari cartridges will not install any way but correctly. Further, the board must be installed with the chips facing away from the keyboard -- perhaps counterintuitive to the notions of many users. Needless to say, care should be taken on this point.

My machine has been around for nearly two years without ever having anything stuck in the right-hand slot. Hence, when I first plugged in Monkey Wrench, I got some rather glitchy results, ranging from a blank yellow screen (you may be familiar with that one, it's an operating system bug), to some spectacular electronic "rain" blowing across the screen.

The manual suggests cleaning the contacts with alcohol. I used a little contact cleaning spray and plugged the board in and out several times. When I looked at the board contacts, they were filthy. I cleaned them with a pencil eraser, plugged the board back in, and got the title display. I then experimented for over an hour without any problems. It is also mentioned in the manual that the 850 interface must be off before booting Basic with Monkey Wrench.


Monkey Wrench is "transparent"; that is to say, after the title display indicates that it is functioning, it will not evidence itself again until called. The sole exception to this surfaces when the user tries to move the cursor with "control arrow" keys. The cursor movement arrows are now accessed without the need to press control, while the plus, minus, equal, and asterisk keys are accessed by pressing control.

This option takes a bit of getting used to, but is a much more convenient keyboard configuration for Basic editing. Nine times out of ten, you'll want to use those keys for cursor movement. If this function is for some reason undesirable, you can toggle it off with a simple ">E" command, reverting to normal keyboard operation.

It's Got Your Number

Ready for an editing session in Basic? Well get set for it, because you won't have to worry much about numbering, renumbering, or deleting blocks of line numbers any more. Automatic line numbering is easy; simply enter ">a", followed by your choice of starting line number and the increment value you want. When you press return, those line numbers will be displayed automatically.

This may seem to some to be a minor convenience. All I can say is once you get used to it, you'll never want to be without it.

The same goes for block deletion, accessed by ">d" followed by the first and last line numbers in the range to be deleted. Certainly you could sit and patiently delete each line of the block. In a substantial modification, however, this would become tedious very quickly, and the real benefit of this feature would be seen.

Most powerful and beneficial of the numbering commands is renumber,">R" followed by the starting line value and the increment value you select. Monkey Wrench will renumber your Basic program in whatever configuration you wish, changing not only line numbers but all references to line numbers occurring within the program.

I experimented with renumbering three of my own Basic programs (of some complexity), and it works perfectly each time. It should be noted however, that I do not use "names" to call subroutines, a friendly and helpful capacity of Atari Basic, i.e., "GOSUB MAINLOOP." As Monkey Wrench is unable to distinguish between "name" constants and any others in a program, this will cause problems in renumbering. This is true of any renumbering routine, and may be reason enough to steer away from "naming," at least when confronted with a choice between quick and painless renumbering and named subroutines.

Because the renumber command uses screen memory as a buffer, there is a limit to the length of a program that can be renumbered. By changing the graphics mode, the total length can be brought to about 1000 lines of code--probably more than you'll need for any single program file.

Some More Than Marginal Additions

By pressing ">M", screen margins can be reconfigured without the need for cryptic POKEs. Since the Atari screen defaults to 38 characters, many programmers (especially those with video monitors) will want to move the margins out to a full 40 characters.

For those who wish to commune with the Atari CPU, the command ">#" will convert decimal values to hexadecimal, while ">$" will convert hex values to decimal. For beginning machine language programmers (of which category I am a lifetime member) these utilities are indispensable.

Typing ">T" followed by hex values will perform a memory test. Don't be shocked if you discover some bad bits of RAM in your Atari. I did, in two machines. The only disadvantage to this function is that testing is very lengthy, and looks just like a system lock-up unless bad bits are turning up.

Monitor Does Not Support Disk

In addition to these commands, a small machine language monitor is provided. Memory location contents can he displayed between any two addresses, and be toggled to display the ATASCII equivalents of these contents, as well as disassembled. The 6502 register contents can be displayed, memory and registers altered, and searches conducted within code for ASCII strings or hex characters.

Memory can be saved and loaded, but very unfortunately, only to cassette. Thus, this monitor will be of only limited utility to all but the most single minded hackers. The monitor is handy for developing short machine language subroutines within Basic programs, and while it will run without Basic, it will probably not be of much use in this mode.

The utilities offered by Monkey Wrench are easier to use than disk-based utility programs. They never have to be loaded, and are not co-resident with the program you are working on, at least as far as the screen editor is concerned. All commands are available at the touch of a button or two, and with the exception of the RAM test, are uniformly quick to execute. This "transparent" quality will be most appreciated by the intermediate programmer, at whom the package is best aimed.

You will note that I hedged a bit about what Monkey Wrench does in and to RAM. The fact is that it does eat up some memory, including part of page six, which could cause some rare problems. Remember also that each cartridge eats up 8K when plugged in: Basic and Monkey Wrench will bring free memory on a 48K machine down to about 30K.

John Anderson is an associate editor for Creative Computing magazine.

Table of Contents
Previous Section: Basic A+
Next Section: String Arrays