Ad Space — Top Banner

?OM ERROR

Tandy / Radio Shack TRS-80

Severity: Moderate

What Does This Error Mean?

?OM ERROR means Out of Memory — your BASIC program has used all available RAM. The TRS-80 has limited memory (16KB to 64KB depending on model and configuration). Shorten your program, reduce arrays, or remove REM statements to free space.

Affected Models

  • TRS-80 Model I
  • TRS-80 Model II
  • TRS-80 Model III
  • TRS-80 Model 4
  • TRS-80 Color Computer (CoCo)
  • MAME TRS-80 emulator
  • trs80gp emulator

Common Causes

  • Program too large for available RAM
  • Large arrays consuming most of the memory
  • Too many string variables — each string uses memory for its content
  • Deeply nested FOR-NEXT loops or GOSUB calls exhausting the stack
  • Machine on a lower memory configuration (16KB Model I or 4KB CoCo)

How to Fix It

  1. Type PRINT FRE(0) to check available free memory.

    FRE(0) shows how many bytes remain for your program and data. If the number is very small or negative, you are at the limit.

  2. Remove REM statements to save memory.

    Every REM line is stored in memory. In a tight program on a 16KB machine, removing all comments can free hundreds of bytes. You can always keep a separate listing on paper.

  3. Shorten variable names and combine multiple short lines.

    Each line has overhead. Combining short statements with colons saves memory: 10 A=1 : B=2 : C=3 uses less memory than three separate lines.

  4. Reduce array sizes or use CLEAR to set string space.

    DIM A(1000) uses significant memory. The CLEAR command sets aside string space — CLEAR 500 reserves 500 bytes for strings. Reducing the CLEAR value or array sizes frees memory for program code.

  5. Upgrade RAM if possible (real hardware).

    The Model I can be expanded from 16KB to 48KB with aftermarket RAM boards. The Model III supports up to 48KB. The CoCo can go from 4KB or 16KB to 64KB with an upgrade.

Frequently Asked Questions

How much memory does a TRS-80 have for BASIC programs?

The Model I with Level II BASIC and 16KB has about 12KB free for programs. With the full 48KB expansion, roughly 42KB is available. The Model II had 64KB but the operating system used more, leaving around 50-55KB for BASIC.

Was the TRS-80 Model II really Eitan's first computer?

Yes! The TRS-80 Model II was a business-class machine with an 8-inch floppy drive, 64KB RAM, and a Z80A CPU running at 4 MHz. It was a serious workhorse — more business-oriented than the Model I, with a built-in 12-inch green screen monitor.