ficl: add xemit word
While emit will output one byte on screen, the xemit will output xchar. See: http://forth-standard.org/standard/xchar/XEMIT
This commit is contained in:
parent
d15e810db9
commit
938cae327c
@ -199,6 +199,14 @@ set-current \ stop hiding words
|
|||||||
a-addr 0 b-addr b-u strcat
|
a-addr 0 b-addr b-u strcat
|
||||||
;
|
;
|
||||||
|
|
||||||
|
: xemit ( xchar -- )
|
||||||
|
dup 0x80 u< if emit exit then \ special case ASCII
|
||||||
|
0 swap 0x3F
|
||||||
|
begin 2dup u> while
|
||||||
|
2/ >r dup 0x3F and 0x80 or swap 6 rshift r>
|
||||||
|
repeat 0x7F xor 2* or
|
||||||
|
begin dup 0x80 u< 0= while emit repeat drop
|
||||||
|
;
|
||||||
|
|
||||||
previous \ lose hidden words from search order
|
previous \ lose hidden words from search order
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user