[comp.sys.amiga] C/Assembly Help

foy@aero.UUCP (10/01/87)

I am trying to learn how to compile/assemble the dissolve program on
one of the Fish disks. My compiler and assembler are Lattice 3.10.

One function is :

setbits( plane, maxbit, numbits )
UBYTE *plane;
unsigned long maxbit;
unsigned int numbits;
 {

#asm
 ; register usage: d5 - max bit # to set, d4 - random generator mask
 ; d3 - current random value, d2 - byte offset in array for bit
 ; d2 - bit # to set, d1 - loop counter

reg   d2-d5

      movem.l regs, -(a7)
      move.l 8(a5), a0
	..... etc

#endasm
}

What do I have to do to asseble the assembly code? Do I have to make this
into an assembly module with ref def statements and asseble it seperately
and then link it with the rest of the program. Or is there some when of
calling the assembler when I run the C compile functions.

Thanks for any help.

Richard Foy

jdow@gryphon.CTS.COM (Joanne Dow) (10/03/87)

In article <18009@aero.ARPA> foy@aero.UUCP (Richard Foy) writes:
>
>
>What do I have to do to asseble the assembly code? Do I have to make this
>into an assembly module with ref def statements and asseble it seperately
>and then link it with the rest of the program. Or is there some when of
>calling the assembler when I run the C compile functions.
>
It seems that is impossible. Lattice C does not have an assembler pass.
You have to make it a separate module and link it in.

>Thanks for any help.
>
>Richard Foy


-- 
<@_@>
	BIX:jdow
	INTERNET:jdow@gryphon.CTS.COM
	UUCP:{akgua, hplabs!hp-sdd, sdcsvax, ihnp4, nosc}!crash!gryphon!jdow

Remember - A bird in the hand often leaves a sticky deposit. Perhaps it was
better you left it in the bush with the other one.