It sounds like a create does ( Builds Does ) or whatever works for your Forth.
It you want it to be smart to deal with numbers larger and smaller than 255 you could deal with as well.
Dwight
How do I enter a 1-byte literal from the keyboard?
Re: How do I enter a 1-byte literal from the keyboard?
For fig, I think this works:
: C-CONSTANT
<BUILDS C,
DOES> C@ ;
It can be faster but this is about as simple as I can get.
Dwight
: C-CONSTANT
<BUILDS C,
DOES> C@ ;
It can be faster but this is about as simple as I can get.
Dwight