/* Copyright (c) 1982 Regents of the University of California */
static char sccsid
[] = "@(#)printdata.c 1.1 %G%";
* print contents of data addresses in octal
* There are two entries: one is given a range of addresses,
* the other is given a count and a starting address.
* print words from lowaddr to highaddr
printdata(lowaddr
, highaddr
)
if (lowaddr
> highaddr
) {
error("first address larger than second");
for (addr
= lowaddr
; addr
<= highaddr
; addr
+= sizeof(int)) {
dread(&val
, addr
, sizeof(val
));
if (++count
>= WORDSPERLINE
) {
* print count words starting at address
printdata(addr
, addr
+ (count
- 1)*sizeof(int));