|
|
1.1 root 1: \ tag: initialize builtin functionality
2: \
3: \ Copyright (C) 2003 Stefan Reinauer
4: \
5: \ See the file "COPYING" for further information about
6: \ the copyright and warranty status of this work.
7: \
8:
9:
10:
11: : init-builtin-terminal ( -- )
12:
13: \ define key, key? and emit
14: ['] (key) ['] key (to)
15: ['] (key?) ['] key? (to)
16: ['] (emit) ['] emit (to)
17:
18: \ 2 bytes band guard on each side
19: 100 #ib !
20: #ib @ dup ( -- ibs ibs )
21: cell+ alloc-mem ( -- ibs addr )
22: dup -rot ( -- addr ibs addr )
23:
24: /w + ['] ib (to) \ assign input buffer
25: 0 fill \ erase tib
26: 0 ['] source-id (to) \ builtin terminal has id 0
27:
28: ;
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.