Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
* Re: pdp1-lisp source query
       [not found] ` <mdd8vqjanni.fsf@panix5.panix.com>
@ 2011-08-25  9:47   ` luser droog
  2011-08-25 13:08     ` Klemens Krause
  0 siblings, 1 reply; 2+ messages in thread
From: luser droog @ 2011-08-25  9:47 UTC (permalink / raw)


On Aug 23, 3:17 pm, Rich Alderson <n...@alderson.users.panix.com>
wrote:
> luser droog <mijo...@yahoo.com> 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.  alt.sys.pdp10 probably
> 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?).  On p. 349 of Berkeley and
> > Bobrow, LISP: Its Operation and Applications, page 2 of the Macro
> > Assembler source, column 2, is written:
> > buf,
> > 77/         0
> >             0
> >             dap rx
> >             sub (1
> >             dap .+1
> >             lac xy
> >             dap ave+1
> >             lac rx
> >             jda pwl
> > ave,        lac 100
> > So it starts with a buffer, right? The symbol listing says buf starts
> > at 63.  So 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 different
> bases, octal and decimal, in its listing.  In the input code, numbers are in
> octal; in the symbol listing, numbers are in decimal.
>
> Location BUF is at 77 (octal) = 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.




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

* Re: pdp1-lisp source query
  2011-08-25  9:47   ` pdp1-lisp source query luser droog
@ 2011-08-25 13:08     ` Klemens Krause
  0 siblings, 0 replies; 2+ messages in thread
From: Klemens Krause @ 2011-08-25 13:08 UTC (permalink / raw)


luser droog wrote:
> On Aug 23, 3:17 pm, Rich Alderson <n...@alderson.users.panix.com>
> wrote:
...

'm crossposting to all your suggestions; f-ups to
> comp.sys.dec.
> 
...
>>> Assembler source, column 2, is written:
>>> buf,
>>> 77/         0

I think, the 77/ means: Set program counter (of the assembler) to 77.
That means, label buf, is at address 63, and then PC is set to 77.
So from buf (addrs. 63) to 76 there are 12(decimal) uninialized
words. Word 77 is set to 0.
Word 100 is the word to store the content of AC on entry to the
subroutine-code starting at 101.

address 100, to save AC
>>>             0
address 101, the first word of the master routine.
>>>             dap rx    

...

>> Your error is in not realizing that the PDP-1 assembler is using 2 different
>> bases, octal and decimal, in its listing.  In the input code, numbers are in
>> octal; in the symbol listing, numbers are in decimal.

Thats wrong: in the symbol listing they are also octal.

> 
> Hopefully some guru will fill-in anything I've missed.
> 
BTW: I'm not a PDP1 guru.

Klemens


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

end of thread, other threads:[~2011-08-25 13:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <b1be99d1-dbbc-48da-ad53-db904b23a976@c14g2000yqk.googlegroups.com>
     [not found] ` <mdd8vqjanni.fsf@panix5.panix.com>
2011-08-25  9:47   ` pdp1-lisp source query luser droog
2011-08-25 13:08     ` Klemens Krause

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox