Closed rm-hull closed 9 years ago
LITERAL is defined (as a primitive), along the lines:
LITERAL
: LITERAL ( n -- ) compile (lit) , ; immediate
When used to implement [CHAR]:
[CHAR]
: [CHAR] ( <char> -- char , for compile mode ) char [compile] literal ; immediate
Which we can then test with a trivial definition:
: f [char] F ;
yields the following disassembly:
00004828: 58 71 11 00 |Xq..| NEST 0000482c: 70 ff 00 00 |p...| (LIT) 00004830: 46 00 00 00 |F...| 00004834: 90 71 11 00 |.q..| , 00004838: 74 71 11 00 |tq..| UNNEST
Using LITERAL for this seems incorrect, or at least should be used with a different compiler-controlling word
LITERAL
is defined (as a primitive), along the lines:When used to implement
[CHAR]
:Which we can then test with a trivial definition:
yields the following disassembly:
Using
LITERAL
for this seems incorrect, or at least should be used with a different compiler-controlling word