Amos Professional Manual  Contents  Index

Machine Code


Creating a machine code language procedure
Machine code procedures are installed using the [Inset Program] option from the [Editor/Procedures] menu. The following steps should be followed:

X> Procedure _MACHINE[A,A$]
   End Proc

Existing closed procedures may also be used for this purpose, and it is perfectly legal to update a routine after the machine code program has been re-assembled.

Once the machine code is installed in this manner, it will be called automatically whenever the new procedure is run from AMOS Professional Basic.

Communicating with a machine code procedure
There are two methods of exchanging information with a machine code procedure.

With the first method, values are loaded into the appropriate Address and Data registers, before the procedure is called using the AREG and DREG functions. For example:

X> Dreg(0)=1 : Dreg(1)=Varptr(A$) : _MACHINE
   Procedure _MACHINE
Back    Next
14.A.12