Program: CSpread
Version: 1.2
Author: David Hart
E-mail: davey3000@calccity.freeserve.co.uk
Format: TI-86 ASM
Description: A spreadsheet program for the TI-86, with an add-in for Excel which allows it to read and write CSpread spreadsheet files.
Date Released: 22nd June 2001
LEGAL DISCLAIMER
This SOFTWARE (that is, all software programs included with this text file) is free-ware, and therefore is provided "as-is" without any kind of warranty. I provide no guarantee as to the functionality, usefulness, fitness for a particular purpose or merchantability of the SOFTWARE. I may not be held liable for any damages whatsoever arising from the use or inability to use the SOFTWARE.
This SOFTWARE and it's documentation are copyright David Hart 1998, and may not be altered or tampered with in any way without permission (including, but not limited to, disassembly, reverse engineering, and decompilation). This SOFTWARE may be freely distributed as long as all the files included with the original package are distributed together (that is, the files CSpread.86p, CSprdLib.86s, CSprdHlp.86s and ConvMacro.xla, and the documentation files), and no fee is charged.
Excel is a registered trademark of Microsoft Corporation (in case Bill Gates' lawyers are reading...)
VERSION COMPATIBILITY INFO
All files created with CSpread V0.1, V0.2 and V0.3 are completely compatible with this version, BUT the reverse is not true. This is because formulae were not supported by the earlier versions, and file structure changes had to be made to accommodate formulae. Consequently, you will get a "File version error" if you attempt to open a spreadsheet made with this version of CSpread in one of these earlier version of CSpread.
Files created with CSpread V0.4 through V1.1 are completely compatible with this version, and vice versa.
OK, NOW THAT'S OVER, WHAT CAN THIS THING DO?
CSpread is an assembly program for the TI-86 calculator which can create and edit spreadsheets containing text, numbers and formulae. These spreadsheets may be saved and loaded as string variables on the calculator. When uploaded to a PC, the included Excel add-in allows CSpread spreadsheets to be edited with Excel. CSpread also has a main library file which adds to its' features. The main library file (CSprdLib.86s) provides formula support, the options menus and help file support (when the file CSprdHlp.86s is sent to the calculator).
To use CSpread, just send the CSpread.86p file to your calculator. To access the extra features, send the CSprdLib.86s file as well. To access the help file, send the CSprdHlp.86s file to your calculator.
SO HOW DO I USE IT?
At the bottom of the main spreadsheet view screen is the menu bar. Like a normal TI-86 menu, pressing one of the keys from F1 to F5 will open the menu. The contents of the currently selected cell are inverted, and are also shown in the edit bar at the bottom of the screen just above the menu bar(in this case, the content is the word "ITEM"). The cell highlighter can be moved using the cursor keys. If the highlighter is moved to a cell partly obscured by the edge of the screen, the screen will scroll to make the entire cell visible. The maximum spreadsheet width at present is 10 columns, although rows are automatically added as you scroll down the spreadsheet (and blank rows removed as you scroll up) to allow up to 254 rows.
To edit a cell, just highlight it and type what you want to add to it. The inverted capital "A" just above the menu bar on the left of the screen indicates the current key-entry mode. When this is a capital "A", pressing lettered keys on the calculator will add capital letters to the cell. When this is a lowercase "a", lowercase letters will be added to the cell. When this is a capital or lowercase "N" or "n", pressing number keys will add numbers to the cell. To switch between alpha numeric mode, press ALPHA. To switch between uppercase and lowercase mode, press 2ND. To stop editing a cell, just press ENTER. The currently highlighted cell cannot be changed while a cell is being edited. When editing a cell, pressing the LEFT and RIGHT cursor keys will move the edit-cursor (a small, black vertical line in the edit bar). This allows text and numbers to be entered anywhere in the contents of a cell, in fact wherever the edit-cursor is. Pressing DEL will delete the character (number, letter or symbol) to the left of the cursor. Pressing CLEAR will clear the entire contents of the cell (this also works when the cell is not being edited, but is highlighted). To edit a cell without adding or removing characters at the end of the cell, press MORE while the cell is highlighted, which will display the cell edit-cursor.
As previously mentioned, pressing a key from F1 to F5 will open the menu named above the key. Menus are in the form of dialog boxes. The currently highlighted item can be altered using the UP and DOWN cursor keys. If there are more than 5 items in the dialog, the contents of the dialog will scroll to show the other items if the item highlighter is moved beyond the end of the visible list. Pressing ENTER selects the currently highlighted item. Pressing EXIT will exit the current dialog, and return you to the main spreadsheet view screen.
If "Load" or "Save As" is selected from the File dialog, the file dialog will be displayed. This dialog will also be shown if "Save" is selected when the spreadsheet has not been saved before. If there are no spreadsheet files on the calculator, a "No files found" message will be displayed, which can be removed by pressing EXIT. All spreadsheet files on the calculator are shown in the file dialog, and the currently highlighted file can be altered using the UP and DOWN cursor keys as before. In the "Load" dialog, pressing ENTER will load the currently selected file, and display it on the main spreadsheet view screen. Any spreadsheet which was previously being edited will be lost, unless it was saved beforehand. If the file cannot be loaded, an appropriate error message will be displayed. In the "Save" dialog, the name of the currently highlighted file will appear in the edit bar, along with the edit-cursor. This allows a spreadsheet to be easily saved under the same name as another spreadsheet file, in order to overwrite it, or to be saved under a similar name by altering part of an existing filename. All the usual edit keys can be used to edit the filename in the edit bar. Pressing ENTER will save the current spreadsheet under the filename given in the edit bar. The maximum filename length is 8 characters.
Some dialogs contain items which control CSpread options. The contents of such items can be "toggled", in order to change the option. The Editing Options dialog contains such items, and can be accessed by opening the OPTS menu, and selecting the "Editing Options" item. The highlighted item controls the direction in which the DEL key deletes text. Pressing ENTER or the LEFT / RIGHT cursor key will toggle the option between deleting text before the edit-cursor, and deleting text after the edit-cursor. The item text after the colon will change to reflect the new setting. Only dialog items containing a colon can be toggled in this way. Selecting the OK item will exit the dialog and retain the new settings. The settings will also be retained if EXIT is pressed to leave the dialog. All options are saved when the program is exited (unless the program has been compressed).
HOW DO I ADD FORMULAE?
You can add a formula to the spreadsheet simply by inserting an "=" sign before the contents of a cell. It's contents are then treated as a formula, and can be evaluated by opening the Edit menu, and selecting "Recalculate formulae". Formulae containing errors will be marked as "#ERROR!", and formulae containing invalid cell references will be marked as "#CELL!".
A cell reference is the letter of the column of another cell, followed by it's row number. By including a cell reference in a formula, the formula's value will depend on the referenced cell's value. Note that the column letter can be in uppercase or lowercase.
If two or more cells rely on the values of each other, it is impossible to evaluate them. When the "Recalculate formulae" option is selected, the value of such cells will not be calculated, indicating that they are "cross-linked". Simply change the contents of the cells so they don't refer to each other.
At present, the only operators that can be used for calculation in a formula are +, -, / and *. Parentheses may be used to control the evaluation order, e.g. (1+2)*3 = 9. Without parentheses, * and / are always evaluated before + and -. Note that a formula may contain more left parentheses than right parentheses, but the reverse is not true.
CAN I USE FUNCTIONS LIKE SIN, COS...?
CSpread now supports a few functions. More will hopefully be added soon. At present, only sin
, cos
and tan
are supported. These functions are used in the same way as on the normal calculator, except that they have to be typed in in full. The sin, cos and tan shortcut keys on the calculator cannot be used to enter the entire function name. Note that there must be either one or more spaces or a left paranthesis after a function name.
HOW DO I USE THIS EXCEL ADD-IN?
The Excel add-in is designed for Excel 97. It may not work on other versions of Excel (let me know the results if you try). To install the add-in (filename: ConvMacro.xla), run Excel 97, open the Tools menu and select Add-Ins.... Click the Browse button, and find and select the ConvMacro.xla file (from the directory you unzipped the CSpread archive to). This will add the "CSpread Converter" to the add-in list, and should have a tick next to it's name indicating it will be installed. Click the OK button to complete installation. To items will be added to the file menu which allow CSpread files to be opened and saved.
HOW DO I GET HELP?
Pressing F4 from the main spreadsheet view will bring up the help menu. Selecting one of the topics shown will bring up the help text for that topic. Use the UP / DOWN cursor keys to scroll through the text, and press EXIT to return to the main spreadsheet view. Some topics when selected will bring up a list of sub-topics. Just select one of these sub-topics for the relevant help text.
WHY DO I KEEP GETTING "FILE NOT FOUND" ERRORS WHEN I TRY TO OPEN MENUS?
To see many of the menus and dialogs, you need the CSpread library (CSprdLib) installed on your calculator. This is to conserve space in the main CSpread program file. You will also get this error when trying to open the Help menu if CSprdHlp is not present on the calculator.
MENU SUMMARY
(Note that all menus except the FILE and EXIT menus require CsprdLib.86s to be on the calculator to function).
- FILE
- New - Creates a new spreadsheet, and discards the existing one.
- Load - Loads a spreadsheet file for editing.
- Save - Saves the current spreadsheet to a file.
- Save As - Saves the current spreadsheet under a new filename.
- EDIT
- Recalculate formulae - Recalculates the values of all formulae on the spreadsheet.
- OPTS
- Editing Options
- DEL deletes text: before cursor / after cursor - Alters whether pressing DEL deletes text to the left or right (before or after) of the cursor.
- Entering text: overwrites old text / inserts new text - Alters whether entering text when the edit-cursor is not at the end of the contents of the current cell being edited causes the entered text to overwrite existing text (NOT YET IMPLEMENTED).
- Formulae Options
- Auto evaluate formulae: disabled / enabled - Alters whether formulae are automatically evaluated as soon as they are typed in. This can slow down editing in large spreadsheets.
- Miscellaneous
- Key repeat speed: very low / low / medium / high / very high - Alters the rate at which a key repeats when it is held down. Low speeds are best suited to accelerated calculators. The default is very high.
- HELP - Only works when the help file (CSprdHlp.86s) is on the calculator. Just select the menu or topic you want help with from the dialog that appears. The help text will then be shown in a scrollable dialog. Use the UP / DOWN cursor keys to scroll the text, and press EXIT to return to the current spreadsheet.
- EXIT - Exits CSpread. If the spreadsheet has not been saved since it was last edited, a dialog will appear asking you to confirm this action.
Note: The OK dialog option is not included in this list, as it always closes the current dialog.
KEY MAPPINGS
Accessible from anywhere
- 2ND - When held, acts like a "Shift" key, and switches to uppercase mode.
- ALPHA - Toggles between alpha and numeric modes.
Accessible from anywhere except dialogs
- F1 - Opens the File menu.
- F2 - Opens the Edit menu.
- F3 - Opens the Options menu.
- F4 - Opens the Help menu.
- F5 - Opens the Exit dialog.
On Main Spreadsheet View Screen
- LEFT / RIGHT / UP / DOWN - Moves the cell highlighter.
- 2ND + LEFT / RIGHT / UP / DOWN - Moves the cell highlighter 4 cells at a time.
- ENTER - Moves down to the next cell.
- MORE - Opens the current cell for editing (displays the edit-cursor).
- DEL - Deletes the last character from the current cell, and opens it for editing.
- CLEAR - Clears the contents of the current cell, but does not open it for editing.
- CUSTOM - Allows the width of the current column to be altered with the LEFT and RIGHT cursor keys. Press ENTER, EXIT or CUSTOM to finish.
- Any letters/numbers/symbols - Adds the character to the cell, and opens the cell for editing.
In Edit-Bar
- LEFT / RIGHT - Moves the edit-cursor.
- DEL - Deletes the character before/after the edit-cursor.
- CLEAR - Clears the contents of the current cell.
- EXIT - Cancels any changes that have been made to the cell, and stops editing of the cell.
- ENTER - Saves the contents of the edit-bar to the current cell, stops editing of the cell, and moves the cell highlighter down to the next cell.
- Any letters/numbers/symbols - Adds the character to the cell at the edit-cursor position.
In Dialog Boxes
- UP / DOWN - Moves the highlighter through the list of items.
- ENTER - Selects / toggles the state of the currently highlighted item.
- LEFT / RIGHT - Toggles the state of certain items whose text can be changed to set options.
- EXIT - Closes the current dialog, and returns to the main spreadsheet view screen.
In Help Dialogs
- UP / DOWN - Scrolls the help text up an down.
- EXIT - Closes the current dialog, and returns to the main spreadsheet view screen.
SO WHAT'S MISSING FROM THIS VERSION?
- Special symbol support (e.g. semicolons, exclamation marks, etc).
- Cell formatting (i.e. standard type, currency type, weight type, etc).
- MORE functions for use in formulae!
- Cell filling/copying.
- Row insertion/deletion.
- Automatic column addition.
- Insert/overwrite option for editing text.
- Ability for numeric cells to make greater usage of their space (at the moment, they won't fill the first few pixels).
- Extra help file content.
- Finally fix all cell highlighting/display issues.
- Probably loads of other things I haven't thought of!
ANY KNOWN BUGS?
- Modifying the last cell in the spreadsheet will corrupt the spreadsheet.
- If a spreadsheet size exceeds 15K, the system may crash (I haven't experienced this bug yet, but I think it exists) - UPDATE: This may be fixed - untested.
HISTORY
- V1.2
- Shifted more data from the main program file into the library file, and made lots of size optimizations.
- Fixed bug where the edit cursor disappeared off the edge of the screen if too many characters were entered. The edit box contents are now scrolled appropriately.
- Added support for parentheses to alter the evaluation order in formulae (up to 20 levels of parentheses).
- Switched to HTML format for the readme file, rather than using text and Word versions.
- Optimised help file display routines so that help files can be scrolled through much more quickly.
- MAJOR FEATURE - Added initial support for functions (sin, cos, tan). May be buggy, but seems okay so far.
- Probably the last version to not require the library file to run.
- V1.1
- Fixed crash when evaluating formulae on the V1.6 ROM.
- Error dialog now displayed when filenames do not start with a letter (causes problems with the OS otherwise).
- V1.0a
- Corrected ROM Font error that occurred on some ROM versions.
- V1.0
- Replaced "Are you sure you want to quit?" dialog with "Exit without saving?" dialog, which only appears if the current spreadsheet has not been saved since it was last altered. This dialog also appears when a new spreadsheet is created if the old one has not been saved since it was last edited.
- Added option to automatically evaluate formulae when they are edited.
- Fixed crashes when dividing by zero.
- Completely rewrote cell drawing routines to improve their visual appearance when scrolling, and to make overflowing text cells visible where they should be even if the start of the cell is not visible.
- Corrected bug which prevented the Excel add-in from saving large spreadsheets in CSpread format.
- Added option to create a new spreadsheet ("New") to the File menu.
- Added a basic help file.
- Huge amounts of beta testing to remove millions of tiny bugs! (OK, that's a slight exaggeration, but you get the idea...)
- Optimised cell highlighting routine to improve scrolling speed.
- Fixed bug with file dialogs when more than five spreadsheet files were on the calculator.
- Added "Overwrite existing file?" dialog.
- Added "Save As" to File menu, and altered the functionality of "Save".
- Fixed crashes when a number is entered ending with a decimal point.
- Fixed crashes that could occur when using the library file after saving a spreadsheet.
- Fixed MAJOR BUG that caused CSpread to crash the second time it was run.
- Fixed bug which randomised the last letter of overflowing cells.
- Fixed bug which caused the first letter of some overflowing cells to overwrite the row number.
- V0.5 Beta
- Text cells now only overflow into empty cells.
- Fixed problems with moving the cell highlighter between wide columns.
- Cell highlighter no longer obscures overflowed text cells.
- Stopped crashes when too many cells evaluated.
- Holding down 2ND while scrolling now moves the cursor 4 times as quickly.
- Fixed version errors when opening CSpread files with the Excel add-in.
- Fixed further problems with opening large CSpread files with the Excel add-in.
- Made evaluated formulae display the same as normal numeric cells.
- Fixed bug which caused wrong answers when more than two decimal numbers were used in a formula.
- Fixed bug with the save dialog file name highlighter.
- V0.4 Beta
- Stopped garbage sometimes appearing on the last row of the spreadsheet.
- Added feature to automatically add up to 254 rows to the spreadsheet.
- Added feature to automatically remove blank rows at the end of the spreadsheet.
- MAJOR FEATURE - Added support for formulae, and their evaluation.
- Improved key repeat speed option.
- Added formulae support to the Excel add-in.
- 2ND key now works like a "Shift" key instead of "Caps Lock".
- Numeric cells are now right justified, and don't overflow into the adjacent cells.
- V0.3 Alpha
- Corrected save dialog title (previously displayed "Load File").
- Added feature to make sure that numbers don't have a decimal point after an exponent sign.
- Improved number conversion routine to correctly handle numbers equalling zero.
- Numeric cells in Excel spreadsheets are now correctly saved.
- The Excel add-in no longer crashes if you try to open or save a file when a workbook isn't open.
- The Excel add-in now correctly calculates the checksum for large CSpread files.
- The entire options menu code and data has been moved to the library file (CSprdLib), to free space in the main program file. Options are still saved.
- Made the key repeat speed option provide less erratic repeat speeds.
- V0.2 Alpha
- Added support for - (negation) sign.
- Added support for E (exponent) character.
- Improved the number checking system (re-wrote it almost from scratch!).
- Fixed bug that caused the decimal point to be misplaced in large numbers.
- Added recognition for numbers beginning with spaces.
- Added feature to alter column widths.
- Added feature to cancel any changes made to a cell by pressing EXIT.
- Limited exponent values to within the range -999 to +999.
- Added option to alter key repeat delay.
- Added automatic saving of options on exit, unless the file has been compressed.
- V0.1 Alpha
- The first released version.
THANKS TO...
- Alan Baily - For ASM86
- Matt Johnson - For the Unofficial TI-86 FAQ
- Joshua Grams, "Matt2000" and everyone on assembly-86@lists.ticalc.org - For their ROM call lists
- Tim Singer - For his TI-86 variable format guide
- Whoever wrote RAM86
- Alan Bailey - For 86ports.txt
- Matthew Shepcar - For Rascall - long may it live!
- The authors of Usgard - For file header list
- Everyone who's sent me e-mail with suggestions or comments
- Anyone else I forgot to mention
E-mail me if you have any suggestions for new features, changes to the interface, bug reports, general comments, etc.