commodorejohn
Veteran Member
Huh, I was under the impression that the MQ instructions were part of the EAE package going back to the straight-8. Need to have another run over the model list...
Huh, I was under the impression that the MQ instructions were part of the EAE package going back to the straight-8. Need to have another run over the model list...
On the subject of model differences, I'm curious what combining IAC and rotate on unsupported models actually does? Is it simply a different behavior (rotate-then-increment vs. increment-then-rotate,) or is it unpredictable? Every source mentions that it's unsupported, but nobody seems to say specifically what happens.
Huh, interesting.
Ah.
On the subject of model differences, I'm curious what combining IAC and rotate on unsupported models actually does? Is it simply a different behavior (rotate-then-increment vs. increment-then-rotate,) or is it unpredictable? Every source mentions that it's unsupported, but nobody seems to say specifically what happens.
c7764, 7764
domul, / DOMUL - multiply #0 by #1
mql / save #0
tad i z psp / get #1
dca z tmp / save it in ZP for speed
tad c7764 / load AC with -12
dca z tmp2 / save it for a loop counter
mloop, cll ral / shift the sum left
swp / retrieve #0
cll ral / shift #0 left
swp / retrieve the sum
szl / if link is set,
tad z tmp / add #1
isz z tmp2 / increment the loop counter
jmp mloop / if we didn't skip, continue
isz z psp / increment the stack pointer
jmp i z ip / 15 instructions, 16 words
Apparently wrong, too.
A look under the hood of the R210 bit slice shows all the rotate inputs to be clock inputs. (More properly, pulsed DCD inputs.) The half adder input appears to be level based, which makes me think that might win instead.
Any straight-8 owners able to experiment?
Vince
Sorry I missed this discussion in April.
I spent half an hour warming the old girl up and verified basic operation enough to punch in the following four codes.
CLA CLL IAC RAL 7305 which should give L=0 AC=0002 and gives 0 0000
CLA CLL IAC RAR 7311 which should give L=1 AC=0000 and gives 0 0000
CLA CLL IAC RTL 7307 which should give L=0 AC=0004 and gives 0 0000
CLA CLL IAC RTR 7313 which should give L=0 AC=4000 and gives 0 0000
It looks to me like the IAC never happens. I then tried making this two instructions in order to verify the results I thought should happen and got the expected results. Of course this does not mean that in all cases the increment ends up stifled but testing all cases is more than I want to do right now. After warming up half an hour it still would not boot OS/8 from DECtape. Something is still not working correctly. My basement is now a couple of degrees warmer and it is going to be hot today. I will wait until I need the heat to work on it.
If you have any specific cases you want me to test I will do that.
Doug
door, .-. / DOOR - OR #0 and #1
MQL / MQ <- #0
tad i z psp / get #1
MQA / do the OR
isz z psp / increment the stack pointer
jmp i door / return
As mentioned above, according to documentation, you cannot have IAC in combination with rotates, as they happen at the same clock phase.
Seems the documentation is correct then.
And I guess, from your information, that the IAC just is "ignored" in that situation.
doskn, / DOSKN - skip (IP += 2) if #0 is negative
0
spa cla / if #0 is not negative,
jmp sn / skip skipping
isz doskn / otherwise, skip
isz doskn
sn, tad i z psp / get the new #0
isz z psp / increment the stack pointer
jmp i doskn / 7 instructions, 8 words
/ HD6120: 47* cycles, 8/e: 15* us, 8: 19.5* us
/ * 61 cycles/19 us/22.5 us if skip taken
JMS DOSKN /SKIP IF NEGATIVE?
JMP I .+1 /RETURNS HERE IF NEGATIVE
ITSNEG /DESTINATION POINTER
/POSITIVE TOP OF STACK RETURNS CONTROL HERE
/AND SOMEWHERE OUT HERE WE NEED TO PROCESS THE NEGATIVE CASE.
ITSNEG, /COMES HERE IN THE NEGATIVE CASE.
JMS DOSKN /SKIP IF NEGATIVE?
ITSNEG /DESTINATION POINTER
/POSITIVE TOP OF STACK RETURNS HERE
doskn, / DOSKN - jmp to arg or skip (IP += 1) if #0 is negative
0
spa cla / if #0 is not negative,
jmp sn / skip skipping
tad i doskn / grab the new return address
dca doskn / replace the original
sn, tad i z psp / get the new #0
isz z psp / increment the stack pointer
jmp i doskn / 7 instructions, 8 words
.
JMS I (ROUTIN / Call routine
JMP I (WASNEG / If AC was negative at call, we end up here.
. / If AC was positive, we end up here.
.
.
ROUTIN, 0
SMA CLA / Skip if AC is negative, and clear it.
ISZ ROUTIN / If AC was positive, we skip next instruction at caller
.
.
JMP I ROUTIN
Thing is, the more common way is to do like this:
Code:. JMS I (ROUTIN / Call routine JMP I (WASNEG / If AC was negative at call, we end up here. . / If AC was positive, we end up here. . . ROUTIN, 0 SMA CLA / Skip if AC is negative, and clear it. ISZ ROUTIN / If AC was positive, we skip next instruction at caller . . JMP I ROUTIN
DOSKN, .-. /SKIP IF TOP OF STACK (AC) IS NEGATIVE AND THEN MOVE NEXT TO AC
SPA CLA /REVERSE THE SENSE TO SKIP THE RETURN ADDRESS BUMP
ISZ DOSKN /PERFORM THE SKIP
TAD I Z PSP /MOVE NEXT TO THE AC
ISZ Z PSP /FIX UP SP
JMP I DOSKN /RETURN
DOBRN, .-. /BRANCH IF TOP OF STACK IS NEGATIVE AND MOVE NEXT TO AC
SMA CLA /SKIP IF TOP OF STACK IS NEGATIVE
JMP BRNLB1 /JMP IF TOS IS >=0
TAD I DOBRN /FETCH RETURN POINTER
DCA DOBRN /WE WILL NOW RETURN TO THE BRANCH ADDRESS
SKP /SKIP THE RETURN ADDRESS UPDATE FOR NON BRANCH CASE
BRNLB1, ISZ DOBRN /RETURN AFTER THE BRANCH POINTER
TAD I Z PSP /TOS GETS NEXT
ISZ Z PSP /FIX UP SP
JMP I DOBRN /RETURN TO THE CORRECT PLACE
DOSKN, .-. /SKIP IF TOP OF STACK (AC) IS NEGATIVE AND THEN MOVE NEXT TO AC
SPA CLA /REVERSE THE SENSE TO SKIP THE RETURN ADDRESS BUMP
ISZ DOSKN /PERFORM THE SKIP
TAD I PSP /MOVE NEXT TO THE AC
ISZ PSP /FIX UP SP
JMP I DOSKN /RETURN