next up previous contents index
Next: SIC Arguments Retrieving Routines Up: SIC Callable Routines Previous: SIC Callable Routines   Contents   Index

Monitor interface routines

Available subroutines:
        SIC_BEGIN       SIC_OPT         SIC_RUN
        SIC_INSERT      SIC_LOG         SIC_LANG
Available functions:
To build a program around the SIC monitor, different routines are provided. Some must always be used, like SIC_BEGIN, others are simply provided for additional capabilities. These routines have a standard SIC_ like name and are fully described in this section.


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.


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 [*]). 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).


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.

next up previous contents index
Next: SIC Arguments Retrieving Routines Up: SIC Callable Routines Previous: SIC Callable Routines   Contents   Index
Gildas manager 2014-07-01