~pmdj/ubuntu/trusty/qemu/2.9+applesmc+fadtv3

« back to all changes in this revision

Viewing changes to roms/openbios/forth/bootstrap/builtin.fs

  • Committer: Phil Dennis-Jordan
  • Date: 2017-07-21 08:03:43 UTC
  • mfrom: (1.1.1)
  • Revision ID: phil@philjordan.eu-20170721080343-2yr2vdj7713czahv
New upstream release 2.9.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
  ;