char input
[130] ; /* term input buffer */
int count
, dskoff
, error
;
* Stand-alone program to dump RX11 floppy disk to VAX LSI console
* Use specifies start sector(from 0) and no. of sectors.
putlin("fdump : floppy-to-console hex dump") ;
putstr("start 128-byte block no. : ") ;
if (dskoff
< 0) goto fini
;
if (dskoff
> MAXSEC
-1) goto doff
;
putstr("no. blocks : ") ;
if (count
< 0) goto gknt
;
if (count
== 0) count
= 1 ;
while ((error
== 0) && (count
--)) {
if (flrs(dskoff
,bufptr
)) {
putlin("floppy i/o error") ;
dskoff
++ ; /* next block */
bufptr
= (char *)(((int)&end
+511) & 017777777000) ;
* Print 128 bytes on VAX LSI console as hex
* Translate bytes in 'bufptr[]' to hex char's
* and out to console, 64 char's per line.
char tmp
[258] , ltmp
[65] ;
hp
= "block # \0\0\0\0\0\0\0" ;
hxcnvt(bufptr
,128,tmp
) ; /* convert bytes to hex char's */
for (i
= 0,addr
= 0 ; (i
< 256); i
+=64,addr
+=64 ) {
for ( k
= 32 ; k
; k
--) {
register char *in
, *out
;
* Convert 'knt' bytes in char array 'in' to 'knt*2'
* hex char's and store in char array 'out'.
register unsigned int bit4
, byte
;
(*out
++) = (bit4
<10?bit4
+0x30:bit4
+0x57) ;
(*out
++) = (bit4
<10?bit4
+0x30:bit4
+0x57) ;