aboutsummaryrefslogtreecommitdiff
path: root/unix/boot/spp/rpp/ratlibr/dsdump.r
diff options
context:
space:
mode:
authorJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
committerJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
commit40e5a5811c6ffce9b0974e93cdd927cbcf60c157 (patch)
tree4464880c571602d54f6ae114729bf62a89518057 /unix/boot/spp/rpp/ratlibr/dsdump.r
downloadiraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'unix/boot/spp/rpp/ratlibr/dsdump.r')
-rw-r--r--unix/boot/spp/rpp/ratlibr/dsdump.r34
1 files changed, 34 insertions, 0 deletions
diff --git a/unix/boot/spp/rpp/ratlibr/dsdump.r b/unix/boot/spp/rpp/ratlibr/dsdump.r
new file mode 100644
index 00000000..276290db
--- /dev/null
+++ b/unix/boot/spp/rpp/ratlibr/dsdump.r
@@ -0,0 +1,34 @@
+include defs
+
+# dsdump --- produce semi-readable dump of storage
+
+ subroutine dsdump (form)
+ character form
+
+ DS_DECL(Mem, 1)
+
+ pointer p, t, q
+
+ t = DS_AVAIL
+
+ call remark ("** DYNAMIC STORAGE DUMP **.")
+ call putint (1, 5, ERROUT)
+ call putch (BLANK, ERROUT)
+ call putint (DS_OHEAD + 1, 0, ERROUT)
+ call remark (" words in use.")
+
+ p = Mem (t + DS_LINK)
+ while (p != LAMBDA) {
+ call putint (p, 5, ERROUT)
+ call putch (BLANK, ERROUT)
+ call putint (Mem (p + DS_SIZE), 0, ERROUT)
+ call remark (" words available.")
+ q = p + Mem (p + DS_SIZE)
+ while (q != Mem (p + DS_LINK) & q < Mem (DS_MEMEND))
+ call dsdbiu (q, form)
+ p = Mem (p + DS_LINK)
+ }
+
+ call remark ("** END DUMP **.")
+ return
+ end