A89: Using ASM in C (new message)


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

A89: Using ASM in C (new message)




TurboSoft@aol.com writes:
 > 
 > a while back, someone said that l could use the graphlib's fillrect call from 
 > my C program.  lt went like this:
 > 
 > [ .. ]
 >  move.w 8(%sp),%d0
 >  move.w 10(%sp),%d1
 > [ ... ]
 > 
 > 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.

10(%sp) means "the object that is at an address 10 bytes larger than
the current value of the register sp". SP, standig for stackpointer is 
just an other name for the register a7.

By the way, if you use gcc (or a derivative) and interface assembly and 
C that way, you are looking for serious trouble.

Regards,

Zoltan


References: