[comp.sys.atari.st] Information about the linea routines.

keb@picuxa.UUCP (11/25/87)

I have a Megamax C compiler Version 1.1 and would like to utilize
the linea routines from the in-line assembler.  Specifically, I
only need to write a pixel to the screen ($a001 - linea opcode).
The information that I am currently using, the ABACUS ST Internals
book, is not very clear about what variables must be declared
and initalized for the routines to function.  Megamax on the other
hand is not very clear with their explanation of variable passing
to and from the assembly routines.  Would someone please be willing
to recommend a good reference guide for the linea routines or
better yet provide a simple example of the code for the Megamax
C compiler.   

			Thanks in advance.
			Kurt Brink

picuxa!keb

braner@batcomputer.tn.cornell.edu (braner) (11/27/87)

[]

I havn't used the linea stuff but use Megamax AL often.
You can access C variables 3 ways:

int extint;
func()
{
	register int regint;
	int intint;
asm {
	MOVE regint,...		/* access registers by name */
	MOVE intint(A6),...	/* local vars: name is offset from A6 */
	MOVE extint(A4),...	/* external vars: name is offset from A4 */
	DC.W 0xA001		/* this is how you would stick A_codes in */
	MOVE stuff,D0		/* returning a value from a function */
    }
}

Remember not to change A2-A7/D4-D7 in your asm{} code.  A0/A1/D0-D3
are free, A2/A3/D4-D7 are the register variables, A4-A7 are reserved.

Some of that will change in the new version (2.0) of the Megamax compiler.

- Moshe Braner

Jinfu_Jinfu_Chen@cup.portal.com (11/29/87)

I have copy of linea.c/.h file from Megamax's BBS. However, I can't make it
compiled. My knowledge of asm is next to zero so if you are interested to fix
it  can post it here.

---------------------------------------------------------------------------
Jinfu Chen

ARPA: Jinfu_Jinfu_Chen@cup.portal.com
GEnie: J.CHEN
CI$:   72327,2434
Voice: (207)846-6124 (until December 5th)