AMOS - The Creator User Guide - eBook-ENG

Page 298

Executes an assembly language program held in the Amiga's memory. address can be either the absolute location of your coc;le; or the number of an AMOS memory bank which has been previously created with PLOAD. On entry to your program, registers DO to 07 and AOto A2 will be loaded from the values stored in the DREG and AREG arrays. Your assembly language program can now change any 68000 registers it likes. At the start the routine, register A3 will point to the optional parameter list, and A5 will contain the address ofthe main AMOS data area.When your program's finished, you can return to Basic with just a simple RTS instruction. params is a list of parameters which will be pushed onto the A3 stack by the CALL command. These parameters need to be removed in REVERSE order. So the last value you entered into the instruction will be the first on to the stack. Depending on the type of your parameters, the values referenced by A3 will be in one of the following three formats: Integer: Holds a long word containing a normal AMOS integer. Floating point: Contains a floating point number in IEEE single precision format. String: Stores the address of the string. All strings start with a single word containing their length. WARNING! Never poke directly into a string! When a string is initialised to a constant, the string address will pointto the original assignment statement inside the current program listing! So if you change this value, you'll affect your original source code. This is obviously extremely unwise, and should be avoided. For a demonstration of PLOAD and CALL see EXAMPLE 21.1 in the MANUAL folder.

=AREG=

(Variable used to pass information to the 68000's address registers)

a=AREG(r) AREG(r)=a AREG is an array of six PSEUDO variables which are used to hold a copy of the first six of the 68000's address registers. r can range from 0 to 6 and indicates the number of the address register which is to be affected. Whenever the CALL command is executed, the contents of this array are loaded automatically into address registers AO to A2. Atthe end ofthe function, they are then saved back with any new information which has been placed in the appropriate registers.

=DREG=

(Variable used to pass information to the 68000's data registers)

d=DREG(r) DREG(r)=d This is an array of eight integers which holds a copy of the contents of the 68000 data registers. r refers to the register number and can range from 0 to 7 for 01 to 07 respectively.

II II II II

286

II


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.