On Tue, Mar 3, 2015 at 8:12 AM, Greg King <greg.king5@verizon.net> wrote: >> I have both ROM files. Here's the output of 'cmp -l' on them: >> >> 3297 251 40... >> 16257 204 205 >> >> The first column is decimal; the 2nd (-04) and 3rd (-05) columns are >> octal. >> Whoever made 'cmp -l' work that way need to have their heads examined. It's surely intentional... (from BSD's cmp.c) printf("%6ld %3o %3o\n", byte, *C1, *C2); > The first column makes sense; it's the file offsets (byte counts), not > addresses. The other columns are a legacy from the origin of Unix (on a DEC > PDP minicomputer where octal numbers were more useful than hexadecimal > ones). It's a pity that the maintainers don't understand what is implied by > the fact that no one uses PDPs anymore. Octal was favored over hex on other architectures too (PDP-8, 8080...); It was common in the early 1970s, but the joy of UNIX is it's not hard to take a decades-old tool and update/enhance it. https://retrobsd.googlecode.com/svn-history/r549/trunk/src/cmd/cmp.c (change line 134 to printf("%08lx %02x %02x\n", byte, *C1, *C2); ) -ethan Message was sent through the cbm-hackers mailing listReceived on 2015-03-03 18:00:05
Archive generated by hypermail 2.2.0.