
FORTRAN II - CAL HANDLER III-A 9-5-63

RET=JMP I-JMS

20/	HELPR
	JMP . 2
	JMP HERE3
	DAC PAC
	JMS .+2
PAC,	0		/SAVED AC
PLK,	0		/SAVED LINK
	ISZ PUSH
	LAC 20
	AND (17777
PUSH,	DAC PSTORE-1	/SAVE EXIT ADDRESS
	ADD (-1
	DAC #PTEM
	LAC I PTEM	/GET SUBROUTINE ADDRESS
	DAC PTEM
	LAW HELPR
	DAC 20
	ISZ LIMIT
	JMP EXITP
	HELP EH 1112

/COPY SUBROUTINE

COPYLP,	0
	ISZ TM#CNT
	SKP
	JMP I COPYLP
TT1,	XX
TT2,	XX
	ISZ TT1
	ISZ TT2
	JMP COPYLP 1

/CAL HANDLER - PAGE 2
/SAVE 1 REGISTER (RESTORE AC  AND LINK)

SAVE1=JMS .
	0
	LAC I PUSH
	TAD (20000
	ISZ PUSH
	DAC I PUSH	/INDEX  NO. OF SAVED ARGS.
	JMS RL6
	AND (37
	ADD (LAC PST-1
	DAC SAVEA
	LAM -1
	ADD PUSH
	DAC PTEM
SAVEA,	XX
	DAC I PTEM
	ISZ LIMIT
	RET SAVE1
	HELP EH 1112

/PUSH N REGISTERS

SAVE=JMS .
	0
	LAC I SAVE-JMS
	DAC TT1
	SKP
	SAVE1
	ISZ TT1
	JMP .-2
	RET SAVE

/CAL HANDLER - PAGE 3
/EXIT ROUTINES

EXIT3=JMP .	ISZ I PUSH
EXIT2=JMP .	ISZ I PUSH
EXIT1=JMP .	ISZ I PUSH
EXIT =JMP .	DAC PAC 		/SAVE AC AND LINK
EXITL,	RAR		/SAVE LINK
	DAC PLK
	LAC I PUSH	/RESTORE OLD AC AND LINK
EXITB,	DAC PTEM
	AND (760000
	SZA
	JMP RESTORE
EXIT1A,	LAM -1
	ADD PUSH
	DAC PUSH
	LAM -1
	ADD LIMIT
	DAC LIMIT
	ADD (PUSHN
	SPA
	HELP EH 1110
EXITP,	LAC PLK
	RAL
	LAC PAC
	JMP I PTEM

EXIT3R=JMP .	ISZ I PUSH
EXIT2R=JMP .	ISZ I PUSH
EXIT1R=JMP .	ISZ I PUSH
EXITR =JMP .	JMP EXITB-1

DSPTCH,	AND (7
	ADD I PUSH
	JMP EXITB

/CAL HANDLER - PAGE 4
/MISC. SUBROUTINES

RESTOR,	JMS RL6
	AND (37
	CMA
	DAC TMCNT
	ADD PUSH
	DAC PUSH
	ADD (LAC-DAC
	DAC COPYLP 4
	LAC (DAC PST
	DAC COPYLP 5
	LAC TMCNT
	ADD LIMIT
	DAC LIMIT
	JMS COPYLP
	JMP EXIT1A

/DISPLAY PARAMETERS

DSPARA=JMS .
	0
	LAM -PARN
	DAC TMCNT
	LAC (DAC PARA 1
	DAC COPYLP 5
	LAC I PUSH
	AND (17777
	ADD (LAC
	DAC COPYLP 4
	JMS COPYLP
	RET DSPARA

RL6,	0
	RTL	RTL	RTL	JMP I RL6

VARIABLES

PST,	PST 10/
PARG,	PARG PARN 1/

PARA=PARG-1

START
