 
					
				
		
 
					
				
		
Hello
First I would recommend you to install the official CodeWarrior for StarCore V2.7. This tool comes with Engineering build EB17B.
I assume you are building with optimization level 3. Am I right?
If this is the case, the compiler might inline the function t7 several times in the same function.
In order to tell the compiler to generate unique label within an inline function, please use the prefix %C in front of the label.
In your case rewrite the function t7 as follows:
static asm char t7(int p)
{
asm_header
 .arg
  _p in $d7;
return in $d8;
 .reg $d7,$d8,$r1;
asm_body
 
  clr      d8               move.l   #_sample,r1       doen3 d7
  dosetup3 %C_L10
  loopstart3
%C_L10:
  move.b   (r1),d1
  add      d8,d1,d8
  inc      d1
  move.b   d1,(r1)+
  loopend3
asm_end
}
 
I hope this helps.
CrasyCat
 
					
				
		
Thanks, that resolved it.
-imran
