• Please review our updated Terms and Rules here

Build your own PDP 8I, Part 3..

Great.

OK - I am working on a series of small programs so here goes:

STOP CLEAR

Deposit 7000 into all of the memory locations (NOP).

Set PC to 0000
Set IR to 0777
Set AC to 1234
Note the value of the LINK register.

CONT.

IR should get loaded with 7000 (the NOP instruction we will be continuously executing).
PC should be incrementing from 0000 in 1's up to 7777 and then wrap-around back to 0000 again.
AC should retain 1234 (i.e. not be modified).
LINK should retain it's original value (i.e. not be modified).

This should continue indefinitely and never stop (until you get bored and press STOP of course). I would leave it for a while to see if anything unexpected happens.

Next test

STOP

Deposit 7402 instructions (HLT) into all memory locations.
Set PC=0000
Set IR=0375
Set AC=1234
CONT.

The machine should halt with 7402 in IR and PC=0001.

CONT.

The machine should halt with 7402 in IR and PC=0002.

Every depress of CONT should result in the machine halting with the PC having been incremented. AC should never change from 1234. When you get bored - end of test!

Next test

Enter the following small program. First number is the address, second number is the data value.

0000 7000 ; NOP
0001 7000 ; NOP
0002 7000 ; NOP
0003 7402 ; HLT
0004 5000 ; JMP 0

Set PC=0000
Set AC=1234

CONT.

The machine should halt with PC=0004 and AC should remain at 1234.

Every time you press CONT - the machine should always halt at PC=00004 and AC should remain at 1234.

Next test

Enter the following small program. First number is the address, second number is the data value.

0000 7604 ; CLA OSR
0001 5000 ; JMP 0

Set PC=0000
Set AC=0000

CONT.

Whatever value you set on the hand-keys should appear in the accumulator.

Next test

Enter the following small program. First number is the address, second number is the data value.

0000 7001 ; IAC Increment accumulator
0001 2004 ; ISZ 4 ; Increment memory location 4 and skip next instruction if the result was zero.
0002 5001 ; JMP 1 ; Keep looping until ISZ gets to zero.
0003 5000 ; JMP 0 ; Repeat entire program again.

Set PC=0000
Set AC=0000

CONT.

The accumulator should increment by 1 - but at a slow(ish) rate (the ISZ should slow things down). You could replace memory address 0001 and 0002 with 7000 (NOPs) to see how fast that is first and then see if it runs slower with the ISZ/JMP instructions in place instead of the NOPs.

Next test

Enter the following small program. First number is the address, second number is the data value.

0000 7301 ; CLA CLL - Clear accumulator and link registers
0001 1006 ; TAD 6 - Load the number in memory location 6 (the number A) into the accumulator.
0002 1007 ; TAD 7 - Add the number in memory location 7 (the number B) to the accumulator.
0003 3010 ; DCA 8 - Deposit the answer (C) into memory location 8.
0004 7402 ; HLT - Stop so we can see the answer.
0005 5000 ; JMP 0 - Repeat on the next CONT.
0006 0001 ; The number A.
0007 0002 ; The number B.
0010 0000 ; The answer C = A + B.

Enjoy - Dr. Who time for me now...

Dave
 
Hi All;

Dave, Thank You, Thank You for One last set of Tests..

While in the Tub, I thought of Three Tests, that Could be added to the Repertoire..
I know that this is/was not the direction that You were going to, and I like Yours better, Yours are more Creative..


0000 7402 ; HLT
0001 7402 ; HLT
0002 7402 ; HLT
0003 7402 ; HLT
0004 7402 ; HLT
0005 7402 ; HLT
0006 7402 ; HLT
0007 7402 ; HLT
0010 7402 ; HLT
0011 7402 ; HLT
0012 7402 ; HLT
0013 7402 ; HLT
0014 7402 ; HLT
0015 7402 ; HLT
0016 7402 ; HLT
0017 7402 ; HLT


0000 5010 ; JMP to '0010
0001 7402 ; HLT
0002 7402 ; HLT
0003 7402 ; HLT
0004 7402 ; HLT
0005 7402 ; HLT
0006 7402 ; HLT
0007 7402 ; HLT
0010 7402 ; HLT
0011 7402 ; HLT
0012 7402 ; HLT
0013 7402 ; HLT
0014 7402 ; HLT
0015 7402 ; HLT
0016 7402 ; HLT
0017 7402 ; HLT


0000 5010 ; JMP to '0010
0001 7402 ; HLT
0002 7402 ; HLT
0003 7402 ; HLT
0004 7402 ; HLT
0005 7402 ; HLT
0006 7402 ; HLT
0007 7402 ; HLT
0010 5000 ; JMP to '0000
0011 7402 ; HLT
0012 7402 ; HLT
0013 7402 ; HLT
0014 7402 ; HLT
0015 7402 ; HLT
0016 7402 ; HLT
0017 7402 ; HLT


THANK YOU Marty
 
Hi All;

Dave, Thanks again for the Tests..
And away we go..

""OK - I am working on a series of small programs so here goes:

STOP CLEAR

Deposit 7000 into all of the memory locations (NOP).

Set PC to 0000
Set IR to 0777
Set AC to 1234
Note the value of the LINK register.
OK..
CONT.
OK..
IR should get loaded with 7000 (the NOP instruction we will be continuously executing).
PC should be incrementing from 0000 in 1's up to 7777 and then wrap-around back to 0000 again.
AC should retain 1234 (i.e. not be modified).
LINK should retain it's original value (i.e. not be modified).
NO, Bit 1 gets Dropped out of the AC, I then put '7777 into the AC and Re-ran the program, The first 3 bits get dropped.. I.E., bit 0, bit 1 and bit 2, go the '0'..
This should continue indefinitely and never stop (until you get bored and press STOP of course). I would leave it for a while to see if anything unexpected happens.

Next test

STOP

Deposit 7402 instructions (HLT) into all memory locations.
Set PC=0000
Set IR=0375
Set AC=1234
CONT.

The machine should halt with 7402 in IR and PC=0001.
Does NOT HALT..
The IR, MB and MA all contain '0375..
CONT.

The machine should halt with 7402 in IR and PC=0002.

Every depress of CONT should result in the machine halting with the PC having been incremented. AC should never change from 1234. When you get bored - end of test!

Next test

Enter the following small program. First number is the address, second number is the data value.

0000 7000 ; NOP
0001 7000 ; NOP
0002 7000 ; NOP
0003 7402 ; HLT
0004 5000 ; JMP 0

Set PC=0000
Set AC=1234

CONT.

The machine should halt with PC=0004 and AC should remain at 1234.
NO, it keeps on Running..
But, the IR keeps changing from '000111111111, to '000011111101, to '010111111111..
With This program at least, the IR is getting the Same as the Memory, and the Inverse of the MB Register..

Every time you press CONT - the machine should always halt at PC=00004 and AC should remain at 1234.

Next test

Enter the following small program. First number is the address, second number is the data value.

0000 7604 ; CLA OSR
0001 5000 ; JMP 0

Set PC=0000
Set AC=0000

CONT.

Whatever value you set on the hand-keys should appear in the accumulator.

Next test

Enter the following small program. First number is the address, second number is the data value.

0000 7001 ; IAC Increment accumulator
0001 2004 ; ISZ 4 ; Increment memory location 4 and skip next instruction if the result was zero.
0002 5001 ; JMP 1 ; Keep looping until ISZ gets to zero.
0003 5000 ; JMP 0 ; Repeat entire program again.

Set PC=0000
Set AC=0000

CONT.

The accumulator should increment by 1 - but at a slow(ish) rate (the ISZ should slow things down). You could replace memory address 0001 and 0002 with 7000 (NOPs) to see how fast that is first and then see if it runs slower with the ISZ/JMP instructions in place instead of the NOPs.

Next test

Enter the following small program. First number is the address, second number is the data value.

0000 7301 ; CLA CLL - Clear accumulator and link registers
0001 1006 ; TAD 6 - Load the number in memory location 6 (the number A) into the accumulator.
0002 1007 ; TAD 7 - Add the number in memory location 7 (the number B) to the accumulator.
0003 3010 ; DCA 8 - Deposit the answer (C) into memory location 8.
0004 7402 ; HLT - Stop so we can see the answer.
0005 5000 ; JMP 0 - Repeat on the next CONT.
0006 0001 ; The number A.
0007 0002 ; The number B.
0010 0000 ; The answer C = A + B. ""

THANK YOU Marty
 
Last edited:
The bath is a great place to think! I do it all the time...

So why is AC being modified when we are executing NOPs?

I would start on schematic LD19.

Pins 9 and 10 of all of the 74194s (F9, F10 and F11) should both be '0'.

If not - check pins 4, 5, 9 and 10 of G11. These pins should all be '1'.

Let's see where that takes us next. Either AC(L) on schematic LD15 if pins 4 or 9 are anything other than '1' - or schematic LD16 in the case of pins 5 or 10 being anything other than '1'.

It is just possible that some of the 'instructions' being loaded into IR from the memory and decoded are something other than a NOP (7000). Can you see if you can see any other patterns in the IR other than 7000 when the test program is running?

Dave
 
I have just noticed we have missed a couple of important tests out (dead simple ones though).

STOP CLEAR

Set AC to 1234

CLEAR.

AC should be cleared to 0000.

Set the LINK register with a little program as follows:

0000 7120 ; CLL CML
0001 7402 ; HLT

PC=0000
CONT.

The machine should halt with the link register set and PC=0002.

CLEAR.

The link register should be cleared.

Dave
 
Hi All;

Dave, Thanks for the Info and More Tests..

I will check out the Tests and the Pin Values..

A couple of things..

When I was running it with a Fast Clock, the IR Register would Alternate between '7777 and '0777..
Also, once I slowed it down, then, the AC did not get changed right away, which I would not have noticed with a fast clock,
once the MA Register gets Loaded with '0777, then the AC get Loaded with that Value as well, and it Doesn't change back to anything else..
Whereas the MA Register is Constantly Changing..

""" I would start on schematic LD19.

Pins 9 and 10 of all of the 74194s (F9, F10 and F11) should both be '0'.

If not - check pins 4, 5, 9 and 10 of G11. These pins should all be '1'. """
I can Check this..

"" Let's see where that takes us next. Either AC(L) on schematic LD15 if pins 4 or 9 are anything other than '1' - or schematic LD16 in the case of pins 5 or 10 being anything other than '1'. ""
On these Pin Numbers, I am not sure which IC is referred to..
Either AC(L) on schematic LD15, On G15, there is pin(s) 3, 4, 5, and 6, No pin 9..
Now there is a pin 9 on G1, E12 and E2..
"" schematic LD16 in the case of pins 5 or 10 being anything other than '1'. ""
On LD16, pin 5, is on K12, K11, G2..
Pin 10 is on K12, K13, K14, G16, G2, K11, K3..

THANK YOU Marty
 
Last edited:
An IR value of 0777 will AND the AC with whatever value it finds in a particular memory location.

If you monitor your Fx and Ax LEDs I would like to bet that we are not getting A4 when the problem occurs - but we are running through to F4 and beyond (i.e. we are not exiting at the correct place).

So, the question is - is IR being loaded incorrectly or is the memory not being read correctly?

I will take that thought with me to my bath and think about how we can deduce which until tomorrow...

Dave
 
Hi All;

Dave, Thank You for Your Response..

"" An IR value of 0777 will AND the AC with whatever value it finds in a particular memory location.

If you monitor your Fx and Ax LEDs I would like to bet that we are not getting A4 when the problem occurs - but we are running through to F4 and beyond (i.e. we are not exiting at the correct place).

No, I just Checked it, F0, F1, F2, F3, then it jumps to A4..
This runs with a pattern of 00000, or 110011 or 101011 in the address of the PC.. Maybe others as well, further up the address chain..
BUT, while typing this and letting it Run..
Then it Runs from F0 to F6, then to A7, then to F8, F9, F10..
It runs this for the Rest of the addresses..

So, the question is - is IR being loaded incorrectly or is the memory not being read correctly?

I will take that thought with me to my bath and think about how we can deduce which until tomorrow... ""

I will Ponder this as well..

Thank You, have a good and Great Weekend..

I can Run thru the Rest of the Tests and see if they provide any other clues, Like 'The Butler did it'..

Here are the Next Tests..

"" I have just noticed we have missed a couple of important tests out (dead simple ones though).

STOP CLEAR

Set AC to 1234

CLEAR.

AC should be cleared to 0000.
I set AC to '7777, Just in case..
It works fine..

Set the LINK register with a little program as follows:

0000 7120 ; CLL CML
0001 7402 ; HLT

PC=0000
CONT.

The machine should halt with the link register set and PC=0002.

CLEAR.

The link register should be cleared. ""
NO !!!!!!!!!!!
The Link Register is never set and it Doesn't stop..

Also, see comments in the above posting of other tests..

I am wondering if the 74181 has a compliment and it does..
When S0 thru S3 are '0 and Mode is '0 and Cin is a 1, then it passes A thru to F Straight.. (Input to Output)..
BUT,
When S0 thru S3 are '0 and Mode is '1 and Cin is a 1, then it passes A thru to F Inverted.. (Input to Output)..

So, Maybe either the Mode circuitry is not right, (logicly) or an Ic is Bad on the Mode circuitry..
Mode, changes Only during CP00..

I have put the F1 Blocking on the IR Register, for some more Tests..
With F1 Disabled, and '0000 put into the IR Register, I get a pulse on M during CP00..
And With F1 Disabled, and '7000 or '7400 put into the IR Register, I get a pulse on M during CP02..
So, this seems to work..
Dave, Hopefully this will Help and not Hurt, Your Pondering..

On Monday, I am going to finish changing all of B1, B2, B4, S0, S1, S2, S3, M and Cin to Schmidt Trigger Equivalents..
It's changing a couple of 7410's to 7420's pinouts and then changing everything to it's Equivalent..


THANK YOU Marty
 
Last edited:
Marty,

I have found a bit of a discrepancy with the MB register and memory.

Can you identify what devices you have used for the MB register please. Are they 74174 or 74175 devices?

The 74174 is a hex latch with only the active high Q available whereas the 74175 is a quad latch with both the Q and Q/ available from each latch.

The 7489 memory devices are strange in that they have active high data inputs but active low data outputs.

What schematic LD20 shows is that the data inputs to the RAM chips come from /MBx pins (although he shows from F7 for all of the three chips - that can't possibly be correct). However, schematic LD18 indicates that the MB register is a 74174 (with only active high outputs available).

This may account for your 'inversion' somewhere?

Dave
 
Hi All;

Dave, Thank You for Your answer and Question..

"" Can you identify what devices you have used for the MB register please. Are they 74174 or 74175 devices? ""

On This machine, I wrongly thought it would help by reducing the 7404 count by having the 74175's..
What I should have Done was use 74174's for all of the Registers, Except for the MB Register and that one set would have been 74175's.. And I would have had five more IC spaces on the Board, that I could very much use..
So, Yes, I have 74175's and Yes I knew and know about it having both Q and /Q..

"" The 7489 memory devices are strange in that they have active high data inputs but active low data outputs. ""
I knew this as well..

"" What schematic LD20 shows is that the data inputs to the RAM chips come from /MBx pins (although he shows from F7 for all of the three chips - that can't possibly be correct). However, schematic LD18 indicates that the MB register is a 74174 (with only active high outputs available). ""

I Just Looked the /MBx from F7 come from the 74174's thru 7404's to get /MBx from the MBx of the 74174's..

And You JUST found my Mistake, ON my WireList Schematic, it shows MBx connected to the 7489's, (I think I forgot to write in the Bar over the top of them)..
And So when I did my New Schematic, I looked at the old one and Saw MBx and So that was what I used for Memory Input from the MB Register, and NOT /MBx..
Ok, on Monday I will Check this out with my Meter, and report what I find and Make the necessary changes..
I just checked one of the Signals and Yes, it is wired to MB, so I will need to change 12 wires..

"" This may account for your 'inversion' somewhere? "" YES !!!!!!!!!!!!!!!!

THANK YOU Marty
 
Last edited:
So it's good that we have found an error - but, I thought this error would have appeared in the deposit/examine test that we did a while ago?

If we deposit 0000 into the memory we should get 0000 back not 7777... Before you change anything electrically, can we just get to the bottom of why deposit and examine work please?

Cheers,

Dave
 
Hi All;

Dave, Thanks for Your Reply..

"" So it's good that we have found an error - but, I thought this error would have appeared in the deposit/examine test that we did a while ago?

If we deposit 0000 into the memory we should get 0000 back not 7777... Before you change anything electrically, can we just get to the bottom of why deposit and examine work please? ""

Actually that is MY fault, I saw that they (the output of Memory) were the Inverse, But I didn't think anything of it..
Because, I knew that on the 7489's the Input and Output was the Inverse of Each other..
And so, It didn't Click, That I had wired them to the Wrong Output of the MB Register..

I wouldn't be surprised if this is the last of the Big Problems, I am not saying that there won't be any more Problems, but, that the rest would be small problems..

THANK YOU Marty
 
Last edited:
"Actually that is MY fault, I saw that they (the output of Memory) were the Inverse, But I didn't think anything of it.." 0000 /= 7777 :).

As you say - hopefully another bug squashed...

Dave
 
Hi All;

I have swapped one bit, (bit 0) to make sure that the switching of the bit fixed the problem and it Did..

I did a Deposit and then an Examine of bit 0 and it shows correctly..

Now Eleven more to go..

First four done and Tested..

The middle four are Done and Tested..

Last four are done and Tested..

I am going to Re-Run Dave's Tests !!!

"" OK - I am working on a series of small programs so here goes:

STOP CLEAR

Deposit 7000 into all of the memory locations (NOP).

Set PC to 0000
Set IR to 0777
Set AC to 1234
Note the value of the LINK register.

CONT.

IR should get loaded with 7000 (the NOP instruction we will be continuously executing).
PC should be incrementing from 0000 in 1's up to 7777 and then wrap-around back to 0000 again.
AC should retain 1234 (i.e. not be modified).
LINK should retain it's original value (i.e. not be modified).

This should continue indefinitely and never stop (until you get bored and press STOP of course). I would leave it for a while to see if anything unexpected happens.
YES !!!!!
I used all ones (7777) on the Accumulator, instead of '1234

Next test

STOP

Deposit 7402 instructions (HLT) into all memory locations.
Set PC=0000
Set IR=0375
Set AC=1234
CONT.

The machine should halt with 7402 in IR and PC=0001.

CONT.

The machine should halt with 7402 in IR and PC=0002.

Every depress of CONT should result in the machine halting with the PC having been incremented. AC should never change from 1234. When you get bored - end of test!
YES !!!
Next test

Enter the following small program. First number is the address, second number is the data value.

0000 7000 ; NOP
0001 7000 ; NOP
0002 7000 ; NOP
0003 7402 ; HLT
0004 5000 ; JMP 0

Set PC=0000
Set AC=1234

CONT.

The machine should halt with PC=0004 and AC should remain at 1234.

Every time you press CONT - the machine should always halt at PC=00004 and AC should remain at 1234.
YES !!!!
Next test

Enter the following small program. First number is the address, second number is the data value.

0000 7604 ; CLA OSR
0001 5000 ; JMP 0

Set PC=0000
Set AC=0000

CONT.

Whatever value you set on the hand-keys should appear in the accumulator.
YES, YES, YES !!!!!
Next test

Enter the following small program. First number is the address, second number is the data value.

0000 7001 ; IAC Increment accumulator
0001 2004 ; ISZ 4 ; Increment memory location 4 and skip next instruction if the result was zero.
0002 5001 ; JMP 1 ; Keep looping until ISZ gets to zero.
0003 5000 ; JMP 0 ; Repeat entire program again.

Set PC=0000
Set AC=0000

CONT.

The accumulator should increment by 1 - but at a slow(ish) rate (the ISZ should slow things down). You could replace memory address 0001 and 0002 with 7000 (NOPs) to see how fast that is first and then see if it runs slower with the ISZ/JMP instructions in place instead of the NOPs.
YES !!!!!
I am waiting for it to loop thru all of it, until the accumulator is all Ones and the Link Bit..
I am running it with the Fastest Clock Frequency to date..
Before it used a set of Resistors at 2.7K, But Now it is at 1.0K for the Highest Frequency with the 555..
Now it's at 100 Ohms, and it does Fly !!! For Now this is as Fast as I will go..
Next test

Enter the following small program. First number is the address, second number is the data value.

0000 7301 ; CLA CLL - Clear accumulator and link registers
0001 1006 ; TAD 6 - Load the number in memory location 6 (the number A) into the accumulator.
0002 1007 ; TAD 7 - Add the number in memory location 7 (the number B) to the accumulator.
0003 3010 ; DCA 8 - Deposit the answer (C) into memory location 8.
0004 7402 ; HLT - Stop so we can see the answer.
0005 5000 ; JMP 0 - Repeat on the next CONT.
0006 0001 ; The number A.
0007 0002 ; The number B.
0010 0000 ; The answer C = A + B. ""

No, Not Yet, I have to slow it down and see where the hang up is..

I am going to try this modification to the program..

0000 7301 ; CLA CLL - Clear accumulator and link registers
0001 7402 ; HLT - Stop so we can see the answer.
0002 1011 ; TAD 11 - Load the number in memory location 11 (the number A) into the accumulator.
0003 7402 ; HLT - Stop so we can see the answer.
0004 1012 ; TAD 12 - Add the number in memory location 12 (the number B) to the accumulator.
0005 7402 ; HLT - Stop so we can see the answer.
0006 3013 ; DCA 13 - Deposit the answer (C) into memory location 13.
0007 7402 ; HLT - Stop so we can see the answer.
0010 5000 ; JMP 0 - Repeat on the next CONT.
0011 0001 ; The number A.
0012 0002 ; The number B.
0013 0000 ; The answer C = A + B.


Changing to my next to the Last slowest clock, it gets the following.. (1 meg ohm)..

After the 7301, all is well.. Maybe Not..
MA has '0002,
M has '1011,
MB has '7776,
PC has '0002,
IR has '7402,
AC has '0001..

CONT..

After the 1011, all is Not well, we have '0377 in the Accumulator..
MA has '0012,
M has '0001,
MB has '7776,
PC has '0003,
IR has '1011,
AC has '0377..

CONT..

After the 1012, all Not well, we have '0377 in the Accumulator
MA has '0002,
M has '1011,
MB has '7776,
PC has '0004,
IR has '7402,
AC has '0377..

CONT..

After the 1012, all Not well, we have '0376 in the Accumulator
MA has '0012,
M has '0001,
MB has '7776,
PC has '0005,
IR has '1012,
AC has '0376..

CONT..

After the 3013, all Not well, we have '0375 in the Accumulator
MA has '0002,
M has '1011,
MB has '7776,
PC has '0006,
IR has '7402,
AC has '0375..

CONT..

After the 3013, all Not well, we have '0000 in the Accumulator
MA has '0013,
M has '0775,
MB has '7002,
PC has '0775,
IR has '3013,
AC has '0000..

I have Stopped here..

I am trying it a second time, I found one memory mistake that I corrected, Location '0012 had '0001 instead of '0002..

Changing to my next to the Last slowest clock, it gets the following.. (1 meg ohm)..

After the 7301, all is well.. Maybe Not..
MA has '0002,
M has '1011,
MB has '7777,
PC has '0002,
IR has '7402,
AC has '0001..

CONT..

After the 1011, all is Not well, we have '0377 in the Accumulator..
MA has '0011,
M has '0001,
MB has '7776,
PC has '0003,
IR has '1011,
AC has '0377..

CONT..

After the 1012, all Not well, we have '0377 in the Accumulator
MA has '0002,
M has '1011,
MB has '7776,
PC has '0004,
IR has '7402,
AC has '0377..

CONT..

After the 1012, all Not well, we have '0376 in the Accumulator
MA has '0012,
M has '0002,
MB has '7775,
PC has '0005,
IR has '1012,
AC has '0774..

CONT..

After the 3013, all Not well, we have '0375 in the Accumulator
MA has '0002,
M has '1011,
MB has '7775,
PC has '0006,
IR has '7402,
AC has '0774..

CONT..

After the 3013, all Not well, we have '0000 in the Accumulator
MA has '0013,
M has '0774,
MB has '7003,
PC has '0774,
IR has '3013,
AC has '0000..

I have Stopped here..

I have checked Memory and all are correct, Except for '0013, which has '0774 in it instead of '0003...

0000 7301 ; CLA CLL - Clear accumulator and link registers
0001 7402 ; HLT - Stop so we can see the answer.
0002 1011 ; TAD 11 - Load the number in memory location 11 (the number A) into the accumulator.
0003 7402 ; HLT - Stop so we can see the answer.
0004 1012 ; TAD 12 - Add the number in memory location 12 (the number B) to the accumulator.
0005 7402 ; HLT - Stop so we can see the answer.
0006 3013 ; DCA 13 - Deposit the answer (C) into memory location 13.
0007 7402 ; HLT - Stop so we can see the answer.
0010 5000 ; JMP 0 - Repeat on the next CONT.
0011 0001 ; The number A.
0012 0002 ; The number B.
0013 0000 ; The answer C = A + B.

"" I have just noticed we have missed a couple of important tests out (dead simple ones though).

STOP CLEAR

Set AC to 1234

CLEAR.

AC should be cleared to 0000.
YES ..
Set the LINK register with a little program as follows:

0000 7120 ; CLL CML
0001 7402 ; HLT

PC=0000
CONT.

The machine should halt with the link register set and PC=0002.
YES..
CLEAR.

The link register should be cleared. ""
YES..
THANK YOU Marty
 
Last edited:
Hi All;

Here is the origional program..

0000 7301 ; CLA CLL - Clear accumulator and link registers
0001 7402 ; HLT - Stop so we can see the answer.
0002 1011 ; TAD 11 - Load the number in memory location 11 (the number A) into the accumulator.
0003 7402 ; HLT - Stop so we can see the answer.
0004 1012 ; TAD 12 - Add the number in memory location 12 (the number B) to the accumulator.
0005 7402 ; HLT - Stop so we can see the answer.
0006 3013 ; DCA 13 - Deposit the answer (C) into memory location 13.
0007 7402 ; HLT - Stop so we can see the answer.
0010 5000 ; JMP 0 - Repeat on the next CONT.
0011 0001 ; The number A.
0012 0002 ; The number B.
0013 0000 ; The answer C = A + B.

I am changing the Program to the following..

0000 7301 ; CLA CLL - Clear accumulator and link registers
0001 7402 ; HLT - Stop so we can see the answer.
0002 1011 ; TAD 11 - Load the number in memory location 11 (the number A) into the accumulator.
0003 7402 ; HLT - Stop so we can see the answer.
0004 7000 ; NOP
0005 7402 ; HLT - Stop so we can see the answer.
0006 3013 ; DCA 13 - Deposit the answer (C) into memory location 13.
0007 7402 ; HLT - Stop so we can see the answer.
0010 5000 ; JMP 0 - Repeat on the next CONT.
0011 0001 ; The number A.
0012 0000 ; The number B.
0013 0000 ; The answer C = A.

I have Deposited it and Checked it using a fairly fast clock..
I am going to switch it to the same Slow Clock and Run it..

After the 7301, all seems well..
MA has '0002,
M has '1011,
MB has '7776,
PC has '0002,
IR has '7402,
AC has '0001..

CONT..

After the 1011, all is Not well, we have '0377 in the Accumulator..
MA has '0011,
M has '0001,
MB has '7776,
PC has '0003,
IR has '1011,
AC has '0377..

CONT..

After the 7000, all Not well, we have '0377 in the Accumulator
MA has '0002,
M has '1011,
MB has '7776,
PC has '0004,
IR has '7402,
AC has '0377..

CONT..

After the 7402, all Not well, we have '0377 in the Accumulator
MA has '0000,
M has '7301,
MB has '7776,
PC has '0005,
IR has '7000,
AC has '0377..

CONT..

After the 3013, all Not well, we have '0377 in the Accumulator
MA has '0002,
M has '1011,
MB has '7776,
PC has '0006,
IR has '7402,
AC has '0377..

CONT..

After the 3013, all Not well, we have '0000 in the Accumulator
MA has '0013,
M has '0377,
MB has '7000,
PC has '0377,
IR has '3013,
AC has '0000..

I have Stopped here..

I have switched to the Fast clock to check Memory..

All is fine, Except for Address '0013, which has 0377 in it..

So, it Looks Like the the TAD may be at Fault !!!

Dave, I don't Think/Remember whether we checked out TAD..
We didn't do a Detailed Test of this Instruction, Just a simple Test..
TAD is associated with B1, S0 (for the 74181), AC(L), CML..
Also, if it means anything the inverse of '0377 is '7400..

But, we HAVE made some good Progress, It's Just another BUG has crept in..

THANK YOU Marty
 
Last edited:
Full marks for the fix Marty!!!

Incidentally, the reason I used 1234 rather than 7777 was to introduce some '0' bits rather than all '1's or all '0's - there is usually some 'method in my madness'.

So, to recap, it now looks like as though the OPR Group 1 and 2 instructions work OK.

The last test (C := A + B) was thrown in as a bit of a "teaser" because I was getting bored of 'noddy' tests and I am sure we would have both appreciated a more 'substantial' program than a load of NOPs or HLTs!

Note that I did find a fault with my "CLA CLL" instruction. This instruction should have set both AC and LINK to 0, but AC is set to 0001? I incorrectly used 7301 (which included an IAC to increment the accumulator). The "CLA CLL" instruction *** SHOULD ** have been 7300. My bad. It still doesn't account for the TADs though - but it should make "CLA CLL" work as intended!

OK - so I will work on testing out the other instructions and addressing modes next. We haven't tested AND, TAD or DCA properly yet - and we have only just sneaked ISZ in there. We also need to test out direct and indirect memory access plus the auto incrementing locations from 0010 to 0017. We should have tested JMP - but not JMS.

So we have a little further to go yet; but at least it seems to be executing very simple programs as we expect - which is somewhat better than the case with the previous build if I remember correctly.

Dave
 
Last edited:
Although I am now going to deduct a mark for inserting HLTs throughout my program!

STOP CLEAR.

Now we can run a very simple program successfully, fill all of memory with a NOP instruction (7000).

Set PC=0000
Set AC=1234

CONT

The machine should run forever...

STOP

Set the "SINGLE STEP" switch.

Set PC=0000

CONT.

A single FETCH/EXECUTE cycle should be processed and then the machine should stop with PC=0001.

CONT.

A single FETCH/EXECUTE cycle should be processed and then the machine should stop with PC=0002.

etc. etc. etc.

You shouldn't need to insert HLTs to debug any program - just hit SINGLE STEP and CONT for each instruction to execute next...

A bit more about the TAD instruction (I think I can see where things are going wrong).

The TAD instruction (during the EXECUTE phase) uses the value in MB (from the FETCH phase) to add to the AC and store the result in AC during CP0. You can see this on schematic LD15 at the logic leading up to G15 input pin 3. The AND and TAD instructions gate AC(L) during CP0.

On schematic LD15, MB(L) is gated at F5. So the FETCH state machine should be cycling F0, F1, F2, F3 (this is the same as before) but then F4 (not A4) followed by F5 and then terminated by A6.

Interestingly (with your single step of my C:=A+B program) I am seeing the COMPLEMENT of the memory location stored in MB!

Can I ask you to double-check the work you have done today please.

The output from MB should still drive the front panel lamps and go to the MUX that feeds one input of the ALU. MB should ***ONLY*** be inverted for feeding the data inputs to the 7489 RAMs (and NOT for anything else).

Incidentally, after a DCA instruction, the ACCUMULATOR will contain 0000! DCA = Deposit and Clear Accumulator.

Dave
 
Last edited:
Hi All;

I had to go and get my Bus Pass, But I am Back Now..

Dave, Thank You for the Response..

"" Incidentally, the reason I used 1234 rather than 7777 was to introduce some '0' bits rather than all '1's or all '0's - there is usually some 'method in my madness'. ""

The Reason I used '7777 was in case something showed up again, Otherwise '1234 would have been fine with me..

"" Note that I did find a fault with my "CLA CLL" instruction. This instruction should have set both AC and LINK to 0, but AC is set to 0001? I incorrectly used 7301 (which included an IAC to increment the accumulator). The "CLA CLL" instruction *** SHOULD ** have been 7300. My bad. It still doesn't account for the TADs though - but it should make "CLA CLL" work as intended! ""

OK !!

"" OK - so I will work on testing out the other instructions and addressing modes next. We haven't tested AND, TAD or DCA properly yet - and we have only just sneaked ISZ in there. We also need to test out direct and indirect memory access plus the auto incrementing locations from 0010 to 0017. We should have tested JMP - but not JMS. ""

I have somewhat of a Test for DCA, that I thought of while riding the Bus.. I will List it below..
I figure If we Test the others besides TAD and they Pass, then we have made some good progress, again..
Also, I thought we tested JMP with Your Program..

"" So we have a little further to go yet; but at least it seems to be executing very simple programs as we expect - which is somewhat better than the case with the previous build if I remember correctly. ""

YES !!

0000 7320 ; CLA CLL CML - Clear accumulator and link registers
0001 7010 ; RAR
0002 3013 ; DCA 13
0003 7402 ; HLT
0004 5001 ; JMP 1 - Repeat on the next CONT.
0005 7000 ; NOP
0006 7000 ; NOP
0007 7000 ; NOP
0010 7000 ; NOP
0011 0000 ; The number A.
0012 0000 ; The number B.
0013 0000 ; The answer C = A.

It Doesn't HALT..

I am going to the Slow Clock, and see if it behaves any differently..
NO, I even changed the '5001 to '5000..
And it still keeps on running..
I am making another change..

0000 7320 ; CLA CLL CML - Clear accumulator and link registers
0001 7402 ; HLT
0002 7010 ; RAR
0003 7402 ; HLT
0004 3013 ; DCA 13
0005 7402 ; HLT
0006 5002 ; JMP 2 - Repeat on the next CONT.
0007 7402 ; HLT
0010 7000 ; NOP
0011 7000 ; NOP
0012 7000 ; NOP
0013 7000 ; The answer C = A. I want to see if this Changes Value..

We have another Problem..

After the 7320, all seems well..
MA has '0002,
M has '7010,
MB has '3777,
PC has '0002,
IR has '7402,
AC has '0000.. Link Set..

CONT..

After the 7010, 7402 all is well, we have '4000 in the Accumulator..
MA has '0010,
M has '7000,
MB has '3777,
PC has '0003,
IR has '7010,
AC has '4000..

CONT..

After the 3013, all well, we have '4000 in the Accumulator
MA has '0002,
M has '7010,
MB has '3777,
PC has '0004,
IR has '7402,
AC has '4000..

CONT..

After the 7402, all Not well, we have '0000 in the Accumulator
MA has '0013,
M has '4000,
MB has '3777,
PC has '4000,
IR has '3013,
AC has '0000..

CONT..

After the should be 5002, all Not well, we have '0000 in the Accumulator
MA has '0002,
M has '7010,
MB has '3777,
PC has '4002,
IR has '7402,
AC has '0000.. Link is Set..

I have Stopped here..


THANK YOU Marty
 
Last edited:
Marty,

I have just updated my previous post - I think I may have found your TAD problem...

Your CLL CML will "set" the LINK register.

The DCA will clear AC after it has finished - so the next time around the loop probably doesn't do what you think?

Dave
 
Back
Top