Comparing two System Areas...

53 views
Skip to first unread message

William Cattey

unread,
May 14, 2020, 10:20:29 PM5/14/20
to
For my automated build process, I want to compare the bootable device images to confirm there were no unexpected changes.

I've got a python script under development (that uses the same underlying library
for SIMH that my script runner uses). It can extract the files from an OS/8 device image into the POSIX directory structure for the system hosting SIMH, and then run POSIX utilities like diff on it.

The System Area is special. Very special.

Block 0 is the boot block.
Blocks 7 thru 67 (octal) are used, but some of them are transient:
Blocks 27-50 (octal) are system scratch blocks and are guaranteed to be non-deterministically different as soon as you boot that image.

PIP /Y will enable you to copy out "The System Area." I've read the code to figure out what it's doing, but there aren't enough comments, and the magic constants used willy-nilly have left me unenlightened. The file created by PIP is 50 (decimal) blocks in size.

Really, what I want to do is compare a subset of the system area:

Blocks 0, 7-12, 13-26, 51-64, 66-67.

What's a good block-wise dump/compare utility?

OCOMP is file based.
EPIC too.
FUTIL does dump but not compare.

Do I have to open code something in PAL8? Or drive FUTIL dump output into a file that gets compared?

Thoughts?

-Bill

Steve Tockey

unread,
May 17, 2020, 11:04:47 AM5/17/20
to
Bill,
It should not be difficult to write a small program that simply copies the disk blocks you want to compare into a separate file and then run one of the file-based comparators on the two files you generated.


— steve

William Cattey

unread,
May 17, 2020, 11:50:19 PM5/17/20
to
Hi Steve,

Thanks for thinking about this and replying.

It turns out that writing such a program is a bit tricky. However, out of band, I've been in communication with someone who has written such a program. I've tweaked it, and plan to add it to the pidp8 build universe on tangentsoft.com as a tool.

-Bill

K. Krause

unread,
May 18, 2020, 11:00:03 AM5/18/20
to
Hi,

you can use FUTIL to dump single blocks in a textfile. Use formatting
'OCTAL'.
Do this for the different devices, then run OCOMP on these textfiles.
One hint: the text dumps,that FUTIL produces, contain <NUL> characters
between every two characters, as it does'nt store three characters in
two words. It stores one character in one word.
To eliminate these <NUL> characters, make a copy with PIP. PIP
eliminates <NUL> characters in text files.

Klemens



On 15.05.20 04:20, William Cattey wrote:
> For my automated build process, I want to compare the bootable device images to confirm there were no unexpected changes.
>....

Steve Tockey

unread,
May 18, 2020, 5:39:40 PM5/18/20
to
Bill,
There should really be nothing tricky at all about it. Knowing what blocks you want to read off of the system disk, followed by writing them sequentially out as binary data blocks in a new file. I was going to throw something together to do just that, it would easily take me less than half a day. It was, unfortunately, a lower priority than other work I have going on. But since it looks like you've already got the problem solved by other means I might do it some day just as an exercise of curiosity.
Reply all
Reply to author
Forward
0 new messages