Amos Professional Manual  Contents  Index

Interface Language


Machine code extensions
The final part of this Chapter explains how to add your own machine code extensions directly into the AMOS Professional Interface.

CAll
Interface instruction: call a machine code extension
CA address;

The address parameter refers to the address of a machine code program in memory, and the easiest way to load it is to place it into an Interface variable from the main program. For example:

X> Vdialog(1,0)=Start(6) : Rem Load 0VA of channel 1 with the address of bank 6.

You can now run your CAll routine using a line like this:

X> Call 0VA;

Machine code can be used to modify all registers, and should return with an RTS. All aspects of using machine code for your AMOS Professional programs are examined in detail in Appendix A of this User Guide. If you are familiar with assembly language, the following brief information will be of use:

On entry to your routine, data will be placed in the address registers like this:

A6= Program pointer
A5= AMOS datazone
A4= Base of this Dialog Structure
A3= Parameter stack. Use this to grab values from the Interface stack.
Back    Next
09.02.10