The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
* [Unix-jun72] Disassembler in progress
@ 2008-04-30 10:21 Warren Toomey
  2008-04-30 13:01 ` [Unix-jun72] ocr'd e03 Brad Parker
  0 siblings, 1 reply; 11+ messages in thread
From: Warren Toomey @ 2008-04-30 10:21 UTC (permalink / raw)


Guys, I'm writing a PDP-11 a.out disassember. I think it will be useful for
a couple of reasons:

 - we will be able to convert the extant 1972 binaries back into some form
   of source code. It won't be as good as the real thing, but it will be
   better than the binary.
 - we have some source code in fragmentary form on the s1 tape, see
   http://minnie.tuhs.org/UnixTree/1972_stuff/. Some of the fragments
   are identifiable, some are not. We might be able to use the
   diassembled binaries to identify some of the fragments, and even
   reconstruct a hybrid original/diassembled version of the source
   for some of the 1972 applications.

Right now, here's what I've got: disassembly of the top of 1972 ls:

    sys        break: 00
    mov        $01,044260
    mov        sp,r5
    mov        (r5)+,043732
    tst        (r5)+
    dec        043732
    mov        043732,043734
    bgt        040056
    mov        $042542,r5
    mov        (r5)+,r4
    cmpb        (r4)+,$055
    bne        040174
    dec        043734

and the top of the frag19 file:

        sys     break; end+512.
        mov     $1,obuf
        mov     sp,r5
        mov     (r5)+,count
        tst     (r5)+
        dec     count
        mov     count,ocount
        bgt     loop
        mov     $dotp,r5
loop:
        mov     (r5)+,r4
        cmpb    (r4)+,$'-
        bne     1f
        dec     ocount

At the moment it's a 1-pass disassembler. I want to make it 2-pass: on the
first pass I will try to identify labels for branches, functions, strings and
variable locations (and given them arbitrary names); on the second pass
I'll print out the instructions with reference to the labels.
None of the binaries have symbol tables, unfortunately.

It's a start, anyway.
	Warren



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2008-05-01 16:23 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-30 10:21 [Unix-jun72] Disassembler in progress Warren Toomey
2008-04-30 13:01 ` [Unix-jun72] ocr'd e03 Brad Parker
2008-04-30 17:38   ` Tim Newsham
2008-04-30 18:49     ` Brad Parker
2008-04-30 19:19       ` Hellwig Geisse
2008-04-30 19:52         ` Tim Newsham
     [not found]     ` <10901.1209581283@mini>
2008-04-30 19:24       ` Tim Newsham
2008-04-30 20:43         ` Brad Parker
2008-04-30 20:26     ` [Unix-jun72] Mar 72 kernel subroutine description Al Kossow
2008-04-30 20:48       ` Brad Parker
2008-05-01 16:23     ` [Unix-jun72] ocr'd e03 Tim Bradshaw

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).