From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Thread: 10d0a0,85c86b0733116e3e X-Google-NewGroupId: yes X-Google-Thread: 1164f8,b01e1fc5e37f0530,start X-Google-NewGroupId: yes X-Google-Thread: fd705,b01e1fc5e37f0530,start X-Google-NewGroupId: yes X-Google-Thread: fdb0e,b01e1fc5e37f0530,start X-Google-NewGroupId: yes X-Google-Thread: fdd80,b01e1fc5e37f0530,start X-Google-NewGroupId: yes X-Google-Attributes: gid99a988281b,gidd180ab3bd8,gid323918b351,gid109de10e57,gide311f70d09,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!postnews.google.com!w11g2000vbp.googlegroups.com!not-for-mail From: luser droog Newsgroups: alt.sys.pdp8,comp.sys.dec,alt.folklore.computers,alt.sys.pdp10,alt.sys.pdp11 Subject: Re: pdp1-lisp source query Followup-To: comp.sys.dec Date: Thu, 25 Aug 2011 02:47:23 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: NNTP-Posting-Host: 99.189.76.130 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1314269063 25444 127.0.0.1 (25 Aug 2011 10:44:23 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 25 Aug 2011 10:44:23 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: w11g2000vbp.googlegroups.com; posting-host=99.189.76.130; posting-account=G1KGwgkAAAAyw4z0LxHH0fja6wAbo7Cz User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-Header-Order: HUALESNKRC X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.9.0.19) Gecko/2011070117 Iceweasel/3.0.6 (Debian-3.0.6-3),gzip(gfe) Xref: g2news1.google.com alt.sys.pdp8:1381 comp.sys.dec:3747 alt.folklore.computers:64669 alt.sys.pdp10:6884 alt.sys.pdp11:2383 On Aug 23, 3:17=A0pm, Rich Alderson wrote: > luser droog writes: > > I couldn't find a pdp-1 group, so apologies if this is too far off > > topic. [and if so, would someone kindy recommend a better place?] > > comp.sys.dec or alt.folklore.computers come to mind. =A0alt.sys.pdp10 pro= bably > has more PDP-1 programmers than a.s.pdp8 or a.s.pdp11, for that matter. Much obliged. I'm crossposting to all your suggestions; f-ups to comp.sys.dec. > > I'm trying to read the source for Deutsch's pdp-1 lisp, and i've come > > across some weirdness (go figure! right?). =A0On p. 349 of Berkeley and > > Bobrow, LISP: Its Operation and Applications, page 2 of the Macro > > Assembler source, column 2, is written: > > buf, > > 77/ =A0 =A0 =A0 =A0 0 > > =A0 =A0 =A0 =A0 =A0 =A0 0 > > =A0 =A0 =A0 =A0 =A0 =A0 dap rx > > =A0 =A0 =A0 =A0 =A0 =A0 sub (1 > > =A0 =A0 =A0 =A0 =A0 =A0 dap .+1 > > =A0 =A0 =A0 =A0 =A0 =A0 lac xy > > =A0 =A0 =A0 =A0 =A0 =A0 dap ave+1 > > =A0 =A0 =A0 =A0 =A0 =A0 lac rx > > =A0 =A0 =A0 =A0 =A0 =A0 jda pwl > > ave, =A0 =A0 =A0 =A0lac 100 > > So it starts with a buffer, right? The symbol listing says buf starts > > at 63. =A0So 13 words, 2 zero words, and then, CODE?!! How are we to > > jump to that first dap line without a label? > > You have a label. > > Your error is in not realizing that the PDP-1 assembler is using 2 differ= ent > bases, octal and decimal, in its listing. =A0In the input code, numbers a= re in > octal; in the symbol listing, numbers are in decimal. > > Location BUF is at 77 (octal) =3D 63 (decimal), there is no gap, and Bob'= s y'r > uncle. That would explain something if only it were true! The symbol listing is definitely octal, as is every number that passes through the pdp-1, as if passing through some magic field where the nines cast themselves out, and the eights decend an octave. Upon further research, what I've got here is the Master Routine for performing subroutine calls. The 'cal Y' instruction is equivalent to jda 100: jump deposit accumulator. It copies the AC to mem[100], then jumps to 101. So the label here is hardcoded into the processor! buf, 77/ 0 0 /This is location 100, which holds AC (argument) dap rx /This is location 101, implicitly jmped to by the 'cal' instuction /we deposit the return address in rx (the exit line of car) sub (1 /subtracting one gives the address of the 'cal' instruction itself dap .+1 /save this address into the load instruction just below lac xy /follow the pointer dap ave+1 /exit to this address when we exit lac rx /reload the return address into acc. jda pwl /jmp to 'push word on push-down list' ave, lac 100 /load argument back into AC exit /jmp to the subroutine Hopefully some guru will fill-in anything I've missed.