ANSWER: Weekly Classic Computer Trivia Question (20150121)

Doug Ingraham dpi at dustyoldcomputers.com
Mon Jan 26 10:57:16 CST 2015


And this question must have been too obscure to elicit any response.  The
answer is C) 50.

After posting the trivia question I came up with a way on the PDP8 to
measure time events to a resolution of 1.5 microseconds and went back and
retested the High Speed Paper tape reader hardware.  The earlier version
could only measure to 3.0 microseconds resolution.  Here is the 1.5
microsecond version of the program:

/ ADVANCED HIGH SPEED PAPER TAPE TIMING PROGRAM
/
/ USES FIELD 1 AND LINK/AC TO MEASURE TIME DELAY
/ WITH INTERRUPTS.
*0000
        .-.             / INTERRUPT ENTRY POINT
        RSF             / MAKE CERTAIN IT WAS A HSR INTERRUPT
        HLT             / HOUSTON WE HAVE A PROBLEM
        DCA I AUTO0     / SAVE COUNT AND LINK AS A 24 BIT
        RAL
        DCA I AUTO0     / SAVE LINK
        JMP MORE
*0010
AUTO0,  .-.

/
MORE,   ISZ Z FRM1      / CHECK FOR DONE
        JMP NEXT        / EXIT INTERRUPT AND CONTINUE TIMING
        TAD Z COUNTS    / POINT AT START OF ARRAY
        DCA Z AUTO0
        TAD Z CNTS      / GET BACK ORIGINAL COUNT OF SAMPLES
        DCA Z FRM1
        TLS             / PRIME THE PUMP
PRLP,   TAD I Z AUTO0   / GET 12 BIT PART
        DCA Z BASE
        TAD I Z AUTO0   / GET LINK PART
        CLL RAR         / RESTORE THE LINK
        TAD Z BASE      / COUNT IS IN LINK AND AC
        TAD Z C0002     / ADD 2 WHICH CORRECTS TIMING FOR START DELAY
        DCA Z BASE      / SAVE FOR PRINTING
        RAL             / PRINT THE LEADING OCTAL DIGIT
        TAD Z CHZERO    / ADD IN '0' TO GET LEADING DIGIT
        JMS PRINT       / AND WE DONT HAVE TO WORRY ABOUT THE LINK ANYMORE
        TAD Z M0004     / INITIALIZE DIGIT COUNTER
        DCA Z DIGCNT
DIGLP,  TAD Z BASE      / OCTAL DIGIT IS IN UPPER 3 BITS
        RTL
        RAL
        DCA Z BASE      / NEXT DIGIT IS IN UPPER 3 BITS
        TAD Z BASE      / NEED TO SHIFT ONCE MORE TO GET IN LOWER 3 BITS
        RAL
        AND Z C0007     / KEEP JUST THE LOWER 3 BITS
        TAD Z CHZERO    / ADD IN THE OFFSET FOR ASCII 0 CHARACTER
        JMS PRINT       / AND GO PRINT IT
        ISZ Z DIGCNT
        JMP DIGLP
        TAD Z CHSPC     / PRINT A SPACE
        JMS PRINT
        TAD Z CHCR      / PRINT CR
        JMS PRINT
        TAD Z CHLF      / PRINT LF
        JMS PRINT
        ISZ Z FRM1      / ARE WE DONE?
        JMP PRLP        / NO
        HLT             / ALL DONE
        JMP START       / GO AGAIN
NEXT,
        CLA CLL         / LINK AND AC MAKE A 13 BIT COUNTER
        ION             / INTERRUPTS ON.  CIF THAT FOLLOWS DELAYS THIS
        CIF 10          / SWITCH TO FIELD 1 AT THE JMP I CZERO
        RFC             / START THE NEXT READ
        JMP I C0000     / START COUNTING (ADDS 2 TO THE ACTUAL COUNT)

PRINT,  .-.             / PRINT THE CHARACTER IN THE AC
        TSF             / WAIT FOR LAST CHARACTER TO FINISH PRINTING
        JMP .-1         / WAIT
        TLS             / SHIP IT
        CLA CLL         / RETURN WITH AC CLEAR
        JMP I PRINT     / RETURN

/ CONSTANTS
C0000,  0
C0002,  2
C0007,  0007            / MASK
CIAC,   IAC             / IAC CONSTANT
CHLF,   0012            / CONSTANT FOR LINE FEED
CHCR,   0015            / CONSTANT FOR CARRIAGE RETURN
CHSPC,  0040            / CONSTANT FOR A SPACE CHARACTER
CHZERO, 0260            / CONSTANT FOR '0' CHARACTER
COUNTS, ARRAY-1         / POINTER TO COUNTS ARRAY-1 FOR AUTO INCREMENT
INITIALIZE
M0004,  -4

/ VARIABLES
FRM1,   0000            / FRAME COUNT KEPT HERE
CNTS,   0000            / COPY OF FRAME COUNT READ FROM SWITCHES
BASE,   0000            / TEMPORARY STORAGE OF WORD BEING PRINTED
DIGCNT, 0000            / COUNT OF DIGITS WHEN PRINTING

*0200
START,  CLA
        DCA FRM1        / FILL ALL OF FIELD 1 WITH IAC INSTRUCTIONS
        CDF 10
FILL,   TAD CIAC        / GET THE CIAC INSTRUCTION
        DCA I FRM1      / PUT IT ON FIELD 1
        ISZ FRM1        / BUMP AND CHECK FOR DONE
        JMP FILL        / NOT DONE
        CDF 00          / RESTORE TO FIELD ZERO
AGAIN,  LAS             / READ SR
        CMA             / INITIALIZE FRAME COUNT FROM SR FOR ISZ
        DCA Z FRM1
        TAD Z FRM1
        DCA Z CNTS      / KEEP A COPY FOR USE WHEN PRINTING
        TAD Z COUNTS    / INITIALIZE THE AUTO INCREMENT REGISTER
        DCA Z AUTO0
        JMP NEXT        / AND GO MAKE A PASS

*0400
ARRAY,  .-.             /STORE THE COUNTS HERE

$

The program fills field 1 with IAC instructions and then reads the switch
register to find out how many frames to process.  Each frame is timed and
the result stored in words pairs starting at 0400.  Counts are 0-8191 which
on a straight 8 would represent 0 - 12286.5 microseconds.  The actual time
is 2 counts more than this because of the JMP I C0000 to switch fields and
start execution of the timer.  Once the switch register count of frames is
reached the contents of the array plus 2 is dumped out as 5 octal digits to
the teletype.  In the case of the Type 750 and PC01 the first character
read sets the flag immediately so the first entry in the table shows as 2
which for the purpose of my emulator I fixed the first entry.  My emulator
of course gives the same answers as the 8 but then it has to because it
uses the table generated by the real 8.  The only other place I ran it was
on Sim8 which always gives 0145 as the answer which is not even close.

I will come up with something of more general interest for the next trivia
question.  I have something in mind already.

Doug Ingraham
PDP-8 S/N 1175


On Wed, Jan 21, 2015 at 11:27 PM, Doug Ingraham <dpi at dustyoldcomputers.com>
wrote:

> Many of us on this list are collectors of one sort of computer or
> another.  I don't think of myself as a collector so much as a caretaker of
> my PDP-8.  Of the things it has been fairly easy to get in recent years are
> the CPU and its related cards for the models that were produced in fairly
> large numbers.  What is not easy to get are peripherals for these
> machines.  So here is a question relating to the Type 750 high speed paper
> tape reader found on the early models.  A few years back we were working on
> getting the CPU back in good working order.  We needed to read in the
> diagnostic paper tapes but the reader was not reliable.  Went through the
> tuning procedure and found that it was trying to read the tape at nearly
> 450 cps.  After tuning it up the full speed now sits at 342 cps.
>
> The question is how many frames does it have to read before it reaches
> full speed?
>
> A) 1
> B) 10
> C) 50
> D) 100
>
> This is probably a somewhat squishy number and would depend somewhat on
> tuning.  I wrote a couple of programs to determine this so I could add
> correct delays to my emulator.  I was able to obtain a 3 microsecond
> resolution count of the delay.  How that was accomplished might make for
> another trivia question.
>
>
>
>
>


-- 
Doug Ingraham
PDP-8 SN 1175


More information about the cctech mailing list