* DEFAULT SETTING LOADING CODE VERSION 2
LOAD_DEF MOVEQ #0,D1 ;Try to open TERM_DEF from default
MOVEQ #1,D3 ;device
LEA FILE1,A0
MOVEQ #1,D0
TRAP #2
CMP.B #0,D0 ;If opened then goto loading code
BEQ LOAD_IT
MOVEQ #0,D1 ;Try to open it from FLP1_
MOVEQ #1,D3
LEA FILE2,A0
MOVEQ #1,D0
TRAP #2
CMP.B #0,D0 ;If opened then goto loading code
BEQ LOAD_IT
MOVEQ #0,D1 ;Try to open it from MDV1_
MOVEQ #1,D3
LEA FILE3,A0
MOVEQ #1,D0
TRAP #2
CMP.B #0,D0 ;If error then goto end of routine
BNE END_LOD
LOAD_IT LEA WKSPAC+64,A3 ;Load address of System variables into
MOVE.W #500,D3 ;A3 and set timeout to 10 seconds
MOVE.W #64,D6
LOAD_LP MOVEQ #1,D0 ;Read in a byte
TRAP #3
CMP.B #-10,D0 ;Test if EOF error
BEQ LOD_LPE ;if so then exit loop
MOVE.B D1,(A3)+ ;Put byte into memory
TST.W D6
DBLT D6,LOAD_LP ;and go round loop again
MOVEQ #1,D0
TRAP #3
CMP.B #-10,D0
BEQ LOD_LPE
ST 133(A6)
TST.B D1
BLT LOD_LPE
SF 133(A6)
LOD_LPE MOVEQ #2,D0 ;Close file
TRAP #2
END_LOD RTS