Subject: pdp8 tad instruction

From: [email-masked] (Olaf Pueschel)
Date: 10 Jan 1995 16:52:20 GMT

Hi folks!
Over X-mas I have been building my small own pdp8 assembler/simulator system.
It is quite workable now (yet not finished) and was quit some fun.
The only source of information I could usewas the pdp8-faq (posted here) and
this left open a few questions:
first (and most urgent): how does the TAD instruction *exactly* work with
negative numbers. As I understand the -8 has negative numbers stored as 2s
complement. How does this work with <l,ac> beeing treated as a 13 Bit unit?

Further, on which condition do the several skip instruction dealing with
ac negative/non-negative trigger? Is a number negative if its MSB is set?

In addition if someone could provide me with the functionality of the EAE
and the Memory extinsion units, on day I could impement these to :)

And - in the farer future - I am planing to add a X11 based front panel 
emulation. I have a GIF of a pdp8 front panel, but no desciption. If anyone
could provide any information, I'd be very happy :)

Of course all this stuff will be made public-avaialble when It's finished.

thanks to anyone providing *any* information
-olf
___
Olaf P"uschel, Broitzemer Str. 10, 38118 Braunschweig, Germany, +49-531-895643
--
  Olaf P"uschel Broitzemer Str. 10 38118 Braunschweig Germany +49 531 895643
-------------------------------------------------------------------------------
*** this is NOT a random-generated signature :-)

---

From: [email-masked] (Charles Lasner)
Date: 11 Jan 1995 15:08:30 GMT

In article <[email-masked]>,
>complement. How does this work with <l,ac> beeing treated as a 13 Bit unit?

Two's complement numbers are merely added.  The interpretation is what 
makes the numbers negative!  The Link gets complemented whenever a carry 
occurs, making the significence of the event user-defined, although 
totally predictable.  If the entire quantity is treated as a 13-bit 
unsigned number, then the user must preset the L and AC to whatever 
initial state makes sense for the problem at hand etc.  Instructions are 
available to clear, complement, and test the AC and L separately and 
together to form any useful manipulation.  If you decide that negative 
numbers are those with the high-order bit set, then test with SMA or SPA 
accordingly.  The arithmetic will conform to this, but there is no 
hardware present forcing the issue; you have to test for it.

>ac negative/non-negative trigger? Is a number negative if its MSB is set?

SMA is skip if AC[0] is set.  Negativity is in the eye of the beholder :-).
SPA is skip if AC[0] is not set.  Same consideration otherwise.  OF 
course the instructions are there to encourage the use of two's 
complement 12-bit numbers, but nothing is forced, etc.

>and the Memory extinsion units, on day I could impement these to :)

The memory extension to 32K is quite important.  Emulation of a PDP-8 
disk device and 03/04 console support vastly enlarges the usefulness of 
the project.  This allows "real" PDP-8 software to run on the simulator, etc.

>could provide any information, I'd be very happy :)

Would be real cute, especially for beginners.  But pdp-8 people need the 
fully-fledged simulator features more than the "show" :-).)

>Olaf P"uschel, Broitzemer Str. 10, 38118 Braunschweig, Germany, +49-531-895643

cjl

---

From: [email-masked] (Douglas W. Jones,201H MLH,3193350740,3193382879)
Date: 10 Jan 1995 17:53:29 GMT

>From  article <[email-masked]>, by [email-masked] (Olaf Pueschel):

> complement. How does this work with <l,ac> beeing treated as a 13 Bit unit?

Negative numbers are stored as 12 bit 2's complement numbers.

In adding numbers to the accumulator, a carry out of the high bit of the
accumulator causes the link bit to be complemented.  If it was zero, it
will be one; if it was one, it will be zero.

Here are some examples:

   L/AC    0 000000000001 =  1
         +   111111111111 = -1
     --------------------------
           1 000000000000 =  0
             
   L/AC    1 000000000001 =  1
         +   111111111111 = -1
     --------------------------
           0 000000000000 =  0

You, the programmer, are responsible for priming the link bit with an
appropriate value, where the initial value matters.

> ac negative/non-negative trigger? Is a number negative if its MSB is set?

In the table below, I've marked the bits in L/AC that each skip instruction
tests:

  OR GROUP
           0 X00000000000   SMA   - skip if AC is negative
           0 XXXXXXXXXXXX   SZA   - skip if all bits of AC are zero
           X 000000000000   SNL   - skip if the link is nonzero
  AND GROUP
           0 X00000000000   SPA   - skip if AC is positive
           0 XXXXXXXXXXXX   SNA   - skip if some bit of AC is nonzero
           X 000000000000   SZL   - skip if the link is zero

> and the Memory extinsion units, on day I could impement these to :)

These are messy, and they vary depending on the PDP-8 model that
interests you.  You can find a short summary of some of the key
EAE instructions in the pdp-8 reference card collection available
by WWW from

   http://www.cs.uiowa.edu/~jones/pdp8/index.html

Someday, I'll sift through my piles of documentation and try to put
together a more complete definition in the WWW programmer's reference
manual that's in the same collection.

> could provide any information, I'd be very happy :)

You're welcome to borrow the X-11 front panel from my emulator.  It has
one rather substantial bug in the way it handles single-stepping, but
otherwise, it works well.  That emulator is indexed under the web page
mentioned above.
				Doug Jones
				[email-masked]
				http://www.cs.uiowa.edu/~jones/

---

From: Stanley Rabinowitz <[email-masked]>
Date: 15 Jan 1995 16:40:00 GMT

So, if you implement TAD as if it were only adding unsigned
integers, you won't be going wrong.

- stan -

---

From: [email-masked] (Bob Supnik)
Date: 12 JAN 95 14:18:24

In article <[email-masked]>, [email-masked] (Olaf Pueschel) writes...
> [text deleted]
I realize it takes the fun out, but check one of the published simulators
(mine or Bill Haygood's) for the memory extension and EAE.  I wrote mine
from the maintenance manual and code checked Bill's for compliance.

Bob Supnik	>[email-masked]
		>All opinions expressed are those of a hardline microcoder
		>and do not reflect those of Digital Equipment Corporation