Home  Articles  Programs 

SpeedCalc 2019

Title:SpeedCalc 2019
 SpeedCalc 2019 is an enhanced version of the SpeedCalc spreadsheet program for the Commodore 64 and 128.
Filename:speedcalc19.zip (Click to download)
Language:Machine Language
Size:17810 bytes
Programmer:İlker Fıçıcılar


SpeedCalc 2019 is an enhanced version of the SpeedCalc spreadsheet program for the Commodore 64 and 128.

SpeedCalc is an all machine language spreadsheet program for the Commodore 64. Though relatively compact in size, it's fast and easy to use, and has many of the features found in commercial spreadsheet programs. Even better, the "SpeedScript Integrator" program lets you merge your SpeedCalc files into word processing documents created with SpeedScript, Compute!'s popular word processor. Working together, SpeedCalc and SpeedScript make a powerful team. You can merge a chart of sales figures into a company report, create a table of scientific data for a term paper, and manipulate numeric information in many other ways. In a sense, a spreadsheet program brings to arithmetic all of the flexibility and power that a word processor brings to writing.

SpeedCalc 2019

SpeedCalc2019 is the enhanced version of the original SpeedCalc 1986. This new version features "Exit to Final III+ Desktop". You can include the SpeedCalc 2019 in the Final III plus cartridge EPROM, run it by selecting from the menu, and turn back to the Final Cartridge III desktop after exiting the SpeedCalc. This integrated approach helps to experience a seamless desktop computer use. I've also prepared other productivity software (EasyScript, terminal software, etc.) with the same "Exit to Desktop" feature. All can be included in the Final III plus cartridge ROM.

Another enhancement is the 2MHz support for the C64 mode of the C128. Commodore 128 owners can enjoy the extra speed. In addition to 25% faster execution, the recalculation is two times faster now.

SpeedCalc 2019 comes in two forms: Cartridge and Normal PRG. You can burn the cartridge version into an 8K EPROM or into EasyFlash, etc. and use it as a plug-and-calculate software.

The archive speedcalc19.zip includes the following:

speedcalc2019.bin : 8192 bytes EPROM image.
speedcalc19.crt : CRT format EPROM image.
speedcalc19.prg : Exomized, normal .PRG file for load+run.

You can use the EPROM images in various ways:

. Copy speedcalc19.crt into a SDcard, load it using IRQhack64 cartridge, press the cartridge's button for >3 seconds. This way, IRQhack64 sets the speedcalc2019 as the default. . You can flash the image into EasyFlash cartridge. . You can burn the speedcalc2019.bin image into an EPROM and insert it into a standard cartridge.

Or you can just copy the speedcalc19.prg into a floppy, and load it and run:


General Info

SpeedCalc uses the top line of the screen as the command line. This is where SpeedCalc displays messages and asks you questions.

Screen lines 2-4 are the input buffer area. This is the work area where you enter and edit data. As you'll see in a moment, the input buffer also displays the data contained in the current cell.

The lower 21 screen lines are your window into the spreadsheet. Though the spreadsheet contains many rows and columns, only a few can fit on the screen at a time. By scrolling the screen back and forth with the cursor, you can move the display window to any part of the spreadsheet.

The SpeedCalc worksheet consists of 50 vertical columns labeled with letters (AA, AB, AC, ... BX) and 200 horizontal rows numbered from 1-200. The intersection of a row and column is called a cell. Cells are where you store data. With 50 columns and 200 rows, the SpeedCalc spreadsheet has a maximum of 10,000 (50*200) cells. Due to memory limitations, however, only about a third of these can actually contain data. But you may spread out the data over all 10,000 cells if necessary, depending on the format you need.

SpeedCalc offers many different commands, a few of which are entered by pressing one key. However, most commands are entered by pressing CTRL along with another key. CTRL-G is the goto command. CTRL-A displays the amount of free memory available, and so on. The most drastic command is CTRL-X, which exits SpeedCalc and returns you to BASIC. Since leaving the program effectively erases all data in memory, SpeedCalc asks ARE YOU SURE Y/N? before shutting down. To cancel the command and return to the spreadsheet, type N and press RETURN.

A few commands require you to press three keys at once. This sounds more awkward than it is in practice, since two of the three keys are SHIFT and CTRL. For instance, the command to switch between automatic and manual recalculation is performed by pressing SHIFT-CTRL-R (hold-down SHIFT and CTRL, then press R). The accompanying table lists all the SpeedCalc commands, and the figure shows the keyboard layout with a description of what each key does. We'll be discussing each command in more detail below.

Pressing RETURN enters a data item into the current cell. You can also end the input by pressing a cursor key. The data is entered as if you had pressed RETURN, and the cursor moves in the indicated direction. This feature is handy for entering a lot of data: Simply type the entry, move the cursor to the next cell, enter more data, and so on.

SpeedCalc Commands

Command: Action

CTRL-A: available memory check

CTRL-B: blank (erase) current cell

CTRL-C: copy block verbatim

CTRL-D: set number of decimals

CTRL-E: edit current cell

CTRL-F: change cell format

CTRL-G: goto selected cell

CTRL-M: move block verbatim

CTRL-P: print sheet

CTRL-R: turn on/off auto recalculation

CTRL-W: change column width

CTRL-X: exit SpeedCalc

CTRL-4: disk directory

CTRL-^: send disk command

CLR/HOME: home cursor

SHIFT-CTRL-C: copy block relative

SHIFT-CTRL-D: change decimal mode for all cells

SHIFT-CTRL-M: move block relative

SHIFT-CTRL-P: print to screen, disk, or printer

SHIFT-CTRL-R: display current recalculation mode

SHIFT-CTRL-W: change width of all columns

SHIFT-CLR/HOME: erase entire sheet

f1: change border color

f3: change background color

f5: change character color

f7: load SpeedCalc file

f8: save SpeedCalc file

<--: recalculate sheet


Formulas may also include any of the functions listed here:

@abs( ) absolute value

@atn( ) arctangent

@ave( ) average of a block of cells [form: @ave(xxn:xxn))

@cos( ) cosine of argument in radians

@exp( ) complement of log, gives e^X (e = 2.7182318...)

@int( ) integer (rounds to next lowest whole number)

@log( ) natural logarithm base e (log of zero or a negative number is illegal)

@sgn( ) sign (-1 for negative numbers, 0 for 0, 1 for positive)

@sin( ) sine of argument in radians

@sqr( ) square root (root of a negative number is illegal)

@sum( ) sum of a block of cells [form: @sum(xxn:xxn)]

@tan( ) tangent of argument in radians. @tan(.5*pi) is illegal

pi value of pi (3.14159265)

All the functions except pi begin with the @ symbol and are followed by parentheses. Within the parentheses of a function you may use a number or formula. For example, the formula =@sqr(4) generates the square root of 4. The formula = @sqr(aa1) returns the square root of whatever value cell AA1 contains. Note that the argument (value within parentheses) of the functions @tan( ), @sin( ), and @cos( ) must be expressed in radians; the result of the function @atn( ) is expressed in radians.

The function @ave( ) calculates the mean average of the values in a block (group) of cells. The function @sum( ) calculates the sum of a block. Both functions require that you define the block so that SpeedCalc knows which cells to include in the calculation. This is done by putting two cell names separated by a colon in the parentheses. The first cell name defines the upper-left corner of the block, and the second defines the bottom-right corner. For instance, @ave(aa1:ad20) calculates the average of all the cells from AA1 to AD20. The function @sum(aa1:ad20) calculates the sum of AA1 through AD20, and so on. An error results if any cell in the block is blank or contains text data.

Formula data is a mathematical expression or formula. It may be as simple as 2 + 2 or as complex as your imagination (and mathematical prowess) allows. The first character in a formula must always be an equal sign ( = ). If you omit this symbol, SpeedCalc either signals an error or treats the data as text. The true power of a spreadsheet is that a formula in one cell can refer to another cell.

Math Notes

SpeedCalc uses the same ROM routines for math as BASIC. Therefore, it follows almost the same rules and has the same limitations. Numbers are accurate internally to only nine digits -- although you can enter long numbers and view them exactly as you entered them, only the first nine digits are used for calculations. If you enter a very long number (more than 36 digits), your input is ignored, and the cell reverts to its former state. You can also enter long numbers in the form 1.23E+05 (scientific notation). Note, however, that SpeedCalc itself never uses scientific notation. It converts all numbers to their full length, so long numbers actually use more memory than shorter ones.

Beware of math errors such as division by zero, square root of a negative number, tangent of pi/2, logarithm of zero or a negative number, and overflow conditions like 2^300. SpeedCalc detects these errors and displays *ERROR* in the cell of an illegal calculation.


The recalculation feature is the very core of SpeedCalc. As you know, entering or editing a piece of data causes SpeedCalc to perform a calculation and put the result in the cell under the cursor. In most cases, the new data relates to data in other cells, so you’ll ultimately want to recalculate the entire spreadsheet as well. This can be done in two different ways: manually or automatically.

To recalculate the spreadsheet manually, press the back arrow key (<--, at upper-left on the keyboard). SpeedCalc begins at AA1 and recalculates every cell that contains data, placing fresh results wherever needed. SpeedCalc displays the message RECALCULATING while it's busy.

If you switch to automatic recalculation mode, SpeedCalc automatically recalculates the entire spreadsheet each time you enter new data or edit what exists. When you press CTRL-R, SpeedCalc changes the recalculation status and displays it at the top of the screen. If automatic recalculation was turned off before, it is now on (and vice versa). If you aren't sure which mode you're in, press SHIFT-CTRL-R; SpeedCalc displays the recalculation mode without changing it.

Change Type And Format

Change Format (CTRL-F). This command changes the location of data in the cell and the number of decimal places. When you press CTRL-F, SpeedCalc displays the question FORMAT: Left, Center, or Right justify? in the command line. Press L, C, or R to move the data to the left, center, or right of the cell.

Change number of decimal places (CTRL-D). This command lets you specify the number of digits displayed after the decimal point. The default value is 2, convenient for dollar amounts, but you may change it to anything from 0-15, If you choose zero decimal places, any number in that cell is rounded off to the nearest integer (whole number), A setting of 15 is special: The number in that cell is not rounded off at all. Instead, SpeedCalc displays the number exactly as you entered it or as it was calculated from a formula. Watch out for one feature of CTRL-D: It also resets the cell to right justification, so you may need to change this with CTRL-F.


There are two ways in which macro commands can work; verbatim or relative. To take a simple example, say that cell AA2 contains the formula =aa1*5 and you want to move its contents to cell AB2. When this is done in verbatim mode, AB2 contains an exact copy of what was in AA2 (=aa1*5). Note that the cell name used in the formula does not change: The formula still refers to AA1. If you perform the same operation in relative mode, the cell name in the formula is adjusted to fit the new location. In this case, AB2 would contain the formula =ab1*5.

Copy (CTRL-C). The copy command copies a block of cells into a different location without disturbing the original cells. Place the cursor on the upper-left corner of the block you want to copy, then press CTRL-C. SpeedCalc changes the command line to purple and prompts you to move the cursor to the lower-right corner of the block you want to copy. Once the cursor is in place, press RETURN. Now SpeedCalc prompts you to move the cursor to the place where you want to put the block: This is the upperleft corner of the new position. Once the cursor is there, press RETURN again. The new data replaces whatever was contained in the designated cells. Note that if you define an impossible block (for instance, moving the cursor to the upper-left of the original position, rather than below and to the right), SpeedCalc does not copy any data. You can use this trick to escape from Copy if you press CTRL-C accidentally. Another escape is to press RETURN twice while the cursor remains on the original cell.

Move (CTRL-M). This command works like a copy, but it fills the original cells with blanks. Though SpeedCalc has no insert command, you can use this command to make space for new data in the middle of a spreadsheet. Simply move everything below the insertion point down as far as you need. To cancel this command, press RETURN twice while the cursor is on the same cell.

Relative Copy (SHIFT-CTRL-C). This form of the copy command adjusts the cell names used in formulas within the copied block (see explanation above).

Relative Move (SHIFT-CTRL-M). This is the relative form of the move command. Cell names in formulas are adjusted to reflect the move.

Disk Operations

SpeedCalc has four disk commands which allow you to save a spreadsheet to disk, load it, display the disk directory, and send commands to the disk drive. The directory command is the simplest to use. Press CTRL-4 (think of the dollar sign, as in LOAD "$",8 to list the directory from BASIC); The screen clears and the directory is displayed. Press RETURN to return to the normal screen. You may pause the directory display with the space bar.

To save a spreadsheet to disk, press the f8 function key (SHIFT-f7). SpeedCalc prints SAVE: on the command line, followed by an underline cursor, Enter a valid Commodore filename and press RETURN. (If you change your mind and decide not to save anything, press RETURN without typing a filename.) The disk drive spins for a few moments, then SpeedCalc prints the drive status in the command line. The message 00,OK,00,00 means there were no errors.

To load a saved file from disk, press the f7 key. Again, SpeedCalc prompts you to enter the filename and displays the disk status when the operation is complete. SpeedCalc files are saved as PRG (program) file types, but do not load as normal program files. SpeedCalc uses special header bytes to identify a SpeedCalc file. If you try to load anything other than a valid SpeedCalc file, you'll see the message NOT A SPEEDCALC FILE.

You can send Commodore disk commands to the drive with CTRL-^ -- press CTRL and the ^ (uparrow) key together. SpeedCalc prompts you to enter a disk command. The CTRL-^ command works much like the Commodore Wedge utility. If you press RETURN without typing a command, SpeedCalc displays the drive status and sends no command. You need not enclose the command in quotation marks or type ,8 after it. For example, press CTRL-^, then enter I0 to initialize a disk. Consult your disk drive manual for more information about Commodore disk commands.


SpeedCalc lets you print data to three different devices: to the screen for previewing output, to a printer for permanent documentation, or to a disk file for integrating the data with another program.

To preview your spreadsheet on the screen, press SHIFT-CTRL-P, then press S (screen output) when prompted. Naturally, the display will look odd if your sheet is wider than 40 columns. Think of each pair of 40-column lines as one 80-column printed line.

To print a hardcopy of the spreadsheet, press CTRL-P. If your printer is configured like most, this should produce a satisfactory printout. This command sends output to the printer as device number four with a secondary address of seven (uppercase/lowercase on most systems). Before using this command, you must position the cursor below and to the right of the block of cells you wish to print. The upper-left corner of the printout starts at cell AA1. The entire width you define by this position is used.

Full documentation can be found here:

- http://cbm.ficicilar.name.tr/commodore/speedcalc-for-commodore-64-and-128

- https://www.atarimagazines.com/compute/issue70/076_1_SpeedCalc.php

Kevin Martin
COMPUTE! January 1986, pp.66-84

Tags:C128, C64, Commodore, Software, SpeedCalc, Spreadsheet

C64 Projects Twitter Page

İlker Fıçıcılar's CBM Page