A92: Using ASM in C (new message)


[Prev][Next][Index][Thread]

A92: Using ASM in C (new message)




a while back, someone said that l could use the graphlib's fillrect call from 
my C program.  lt went like this:

 _main()
{
 clr_scr();
 fill(10,10,135,10,0);
 idle_loop();
};

void fill(x,y,width,height,color)
int x,y,width,height,color;
{
asm("
 move.w 8(%sp),%d0
 move.w 10(%sp),%d1
 move.w 12(%sp),%d2
 move.w 14(%sp),%d3
 move.w 16(%sp),%d4
     ");
fillrect();
};

what l'm curious about are the n(%sp) values above, where n is one of those 
numbers.  l know that the % stands for a register, but what do the 8 - 16 
numbers and the sp (register?) mean?  Thanks.
--TurboSoft

Visit the TURBOSOFT HOMEPAGE:  The most current Basic programs created by 
Turbosoft for the 89, and the most 89 links.
<A HREF="http://turbosoft.ticalc.org/">http://turbosoft.ticalc.org/</A>