Personal tools
Document Actions

odra.7 inicjator inicsource prolog

by Paul McJones last modified 2019-05-20 16:52
# WERSJA 83-03
#PARAMETERS
#O
#IS
#OS

WHENEVER COMMAND ERROR,GO TO 1ER
MZ 40000
IF PRE(XFAT) OR ABS(XF), FORTRANCOMP *CR INICSTER,*CR INICSOURCE,BIN,*LP INICLST
IF PRE(XFIV),FORTRAN *CR INICSTER,*CR INICSOURCE,BIN,*LP INICLST
IF NOT HALTED(LD),GOTO 2ER
CREATE !
IF ABSENT(IS=),(AS *CR3,BOOTSTRAPTXT) ELSE (AS *CR3,%(IS=))
IF ABSENT(OS=),(SP X,(PROLOGSTAN)) ELSE( SP X,(%(OS=)))
IF NOT EXISTS(%X),(CREATE %X(*DA,BUCK1,KWORD15))
AS *DA1,%X(WRITE)
IF STRING(%(O=))=(),(ONLINE *LP) ELSE -
   (IF STRING(%(O=))=(0),(AS *LP0,!(WRITE)) ELSE (AS *LP0,%(O=)(WRITE)))
ENTER 0
IF DELETED ,GO TO 1FIN
1ER
DP 0,EXECUTION ERROR(S) IN PROGRAM INIC
GO TO 1FIN
2ER
DP 0,COMPILATION ERROR(S) IN PROGRAM INIC
1FIN
IF NOT DELETED,DL
ERASE !
DP 0,END OF INICJATOR
EXIT

#WERSJA 83-03
#
# PARAMETERS
#
# A - TAB
# B - PILE
# C - WINDOW
# D -KOMPILATOR
#MZC
CREATE !
INPUT !,T####,PS
%C,(TC/&TAB/,R/&TAB/%A/,R/&PILE/%B/,)E,E
####
EDIT PROLSOURCE,,!
ER !
IF PRE(MZC),(MZ %(MZC)) ELSE (MZ 650000)
IF PRE(XFAT) OR ABS(XF),FORTRANCOMP *CR PROLSTER,*CR PROLSOURCE,BIN,*LP PROLOGLS
             SEMI :LIB.SUBGROUPFSCE
IF PRE(XFIV),FORTRAN *CR PROLSTER,*CR PROLSOURCE,BIN,*LPPROLOGLST,-
             SEMI :LIB.SUBGROUPFSCE
SAVE PROLBIN(+1)
DELETE
CREATE !
INPUT !,T####,PS
==================================================
 KOMPILATOREM %D

 ZOSTALA UTWORZONA WERSJA INTERPRETERA O WYMIARACH:

          TAB=%A,    PILE=%B

          UMIESZCZONA NA PLIKU:

         %^DIRENT(PROLBIN)^

 MOZNA JEJ UZYWAC POD SYSTEMEM OPERACYJNYM GEORGE-3

==================================================
####
LF !
ER !
EXIT

#WERSJA 83-03
IF PRESENT(MONIT),(TRACE %(MONIT=)) ELSE (TRACE FULLBUT,COMMANDS)
#
#
#
#
# PARAMETERS
#:
#SUP
#PREFIX
#GUIDE
#GUIDEONLY
#RESUME
#INTERP
#VER
#MZ
#T
#TRACE OFF
#MS
#IS
#O
#AO
#I
#AI
#MONIT
#
# VARIABLES
#
#V - :,OWNER
#U - PREFIX
#X - RESUME,INTERP,VER,MS,IS,OS,SAVE
#T - MZ,PAUSE
#



#       PROCESSING SUP


#   DEFAULT OWNER NAME SHOULD BE DEFINED BELOW
IF  PRESENT(:),(SP V,(:%(:).)) ELSE (SP V,(:MACROS.))

IF ABSENT(SUP) AND EXISTS(%VPROLMESSAGES) ,LF %VPROLMESSAGES

IF PRESENT(PREFIX=),SP U,(%(PREFIX=))
#
#        PROCESSING GUIDE   GUIDEONLY
#        ACCESS TO FILE PROLOGUIDE
#
IF ABSENT(GUIDE) ,GO TO 90PR
IF EXISTS(%VPROLOGUIDE),GO TO 9002PR
DP 0,NO GUIDE IN SYSTEM
IF PRESENT(GUIDEONLY),EXIT

9002PR


IF STRING(%(GUIDE))=(*) OR STRING(%(GUIDEONLY))=(*),-
          GO TO 901PR

LF %VPROLOGUIDE,*LP,PAGE
DP 0,GUIDE SENT TO PRINTER
IF PRESENT(GUIDEONLY),EXIT
GO TO 90PR

901PR

LF %VPROLOGUIDE
IF PRESENT(GUIDEONLY),EXIT

90PR

#
#        ERROR CONDITIONS  SET ON
#
WHENEVER COMMAND ERROR , GO TO 91ER
WHENEVER FINISH , GO TO 92ER
IF NOT MOP , ( WHENEVER JTEX , GO TO 93ER )
#
#
#        WORK FILES CREATION
#        !0 FOR O=0 ^  !1 FOR OS=0 ^  !2 FOR AO=0
#
CREATE !
CREATE !(*DA,BUCK1,KWORD15)
CREATE !
#
#
#        PROCESSING :  INTERP=   VER=   RESUME=
#        ACCESS TO FILES :  QSTPROLBIN,PROLBIN
#
IF ABSENT(RESUME=) AND ABSENT(RESUME) , GO TO 91PR
IF STRING(%(RESUME=))=() OR STRING(%(RESUME))=()  , ( SP X,(%VQSTPROLBIN) )  ELS
                           ( SP X,(%U%(RESUME=)) )
GO TO 92PR


91PR

IF PRESENT(INTERP=) , ( SP X,(%(INTERP=)) )  ELSE -
  (IF PRESENT(VER=) , ( SP X,(%VPROLBIN(%(VER=))) )  ELSE -
                     ( SP X,(%VPROLBIN) ))


92PR

#
#
#        PROCESSING :  MZ=   T=
#
IF ABSENT(MZ=) , ( SP T,(45K) )  ELSE -
                 ( SP T,(%(MZ=)) )
MZ %T
IF NOT EXISTS(%X) , GO TO 94ER
#
#        LOADING FROM %X
#
LOAD %X
#
#        CORE  IMAGE  NOW!
#
IF PRESENT(T=) , ( TIME %(T=) )  ELSE ( TIME 5MINS )
#
#
#        PROCESSING SWITCHES
#
IF PRESENT(TRACEOFF) , ON 0
#
#
#        PROCESSING :  MS=
#        ACCESS TO FILE :  DEFAULTSTATE
#
IF STRING(%(MS=))=() , GO TO 93PR
IF NOT EXISTS(%U%(MS=)) , ( SP X,(%VDEFAULTSTATE))  ELSE -
                        ( SP X,(%U%(MS=)) )
AS *DA1,%X
SP X,DIRENT(%X)
DP 0,IS=%X
CREATE %U%(MS=)(+1)(*DA,BUCK1,KWORD15)
AS *DA3,%U%(MS=)(WRITE)
SP X,DIRENT(%U%(MS=))
DP 0,OS=%X
GO TO 95PR


93PR

#        PROCESSING :  IS=   OS=
#        ACCESS TO FILES :  DEFAULTSTATE, !2
#
IF PRESENT(RESUME),GO TO 931PR
IF STRING(%(IS=))=() , ( SP X,(%VDEFAULTSTATE))  ELSE -
                       (SP X,(%U%(IS=)) )
IF NOT EXISTS(%X) , GO TO 94ER
AS *DA1,%X
SP X,DIRENT(%X)
DP 0,IS=%X

931PR

IF STRING(%(OS=))=() OR STRING(%(OS=))=(0) , (AS *DA3,!1(WRITE))  ELSE -
                                              ( GO TO 94PR )
GO TO 95PR


94PR


IF NOT EXISTS(%U%(OS=)) , ( CREATE %U%(OS=)(*DA,KWORD15,BUCK1))
SP X,DIRENT(%U%(OS=))
AS *DA3,%X(WRITE)
DP 0,OS=%X


95PR

#
#        PROCESSING : O=   AO=   I=   AI=
#        ACCESS TO FILES :   !0  ,!2
#
IF NOT STRING(%(O=))=() , -
  (IF STRING(%(O=))=(0),(AS *LP0,!(WRITE))  ELSE -
                        (AS *LP0,%U%(O=)(APPEND)))  ELSE -
  (ONLINE *LP0)
IF STRING(%(I=))=(),(ONLINE *CR0) ELSE -
    (IF EXISTS(%U%(I=)),(AS *CR0,%U%(I=)) ELSE (GO TO 94ER))
IF PRESENT(I=) , ( SP (I=),() )
IF STRING(%(AI=))=(),(ONLINE *CR2) ELSE -
    (IF EXISTS(%U%(AI=)),(AS *CR2,%U%(AI=)) ELSE (GO TO 94ER))
IF PRESENT(AI=),( SP (AI=),() )
IF NOT STRING(%(AO=))=() , -
  (IF STRING(%(AO=))=(0) , ( AS *LP9,!2(WRITE) )  ELSE -
                           ( AS *LP9,%U%(AO=)(APPEND)) )  ELSE -
(ONLINE *LP9)


IF PRESENT(RESUME) , ( RESUME )  ELSE ( ENTER )

91CONT

IF HALTED(USER),GO TO 92HLT
IF FAIL(TIME UP) , GO TO 999ER
IF DISPLAY(OK), GO TO 91FIN
#
#        PERIPHERAL HALTED
#
IF NOT FAIL(FILE *CR0 EXHAUSTED) , GO TO 91HLT
IF ABSENT(I=) , GO TO 95ER
IF STRING(%(I=))=(),(ONLINE *CR0) ELSE -
    (IF EXISTS(%U%(I=)),(AS *CR0,%U%(I=)) ELSE (GO TO 94ER))
SP (I=),()
RESUME
GO TO 91CONT


91HLT

IF NOT FAIL(FILE *CR2 EXHAUSTED) , GO TO 96ER
IF ABSENT(AI=) , GO TO 97ER
IF STRING(%(AI=))=(),(ONLINE *CR2) ELSE -
    (IF EXISTS(%U%(AI=)),(AS *CR2,%U%(AI=)) ELSE (GO TO 94ER))
SP (AI=),()
RESUME
GO TO 91CONT

92HLT

#
#        PAUSE PROCESSING
#
DP 0, PAUSE IN PROLOG
IF STRING"%(PAUSE=)">"(" , ( SP T,(%'PAUSE=('  ) ) ELSE -
                   ( SP T,(%'PAUSE=' ) )
IF STRING(%T)=(),GO TO 93HLT
DP 0,CALLING (%T)
%T

911CONT

DP 0,AGAIN IN PROLOG
IF NOT CORE,GO TO 98ER
RESUME
GO TO 91CONT


93HLT

IF NOT MOP,GO TO 99ER
QUESTION 0,
GO TO 911CONT
#
#
#
91FIN
#        TERMINATION
#
ER !,!,!
IF CORE,DELETE
DP 0,END OF PROLOG
EXIT
#
#
#
#        ERROR PROCESSING
#

91ER
DP 0,COMMAND ERROR
GO TO 91FIN

92ER
DP 0,SYSTEM CLOSING
SP X , (%UCLOSED)

921ER
IF PRESENT(SAVE=) , ( SP X,(%U%(SAVE=)) )
SAVE %X
SP X,DIRENT(%X)
DP 0,PROGRAM SAVED IN FILE
DP 0,%X
GO TO 91FIN

93ER
DP 0,JOB TIME EXCEEDED
SP X,(%UJTEXC)
GO TO 921ER

94ER
SP X,DIRENT(%X)
DP 0,FILE NOT FOUND
DP 0,NAME = %X
GO TO 91FIN

95ER
DP 0, NO MORE 'I=' PARAMETERS
SP X,(%UI EOI)
IF NOT MOP,GO TO 921ER
QUESTION 0,ANSWER FILE NAME
AS *CR0,%^DISPLAY^
RESUME
GO TO 91CONT

96ER
DP 0,EXECUTION ERROR(S)
GO TO 91FIN

97ER
DP 0,NO MORE 'AI=' PARAMETERS
SP X,(%UAI EOI)
IF NOT MOP,GO TO 921ER
QUESTION 0,ANSWER FILE NAME
AS *CR2,%^DISPLAY^
RESUME
GOTO 91CONT

98ER
DP 0,RESUME IMPOSIBLE IN NO CORE CONTEXT
GO TO 91FIN

99ER
DP 0,NO 'PAUSE' PARAMETER IN NOT MOP CONTEXT
SP X,(%UPAUSEP)
GO TO 921ER

999ER
SP X,(%UTIMEUP)
GO TO 921ER


« November 2020 »
Su Mo Tu We Th Fr Sa
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30
 

Powered by Plone CMS, the Open Source Content Management System

This site conforms to the following standards: