
/
/FOCAL INPUT FILE HANDLER
/REPLACES PTR HANDLER
/EXTERNALS: MAPAD, LOC16, LOC17, SEARCH
/           SYS001, SYS002, FILE1
/           MEMA,MEMB, FILE0
/
INHAN  DAC IARGP
       ISZ  IARGP
       JMS COMIN
       LAC* IARGP   /GET CAL FUNCTION CODE
       ISZ IARGP    /POINT TO CAL+2
       TAD IJUMP
       DAC IDSPCH
IDSPCH 0            /MODIFIED JUMP
       JMP IINIT
       JMP IFSTAT
       JMP IRETN1
       JMP IERR6
       JMP IERR6
       JMP ICLOSE
       JMP IRETN
       JMP IREAD
       JMP IERR6
       JMP IRETN
       JMP IERR6
IRETN1 ISZ IARGP  /POINT TO CAL+3
IRETN  JMS COMOUT
       CLA
       JMP* IARGP
IERR6  JMS COMOUT
       LAW 6
       JMP 4      /MONITOR ERROR DIAG.
IINIT  ISZ IARGP
       LAC (64
       DAC* IARGP  /SET LINE BUFFER SIZE
       JMP IRETN1
IFSTAT LAC* IARGP
       DAC IFST0   /SAVE FILE NAME POINTER
/CORE OVERLAY
       JMS MEMSET
       LAC IFST0    /GET FILE NAME POINTER
       JMS SEARCH
/RESTORE CORE
       JMS MEMRES
       LAC SEARCH  /TEST IF FILE PRESENT
       SZA
       JMP IFST2
       LAC* IARGP   /GET FILE NAME POINTER
       AND (77777
       TAD (100000   /SET AS FOR DECTAPE
       DAC* IARGP
       JMP IRETN1
IFST2  JMS IBLSET   /SET UP INPUT BLOCK
       JMP IRETN1   /RETURN
/
/INPUT BLOCK SET UP
/ENTER WITH AC = BLOCK#
IBLSET 0
       JMS DRIN    /GET BLOCK
       FILE1
       LAC .-1     /SET UP FILE POINTER
       DAC FIL1P
       LAC* FIL1P
       TAD (-2     /ONLY 126 PAIRS
       CMA!IAC
       DAC IFLCNT  /SET UP WPC
       ISZ FIL1P
       ISZ FIL1P    /POINT TO NEXT BLOCK#
       LAC* FIL1P   /GET NEXT BLOCK#
       DAC IBLKP
       ISZ FIL1P    /POINT TO LOC BEFORE FIRST PAIR
       JMP* IBLSET  /RETURN
IFST0  0
FIL1P  0
IFLCNT 0
IBLKP  0
IARGP  0
IJUMP  JMP IDSPCH
IREAD  LAC* IARGP    /GET LINE BUFFER ADDRESS
       DAC ILBUF
       IAC
       DAC ILBUFP   /POINT TO LOC BEFORE PAIR ENTRY
       CLA!IAC
       DAC ILBCNT   /SET UP LINE BUFFER WC
       ISZ IARGP
       ISZ IARGP      /POINT TO RETURN LOC
       LAC IFLCNT     /TEST IF ALL PAIRS SENT
       SPA
       JMP IREAD2     /NO
       LAC IBLKP      /GET NEXT BLOCK
       SZA
       JMP IREAD1
       LAC (1006      /END OF FILE
       DAC* ILBUF      /SEND EOM
       ISZ ILBUF
       DZM* ILBUF     /NULL HW1
       JMP IRETN
IREAD1 JMS IBLSET    /SET UP NEW BLOCK
IREAD2 LAC FIL1P
       DAC 16
       LAC ILBUFP
       DAC 17
IREAD4 LAC* 16
       DAC* 17
       LAC 16
       DAC IREAD3    /SAVE WORD PAIR POINTER
       LAC* 16
       DAC* 17
       ISZ ILBCNT    /UPDATE LINE BUFFER WPC
       ISZ IFLCNT    /UPDATE FILE COUNTER
       NOP
       LAC IREAD3    /TEST FOR EOL
       JMS EOLTST
       SNA
       JMP IREAD4
       LAC 16        /RESTORE POINTERS
       DAC FIL1P
       LAC ILBCNT     /SET HW0
       AND (377
       SWHA
       TAD (2
       DAC* ILBUF
       JMP IRETN
IREAD3 0
ILBUF  0
ILBUFP 0
ILBCNT 0
ICLOSE  JMP IRETN
