aboutsummaryrefslogtreecommitdiff
path: root/unix/boot/spp/rpp/ratlibr/dsdbiu.r
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
commitfa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch)
treebdda434976bc09c864f2e4fa6f16ba1952b1e555 /unix/boot/spp/rpp/ratlibr/dsdbiu.r
downloadiraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz
Initial commit
Diffstat (limited to 'unix/boot/spp/rpp/ratlibr/dsdbiu.r')
-rw-r--r--unix/boot/spp/rpp/ratlibr/dsdbiu.r45
1 files changed, 45 insertions, 0 deletions
diff --git a/unix/boot/spp/rpp/ratlibr/dsdbiu.r b/unix/boot/spp/rpp/ratlibr/dsdbiu.r
new file mode 100644
index 00000000..99c2acc0
--- /dev/null
+++ b/unix/boot/spp/rpp/ratlibr/dsdbiu.r
@@ -0,0 +1,45 @@
+include defs
+
+# dsdbiu --- dump contents of block-in-use
+
+ subroutine dsdbiu (b, form)
+ pointer b
+ character form
+
+ DS_DECL(Mem, 1)
+
+ integer l, s, lmax
+
+ string blanks " "
+
+ call putint (b, 5, ERROUT)
+ call putch (BLANK, ERROUT)
+ call putint (Mem (b + DS_SIZE), 0, ERROUT)
+ call remark (" words in use.")
+
+ l = 0
+ s = b + Mem (b + DS_SIZE)
+ if (form == DIGIT)
+ lmax = 5
+ else
+ lmax = 50
+
+ for (b = b + DS_OHEAD; b < s; b = b + 1) {
+ if (l == 0)
+ call putlin (blanks, ERROUT)
+ if (form == DIGIT)
+ call putint (Mem (b), 10, ERROUT)
+ elif (form == LETTER)
+ call putch (Mem (b), ERROUT)
+ l = l + 1
+ if (l >= lmax) {
+ l = 0
+ call putch (NEWLINE, ERROUT)
+ }
+ }
+
+ if (l != 0)
+ call putch (NEWLINE, ERROUT)
+
+ return
+ end