1 \ tag
: Other FCode functions
3 \ this
code implements
IEEE 1275-1994 ch
. 5.3.7
5 \
Copyright (C) 2003 Stefan Reinauer
7 \
See the file
"COPYING" for further information about
8 \
the copyright and warranty status
of this
work.
11 \
The current diagnostic setting
16 \
5.3.7 Other FCode functions
23 : cpeek
( addr
-- false | byte true )
27 : wpeek
( waddr
-- false | w true )
31 : lpeek
( qaddr
-- false | quad true )
35 : cpoke
( byte addr -- okay
? )
39 : wpoke
( w waddr
-- okay
? )
43 : lpoke
( quad qaddr
-- okay
? )
48 \
5.3.7.2 Device-register access
50 : rb
@ ( addr -- byte )
56 : rl
@ ( qaddr
-- quad )
59 : rb
! ( byte addr -- )
65 : rl
! ( quad qaddr
-- )
70 h
# 22e get-token if , else execute then
72 h
# 22e get-token drop execute
78 h
# 22f get-token if , else execute then
80 h
# 22f get-token drop execute
89 dummy-msecs
dup 1+ to dummy-msecs
94 begin dup get-msecs
< until
102 : user
-abort
( ... -- ) ( R: ... -- )
106 \
5.3.7.4 System information
107 0003.0000 value
fcode-revision
( -- n )
109 : mac
-address
( -- mac
-str mac
-len
)
113 \
5.3.7.5 FCode self-test
114 : display
-status
( n -- )
117 : memory
-test
-suite
( addr len
-- fail
? )
123 : diagnostic
-mode
? ( -- diag
? )
124 \
Return the NVRAM diag
-switch
? setting
128 \
5.3.7.6 Start and end.
130 \
Begin program
with spread
0 followed by
FCode-header
.
137 \
Begin program
with spread
1 followed by
FCode-header
.
144 \
Begin program
with spread
2 followed by
FCode-header
.
151 \
Begin program
with spread
4 followed by
FCode-header
.
158 \
Begin program
with spread
1 followed by
FCode-header
.
164 \
Cease evaluating this
FCode program
.
169 \
Cease evaluating this
FCode program
.
174 \
Standard FCode number for undefined
FCode functions.
176 ." undefined fcode# encountered." cr
180 \
Pause FCode evaluation
if desired
; can resume
later.
181 : suspend
-fcode ( -- )
182 \
NOT YET IMPLEMENTED.
186 \
Evaluate FCode beginning at
location addr.
188 \
: byte-load
( addr xt
-- )
189 \ \ this
word is
implemented in feval
.fs
192 \
Set address and arguments
of new device
node.
193 : set
-args
( arg
-str arg
-len
unit-str
unit-len
-- )
197 " decode-unit" ['] $call-parent catch if
201 my-self ihandle>phandle >dn.probe-addr \ offset
202 begin depth r@ > while
207 my-self >in.arguments 2@ free-mem
208 strdup my-self >in.arguments 2!
212 s" dma-alloc" $call-parent