summaryrefslogtreecommitdiffstats
path: root/qemu/roms/SLOF/board-qemu/slof/dev-null.fs
blob: d0ffad6b93eb8f887d003b19878c0755081f6ea8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
\ Introduce a dummy console that will eat away all chars and make all
\ the components dependent on stdout happy.

new-device
" devnull-console" device-name

: open true ;
: close ;

: write ( adr len -- actual )
  nip
;

: read  ( adr len -- actual )
  nip
;

: setup-alias
    " devnull-console" find-alias 0= IF
        " devnull-console" get-node node>path set-alias
    ELSE
        drop
    THEN
;

: dummy-term-emit drop ;
: dummy-term-key  0 ;
: dummy-term-key? FALSE ;

' dummy-term-emit to emit
' dummy-term-key  to key
' dummy-term-key? to key?

setup-alias
finish-device