Thornton 2 dot Com

geoProgrammer Errata

A geoProgrammer errata file dated 1988-01-25 has been circulating around the Internet since the 1990s, but in the form of a geoWrite document. My copy came from /pub/cbm/geos/programming/ at the CBM Archives. The first part of this page is my transcription of that document into HTML, with only cosmetic changes.

Some copies of geoProgrammer came with an errata document dated 1988-02-18 slipped into the manual. The second part of this page is my transcription of that document into HTML.


SUBJ: Errata II
S#: 79063
  1. There is a problem with the linker and VLIR files. We are working on a patch for this. Be careful deleting VLIR files created with GeoLinker in the meantime.

  2. Local labels: If you have 255 or more bytes of code and/or bitmaps between any two global labels, then you cannot use local labels for the rest of that assembly. Yes, this is a bug. Solutions: Keep your routines short, so you have global labels frequently, and if you have any large bitmaps, place them at the end of your assembly file, or assemble them separately.

  3. The .header directive actually checks the following 12 lines, not 11 as stated in the manual. The 12th line is a 20-character null-terminated author name. See the example on page 5-53.

  4. Make sure each file you assemble has a .include geosSym, so the linker does not have to work as hard.

  5. You will get a warning if you write:

    lda #TRUE

    because TRUE = -1, which is $ffff, a word value. Use this instead:

    lda #[TRUE

  6. Change the .psect $5000 in the SamVlir.lnk file to .psect $3000. This will allow the sample vlir to run with the mini-debugger.

  7. Change the "VERTICAL" items under MenuTable in SamSeq and SamVlirRes to "SUB-MENU", where "-" is an underline character.

  8. GeoAssembler will not attempt to substitute absolute mode addressing when a zero page operand is used with an instruction that does not support zero-page addressing. Example:

    jmp $30

    will produce an error. We will fix this.

  9. If the assembler or linker terminate after a disk error, do not attempt to open or use the newly created files (.rel, .err, .dbg, .sym). They have not been properly closed. Validate the disk and delete those files. We have fixed this, it will be in the upgrade.

  10. Do not make any forward references to zero page variables or constants. Make sure you define zero page variables and constants before the code which uses them. There is a bug which will cause all of your labels to be offset by an amount if you do this. An easy way for this to happen is when you write:

    lda CONSTANT

    when you really mean to do:

    lda #CONSTANT

    If CONSTANT is forward referenced and it is less than $100, the assembler will see this as a forward reference to a zero-page variable and generate the wrong object code (label references may be off by one or more bytes).

geoProgrammer Errata

We urge you to read these notes in their entirety. They describe late improvements, corrections, and problems with versions 1.0 and 1.1 of geoProgrammer.

Problems Common to geoAssembler and geoLinker

Intermediate Files After a Disk Error

If geoAssembler or geoLinker terminates after a disk error, it does not attempt to close or remove any newly-created files (.rel, .err, etc.), which means you cannot, for example, view the .err in geoWrite. It is best to delete these intermediate files and validate the disk.


geoAssembler and geoLinker do not properly handle Preference Manager color settings. If you use colors other than the default dark grey on white, you will be able to see the symbol table insertion sort in the screen area (fun to watch, but not harmful).


Pass1 Flag

Misuse of the Pass1 flag is the single-most problematic aspect of geoAssembler. If you get errors you don't understand or you get the mysterious "Hidden error found," remove the Pass1 conditionals from your program. By eliminating equates and macros from the second pass of the assembly you are bypassing much of the sophisticated error-checking offered by geoAssembler in exchange for faster assembly. Use this capability carefully and judiciously.


Pages 5-50 through 5-53: the .header directive does syntax checking on 12 fields as opposed to the 11 mentioned in the manual. The 12th field is the authorname field and must be exactly 20 bytes. The example on page 53 has this field correctly shown.

geoAssembler Addressing Mode Substitution

geoAssembler will not attempt to substitute absolute mode addressing when a zero-page operand is used with an instruction that does not support zero-page addressing. For example, geoAssembler would flag an addressing mode error on eor $30,y because the eor instruction does not have a zero-page indexed with Y addressing mode even though there is an absolute indexed with Y version of the instruction which could use $30 as a two-byte absolute address ($0030). Future versions of geoAssembler will attempt to substitute absolute mode addressing when no zero-page equivalent exists.

Using Relocatable Symbols in Immediate Mode and .byte Expressions

When using a relocatable symbol (a psect symbol, for example) in the context of an immediate mode address or a .byte directive, the symbol must be preceded by a low- or high-byte operator ([ or ]). Otherwise, incorrect object code will be generated.


label:                   ;psect labels are relocatable
      lda   #label       ;this will generate bad object code
      sta   lowByte
      .byte label        ;this will also


label:                   ;psect labels are relocatable
      lda   #[label      ;the will generate the correct obj code
      sta   lowByte
      .byte [label       ;here, too

Incorrect Line Numbers in Error Messages

geoAssembler does not always print the correct line and page numbers in its error messages. The line number reflects the number of lines from the top of the geoWrite page after macro expansion. Also, when geoAssembler detects a branch out of range error, it often writes out the incorrect page number (although the line number is usually correct). Check the specified line number on the pages preceding the page specified in the error message.

Local Regions Larger Than 250 Bytes

If any local region (the are between two successive global labels) exceeds 250 bytes, there is a slight chance that code buffer will overwrite the beginning of the external reference buffer. This bug can be avoided in most cases by inserting globals every 70 or so instructions. Also, avoid using large (>250 bytes) .block directives in a psect section.

The * Symbol

The * symbol used in an expression will evaluate to the current value of the active section counter. At this time, it always evaluates to the value of the current psect counter, which means it does not work correcting in zsect or ramsect sections.

Example usage:

String:     .byte       "This is a string...", NULL

StringLen   == (* - String)   ;length of string

Bitmap Decompaction

geoAssembler will not correctly decompact bitmaps that are shorter than 18 pixels. Also, bitmaps that use the bigcount format will not be handled correctly (no Berkeley Softworks application or desk accessory uses the bigcount format, so this is not much of a problem).


With One Drive Systems

geoLinker cannot generate a viewable symbol table on one drive systems (a RAM-expansion unit configured as a RAMdisk counts as a second drive); the dialog box at the bottom of page 4-19 will never be shown.

Module Symbol Table Overflow

If more than one .rel file is being linked into a single module and each file .include's the geosSym file, the linker's symbol table buffer will soon overflow because the entire repetoire of symbols will be sent to the linker with each .rel file. Add .noeqin / .eqin around all but one of the .include geosSym's.

Maximum of Ten .rel Files in a Single Module

A single module cannot have more than ten .rel files. However, geoLinker will not correctly flag this error. Be sure to have no more than ten .rel files in a single module.

.rel Filenames

geoLinker does not correctly flag errors when the .rel file names are mistyped in the linker command file. Check these carefully.

GEOS 1.2 and CBM Applications

geoLinker does not correctly delete header blocks from CBM files under GEOS 1.2. Upgrade to GEOS 1.3 if using geoProgrammer to create CBM applications.

.dbg Zero-page Symbols

geoLinker sometimes leaves the zsect bit set in zero page symbols it sends to the debugger. This results in a graphic character printed in the third character position of the symbol in the debugger. Use the debugger ? wildcard to circumvent this problem.


Write-protected Files

The geoDebugger file-selection dialog box will not display write-protected files.


The sample application cannot be rerun with a go $400 or a go StartApp. Also, page 7-11 is incorrect in stating that the runto command will briefly flash the screen.

Super-Debugger Keystroke Correction

page 8-1: the £ character is created by typing the [£] key (without the [C=] key) on the Commodore keyboard.

Super-debugger Runto Command

page 8-43: the runto command is based on p (proceed), not go as stated in the manual. The GEOS screen will only be shown if opt 5 is enabled.

Mini-debugger Rt Command

page 9-23: the rt command will only display the GEOS screen if this option has been enabled with the g1 command.

Appendix C: Debugger Isolation and off-limits area

In addition to the GEOS routines mentioned on page A-15, the super-debugger configuration uses the StashRAM, FetchRAM, and SwapRAM RAM-expansion unit routines and expects GEOS's interrupt code to be intact. Also, the first off-limits area $350 to $3ff has been extended to the range $340 to $3ff.

Sample Files

geosMemoryMap File

The APP_RAM == $0400 equate in the geosMemoryMap file listed in the manual has been changed to APP_RAM = $0400 (double equal-sign changed to single equal-sign) so that the application's label at this address will be visible in the debugger.

Sample Applications and the Mini-debugger

The sample VLIR and sample sequential application will not work correctly with the mini-debugger because the variable spaces were inadvertently placed in the off-limits RAM at $5000. Chang the .psect $5000 in the SamVlir.lkn and SamSeq.lnk file to .psect $3000.

Sample Application Menus

The menu data structure in the SamSeq file under MenuTable has two lines which read

      .byte VERTICAL         ;type of menu

These should be changed to

      .byte SUB_MENU         ;type of menu

The same error exists in the SamVlirRes file (under MenuTable), except there are three occurrences instead of two.