-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwdump_fs
42 lines (30 loc) · 1.08 KB
/
wdump_fs
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
36
37
38
39
40
41
42
\ wdump_fs
\ This file is part of Sfera, a library for SuperForth
\ http://programandala.net/en.program.sfera.html
\ Author: Marcos Cruz (programandala.net)
\ ==============================================================
\ License
\ You may do whatever you want with this work, so long as you
\ retain the copyright/authorship/acknowledgment/credit
\ notice(s) and this license in all redistributed copies and
\ derived works. There is no warranty.
\ ==============================================================
\ History
\ 2016-01-06: Code extracted from <boot.fs>.
\
\ 2016-02-08: Removed `end-of-file`.
\
\ 2016-02-10: Added `require dump_address_fs`, after the changes
\ in <boot_fs>.
\ ==============================================================
require dump_address_fs
: (wdump) ( a n -- )
0 do
i 4 mod 0= if dup .dump-address then
dup @ 16hex. cell+
loop drop ;
\ Show the contents of _n_ cells starting from _a_.
: wdump ( a n -- )
?dup if (wdump) else drop then ;
\ Show the contents of _n_ cells starting from _a_.
\ vim: filetype=superforthsfera