mk90.commands

Command edit

Open the text editor, with BASIC macros for .bas files.

Synopsis

edit [file]

Ordinary invocation: foreground child, PID 3; the shell waits. Not an allowed pipe producer.

Parameters

ParameterMeaning
fileOptional existing or new regular file path; the parent must exist.

Description

Loads a named file, or starts it empty if absent. The editor retains its absolute pathname for saving. With no path, opens an unnamed RAM buffer; saving then reports status 16 rather than asking for a filename.

The buffer holds at most 1,280 bytes. The status row shows the filename, * when changed, [A]/[a], and BAS/FK as applicable. Save is SU, then S; exit is SU, then Q. Unsaved changes require a YES confirmation before discarding.

A case-insensitive .bas suffix enables factory-style FK word insertion. The inserted word remains editable text; it is not executed.

Examples

edit /mnt/smp1/demo.bas
edit /mnt/smp1/notes.txt
edit

Limits and side effects

  • No save-as, undo, search/replace or syntax checking. Larger files are rejected rather than truncated. Opening a ROM file permits viewing/editing in RAM, but saving to ROM fails.

Status and diagnostics

Success is status 0. Relevant status codes: 1, 2, 3, 4, 5, 7, 8, 9, 14, 15, 16, 20. See the diagnostic reference.

See also

mbc · less · cp · Shell syntax