__asm__ __volatile__ ("tsta\n" "bne ccnp_skip\n");
You need to determine what was in A register in GCC code just above ^^ this line. Certainly A had to be loaded with some variable or maybe higher order byte of 16 or 32 bits variable. It could be also top most byte of some floating point variable and this asm line could be used to perform quick check for positive floating number is not to small or smth like that. Provided A was loaded with 8 bit variable var, code may look like this
a) in case ccnp_skip label is below __asm__ line
if( var == 0 )
{
// code between __asm__ and ccnp_skip label
}
ccnp_skip:
b) in case ccnp_skip label is above __asm__
do{
// code between __asm__ and ccnp_skip label
} while (var != 0);
__asm__ __volatile__ ("tsta\n" "bne ccnp_skip\n");
You need to determine what was in A register in GCC code just above ^^ this line. Certainly A had to be loaded with some variable or maybe higher order byte of 16 or 32 bits variable. It could be also top most byte of some floating point variable and this asm line could be used to perform quick check for positive floating number is not to small or smth like that. Provided A was loaded with 8 bit variable var, code may look like this
a) in case ccnp_skip label is below __asm__ line
if( var == 0 )
{
// code between __asm__ and ccnp_skip label
}
ccnp_skip:
b) in case ccnp_skip label is above __asm__
do{
// code between __asm__ and ccnp_skip label
} while (var != 0);