Amos Professional Manual  Contents  Index

Machine Code


Integers. The parameter holds a long word, containing a normal AMOS Professional number. It can be grabbed with a line such as this:

Move.l (a3)+,d0

Single precision numbers. These are stored in Fast Floating Point format, and are held in one long word. To load such a number into register d0, use the following:

Move.l (a3)+,d0

Double precision numbers. These are stored in IEEE double precision format, and are held as two long words. To load a double precision variable into registers d0 and dl, you could use this:

Move.l (a3)+,d0   * Top half 
Move.l (a3)+,d1   * Bottom half

Strings. The stack contains the Address of the string in memory. All strings begin with a single word that holds their length. For example:

; Grab the string. Each string is stored at an EVEN address,
; starting with the length of the string, and then the string itself

Move.l (a3)+,a2    * Address of the string
Move.w (a2)+,d2    * Length of the string

AREG
reserved variable: pass values to and from 68000 address register
a=Areg(number)
Areg(number)=a

AREG is a special array which is used to pass values to and from any of the 68000 processor's address registers. Specify the number of the register from 0 to 6, selected from either of the following two groups:

A0, Al, A2. These registers can be read from AMOS Professional Basic, and changed at will. Whenever a machine code program is run, any new values will be transferred straight into the relevant address register. For example:

X> Areg(0)=Varptr(A$) : Rem Load the address of A$ into A0
   Areg(1)=Varptr(B(0,0)) : Rem Load the address of B(0,0) into Al

A3, A4, A5, A6. These are read-only registers. Any attempt to change their current contents will generate an "illegal function call" error message.

DREG
reserved variable: pass value into 68000 data register
d=Dreg(number)
Dreg(number)=d

DREG can be used to move values back and forth between AMOS Professional Basic and the 68000's Data registers, by specifying the number of a data register from 0 to 7.

Back    Next
14.A.15