From mboxrd@z Thu Jan 1 00:00:00 1970 From: brantley@coraid.com (Brantley Coile) Date: Wed, 30 Apr 2008 09:55:13 -0400 Subject: [TUHS] Query on PDP-11 assembly In-Reply-To: <20080430115651.GA86539@minnie.tuhs.org> References: <20080430115651.GA86539@minnie.tuhs.org> Message-ID: <48187A41.80105@coraid.com> In your example, -(sp) = r5; r5 = pc; pc = guestf. Guestf will have to bump r5 as in consumes the parameters. Rts r5 means pc = r5; r5 = (sp)+. Hope this helps. Warren Toomey wrote: > All, I'm trying to write a PDP-11 disassembler for a.out files. I'm having > trouble dealing with jsrs. Take, for example, the code here: > http://minnie.tuhs.org/UnixTree/1972_stuff/s1/frag19.html > > I can happily deal with the jsr pc,do type of jsr, but the ones > involving r5 have me stumped, e.g.: > > jsr r5,questf; < nonexistent\n\0>; .even > > It appears that data is being inserted into the executable directly > after the jsr instruction. How does the rts which returns from the jsr > know how much data to skip, and what is the involvement of r5 here? > > Thanks, > Warren > _______________________________________________ > TUHS mailing list > TUHS at minnie.tuhs.org > https://minnie.tuhs.org/mailman/listinfo/tuhs