[OpenBIOS] [PATCH 1/3] Add peek/poke hooks
Bob Breuer
breuerr at mc.net
Mon Aug 12 03:06:56 CEST 2013
Add hooks for hardware specific fault handlers for the peek and poke commands.
Signed-off-by: Bob Breuer <breuerr at mc.net>
---
openbios-devel/forth/device/other.fs | 22 ++++++++++++++++------
1 file changed, 16 insertions(+), 6 deletions(-)
diff --git a/openbios-devel/forth/device/other.fs b/openbios-devel/forth/device/other.fs
index f221a25..4746017 100644
--- a/openbios-devel/forth/device/other.fs
+++ b/openbios-devel/forth/device/other.fs
@@ -20,28 +20,38 @@ hex
\ 5.3.7.1 Peek/poke
+defer (peek)
+:noname
+ execute true
+; to (peek)
+
: cpeek ( addr -- false | byte true )
- c@ true
+ ['] c@ (peek)
;
: wpeek ( waddr -- false | w true )
- w@ true
+ ['] w@ (peek)
;
: lpeek ( qaddr -- false | quad true )
- l@ true
+ ['] l@ (peek)
;
+defer (poke)
+:noname
+ execute true
+; to (poke)
+
: cpoke ( byte addr -- okay? )
- c! true
+ ['] c! (poke)
;
: wpoke ( w waddr -- okay? )
- w! true
+ ['] w! (poke)
;
: lpoke ( quad qaddr -- okay? )
- l! true
+ ['] l! (poke)
;
--
1.7.10.4
More information about the OpenBIOS
mailing list