1
\ tag: initialize builtin functionality
3
\ Copyright (C) 2003 Stefan Reinauer
5
\ See the file "COPYING" for further information about
6
\ the copyright and warranty status of this work.
11
: init-builtin-terminal ( -- )
13
\ define key, key? and emit
14
['] (key) ['] key (to)
15
['] (key?) ['] key? (to)
16
['] (emit) ['] emit (to)
18
\ 2 bytes band guard on each side
20
#ib @ dup ( -- ibs ibs )
21
cell+ alloc-mem ( -- ibs addr )
22
dup -rot ( -- addr ibs addr )
24
/w + ['] ib (to) \ assign input buffer
26
0 ['] source-id (to) \ builtin terminal has id 0