General AMX Operation
K
A
DAK
23
Temporary Launch
Your AMX operating system can be started, allowed to run for a while and then stopped.
This type of operation is called a temporary launch. The most common application of
this type occurs on PC compatibles. An AMX operating system is started from DOS,
allowed to operate for a while and then forced to return to DOS.
If you wish to start an AMX system for temporary execution from a module coded in
assembler, refer to the source code for procedure ajentr in AMX source file
AJ831KI.ASM in installation directory AMX831\CIF. Mimic the simple operations which
are provided by that procedure.
An AMX operating system can be started for temporary execution from a main C
program as in the following example.
AMX is started at its entry point ajentr with three parameters. The first is the launch
parameter AMLPTMP+AMLPVA indicating that the launch is temporary (bit 0 set by
AMLPTMP), vectors are alterable (bit 1 set by AMLPVA) and interrupts are to be disabled
during the launch (bit 2 is 0).
If the vector table is in ROM or, for any reason, is not to be altered by AMX, replace the
value AMLPVA in the launch parameter with the value 0. In this case, you will not be able
to use AMX services to dynamically install pointers to Interrupt Service Procedures into
the vector table.
If you wish interrupts enabled during the launch process, add AMLPIE to the launch
parameter. Be sure that interrupts from a particular device are inhibited until you have
installed an ISP to handle interrupts from the device.
As for a permanent launch, the second parameter is a pointer to your User Parameter
Table. The third parameter is a pointer to a double word variable of your choice.