22
K
A
DAK
General AMX Operation
An AMX system can be launched permanently from a startup module coded in assembly
language as illustrated in the following example.
Systems of this type begin execution at the AMX entry point AAENTR with the launch
parameter in register BX. Register BX[0] must be set to zero to indicate that a permanent
launch is required. Register pair ES:SI must provide a pointer to the User Parameter
Table in the System Configuration Module which defines the characteristics of your
AMX system.
Set register BX[1] to 1 (AMLPVA) if interrupt vectors are to be alterable. If you set register
BX[1] to 0, you will not be able to use AMX services to dynamically install pointers to
Interrupt Service Procedures into the vector table.
Set register BX[1] to 0 if interrupts are to be disabled during the startup process. If you
set register BX[1] to 1 (AMLPIE) to enable interrupts during the launch, be sure that
interrupts from a particular device are inhibited until you have installed an ISP to handle
interrupts from the device.
When AMX is started in this manner, it immediately establishes the AMX Kernel Stack
as the current stack. There is therefore no need for your application to provide a stack for
a permanent launch.
In a ROM based system, AMX is frequently restarted whenever the 8086 processor is
reset. A startup module, coded in assembler, receives control, initializes the 8086, enters
protected mode and starts AMX as illustrated in the following example.
EXTRN AAENTR:FAR ;AMX Entry Point
EXTRN _AMXUPT_:DWORD ;A(User Parameter Table)
;
USER_CODE SEGMENT BYTE 'CODE'
;ASSUME CS:USER_CODE
;
UPTADR DD _AMXUPT_ ;A(User Parameter Table)
;
START PROC FAR
:
Initialize 8086
:
LDS SI,CS:UPTADR ;DS:SI = A(User Parameter Table)
MOV BX,AMLPVA ;BX = no exit, vectors alterable
;and interrupts disabled
JMP AAENTR ;start AMX
;
START ENDP
;
USER_CODE ENDS