       .TITLE GOTO           /COMPUTED GOTO OBJECT TIME SUBROUTINE.
/COPYRIGHT 1970, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
/EDIT 3   10-14-70
/             CALLING SEQUENCE
/      LOAD   V               INDEX VALUE IN A-REG
/      JMS*   .GO
/             -N              NO OF STATEMENT ADDRESSES
/             ST ADDR(1)
/             ST ADDR(2)
/                 ..
/             ST ADDR(N)
       .GLOBL .GO,.ER
	.GLOBL GOTO
GOTO=.
.GO    CAL    0              /ENTRY-EXIT
       DAC    V              /STORE INDEX
       TAD    K00001         / (-1)
       SPA                   /WAS INDEX .GT. 0
       JMP    E              / NO-ERROR
       TAD*   .GO            / YES, ADD -N
       SPA                   /  (V-1) + (-N) IS V .GT. N
       JMP    A              /   NO
E      JMS*   .ER            /  YES, ERROR (ILLEGAL INDEX VALUE)
       .DSA   400007         /    (ERR 7....RECOVERABLE)
       LAC*   .GO
       CMA
       TAD    (000002)       /COMPUTE ERROR RETURN (NO GOTO)
       SKP
A      LAC    V              /SET V = V + BASE ADDR
       TAD    .GO
       DAC    V
       JMP*   V              /JUMP TO ST ADDR(V)
K00001        777777	
V      .DSA   0
       .END
