feat(v4): 2! 2@ 2, store a double as FORTH-83 says -- the high cell at the lower address (#189)

Captain Bob, 2026-11-14: "Yes, FORTH-83's layout". FORTH83.TXT, "number": "The address of the least
significant 16 bits is two greater than the address of the most significant 16 bits." v4 stored the low
cell first, as v3. dict.f18 (2,) and words.f18 (2@ 2!); test_host_dict.c and test_host_quit.c to the new
layout. POST 539/539; v4 test-64/32 dict and quit pass. Not pushed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
This commit is contained in:
Claude
2026-11-14 03:31:04 +00:00
parent 0c36693099
commit 3338abdc38
4 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -801,7 +801,7 @@ static const transcript script[] = {
{ "1 2 3 4 5 6 2ROT . . . . . .\n", "2 1 6 5 4 3 ok\nok> ", 1 },
{ ": T 1 2 2>R 2R@ 2R> . . . . ; T\n", "2 1 2 1 ok\nok> ", 1 },
{ "TRUE . FALSE . 5 INVERT . NOP\n", "-1 0 -6 ok\nok> ", 1 },
{ "VARIABLE X 0 , 11 22 X 2! X 2@ . . X @ .\n", "22 11 11 ok\nok> ", 1 },
{ "VARIABLE X 0 , 11 22 X 2! X 2@ . . X @ .\n", "22 11 22 ok\nok> ", 1 }, /* the high cell at X: FORTH-83 */
{ "VARIABLE Y 10 Y ! 3 Y -! Y @ .\n", "7 ok\nok> ", 1 },
{ "0 0<> . 5 0<> . -5 0<> .\n", "0 -1 -1 ok\nok> ", 1 },
{ "0 0> . 5 0> . -5 0> .\n", "0 -1 0 ok\nok> ", 1 },