feat(v4.0.0): the editor, redone in FORTH; COLD WARM PAGE VERSION DEFER
- capsule/editor.fth: the block editor as FORTH source, which the node compiles itself. It is a vocabulary, EDITOR, used at the ordinary prompt: n EDIT, then L N B T P E D S H R I WIPE DONE. v3's EDIT, a shell of its own, is not carried over (ruled 2026-10-05); v3's L S and SHOW are kept in FORTH as they were, with COPY. - system.v4: COLD (the system as the loader left it), WARM, PAGE, VERSION, 79-STANDARD (FORTH-79: silent), and DEFER IS DEFER@ as v3. - input.v4: where words are split at blanks a zero byte reads as a blank, so a block never written, or filled a line at a time, loads cleanly. - tests/test_host_quit.c: the editor's source fed to the prompt line by line, every command on empty and full screens, what reaches storage; the system words; deferred words. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
c8dc14897c
commit
a1afb44598
@@ -64,6 +64,7 @@
|
||||
#define SRC (BVARS + 8)
|
||||
#define SRC_HOOK (BVARS + 9)
|
||||
#define STORAGE_REG (BVARS + 10)
|
||||
#define BOOT_CELLS (BVARS + 14) /* (BOOT): DP and LATEST as the loader left them, 2 cells */
|
||||
#define BUF0_W (BVARS - 2 * 256) /* the two block buffers, 256 cells each */
|
||||
#define BUF1_W (BUF0_W + 256)
|
||||
#define QVARS (BUF0_W - 4) /* (Q): quit.v4, system.v4 and blocks.v4, 4 cells */
|
||||
@@ -128,6 +129,7 @@ static int host_load(v4_text *tx, v4_node *n, const char *const *files, unsigned
|
||||
v4_text_constant(tx, "(W)", WVARS);
|
||||
v4_text_constant(tx, "(X)", XVARS);
|
||||
v4_text_constant(tx, "(B)", BVARS);
|
||||
v4_text_constant(tx, "(BOOT)", BOOT_CELLS);
|
||||
v4_text_constant(tx, "SCR", SCR);
|
||||
v4_text_constant(tx, "BLK", BLK);
|
||||
v4_text_constant(tx, "(SRC)", SRC);
|
||||
|
||||
Reference in New Issue
Block a user