On Sun, Oct 09, 2022 at 09:41:21PM +0200, BALATON Zoltan wrote:
On Sun, 25 Sep 2022, BALATON Zoltan wrote:
Define the r[bwl][!@] register access words as io[bwl][!@] for now. I'm not sure this is correct.
(If these are FCode tokens I don't get when the big endian versions could be used as these should only be called from FCode so not sure this change of rokens is really necessary and we could just do little endian access in these register access words.)
And the user interface rb@ etc. should use get-token (or equivalent):
rb@ (user interface) ( addr -- byte ) Fetch a byte from device register at addr.
Compilation: ( -- ) Perform the equivalent of the phrase: h# 230 get-token if execute else compile, then
Interpretation: ( addr -- byte ) Perform the equivalent of the phrase: h# 230 get-token drop execute
NOTE— A bus device can substitute (see set-token) a bus-specific implementation of rb@ for use by its children. This is sometimes necessary to correctly implement its semantics with respect to bit-order and write-buffer flushing. The given user interface semantics of rb@ ensure that such substitutions are visible at the user interface level.
This is one of the historical weirdosities of OF :-)