Available subroutines: SIC_LOAD SIC_OPT SIC_RUN SIC_INSERT SIC_LOG SIC_LANG Available functions: SIC_CTRLC SIC_LIRE SIC_INTER_STATETo build a program around the SIC monitor, different routines are provided. Some must always be used (SIC_LOAD and SIC_RUN), others are simply provided for additional capabilities. These routines have a standard SIC_ like name and are fully described in this section. SIC_RUN (LINE,LANG,COMMAND,ERROR,ICODE,OCODE)
This subroutine is used to enter SIC, retrieve and analyse a command line for further execution. All SIC possibilities, including execution levels and error recoveries, made accessible (In particular, the LINE command line can be a call to a macro file).
SIC_LOAD (LANG,HELP,NCOM,CCOM,VERSION)
This subroutine initialize a SIC language and thus is usually the first one called. All arguments are unchanged by the routines and may be passed as immediate values.
SIC_OPT (PROMPT,LOGFILE,MEMORY)
This routine is not compulsory. It is used to set the prompt the log file name and the stack usage. This routine only changes the prompt if called after SIC_LOAD.
This routine is only useful when the Stack Buffer is used to store commands. This is the default, and the case when the flag MEMORY was set to .TRUE. in the first call to SIC_OPT. It can be changed with the SIC MEMORY command. SIC_INSERT is used to put a command line into the Stack buffer, a very useful possibility for some applications, when several lines must be put or when the command line must be expanded by the user program before the insertion is made.
Note however that command lines are automatically inserted in the Stack Buffer by the monitor for usual commands. This is the standard way of using the Stack insertion mode, since it automatically takes into account many things like the execution level before deciding whether an insertion must occur. Using directly SIC_INSERT usually implies to disable the automatic insertion by the monitor (using the character code * in the definition of the associated command, c.f. Section 2.2). You need also to perform a call to SIC_LIRE to check the SIC execution mode (you should only call SIC_INSERT when SIC_LIRE() is equal to 0) and associated calls to SIC_LOG to write the same information in the LOG file. The insertion does not occur if the memory flag is turned off (SIC MEMORY OFF).
SUBROUTINE SIC_LOG (LINE,NL,LIRE)
This subroutine writes LINE(1:NL) into the Log_File if LIRE=0. LIRE is here necessary for consistency with the internal pointer indicating if SIC is processing a macro, the stack or the loop. This pointer can be retrieved by the function SIC_LIRE. A call to SIC_LOG when LIRE is not 0 has no action.
This subroutine returns the name of the language corresponding to the last command analysed. It is called only when building the library version of a multi-language application.
SIC itself traps the <^C> by generating a PAUSE at the end of the command which was being executed when <^C> was pressed. You may want in time-consuming applications to check yourself at specific points whether <^C> has been pressed. SIC_CTRLC allows you to do so, and resets an internal flag to .FALSE. when called. It returns .TRUE. if <^C> has been pressed since either the last command completed execution or the last time it was called (using the most recent event), .FALSE. otherwise.
This subroutine returns the internal pointer of SIC indicating where SIC is currently reading its commands. SIC_LIRE may take the values
This subroutine returns .TRUE. if the session is interactive, .FALSE. otherwise. This is the case if SIC is ran during a batch process, or if the logical unit FOR005 is assigned to a file (either directly or through an assignment of SYS$INPUT).