Ad Space — Top Banner

Direct command found

Amstrad Amstrad CPC

Severity: Minor

What Does This Error Mean?

Direct command found means a program contains a line without a line number — a statement that can only be typed in direct mode. This usually happens when loading a corrupted program or a file that is not a valid BASIC program. Check that the file is a genuine BASIC program and not a binary or data file.

Affected Models

  • Amstrad CPC 464
  • Amstrad CPC 664
  • Amstrad CPC 6128
  • Amstrad CPC Plus
  • WinAPE emulator

Common Causes

  • Attempting to LOAD or MERGE a file that is not a BASIC program
  • Loading a corrupted BASIC file from disc or tape
  • The file contains a direct-mode command (no line number) within the program data
  • Binary or data file accidentally loaded as BASIC

How to Fix It

  1. Check that you are loading the correct file.

    Use CAT (for disc) to list all files. BASIC programs have no file extension or a .BAS extension. Binary files (.BIN) cannot be loaded as BASIC programs.

  2. Use LOAD instead of MERGE if you want to replace the current program.

    MERGE combines two programs and can produce this error if the merged file has incompatible lines. LOAD clears memory first and loads fresh.

  3. If the file is corrupt, try loading a backup copy.

    Tape and old discs can develop errors over time. If you have a backup, try loading from that instead.

Frequently Asked Questions

What is direct mode on the Amstrad CPC?

Direct mode is when you type a command without a line number and press ENTER. The command executes immediately. Program mode is when commands have line numbers and are stored for later execution with RUN.

Can I fix a corrupted BASIC program?

Sometimes. Try loading the file and typing LIST to see if any lines are visible. You may be able to delete the problematic lines and save the rest. But if the corruption is severe, the program may be unrecoverable.