2004-01-12 04:57 PM
2004-01-06 09:06 PM
How con I implement a jump table in inline assembly with Metrowerks C compiler? Following code doesn't work :
asm{ ... LD X,Nerx SLL X ; X <- Nerx * 2 LD A,(TB_GRAF_RX+1,X) PUSH A ; MSB of return @ LD A,(TB_GRAF_RX,X) PUSH A ; LSB of return @ RET ; Branch to subroutine (TB_GRAF_RX + 2*Nerx) TB_GRAF_RX: DC graf_rx_0, graf_rx_1, graf_rx_2 ,graf_rx_3 DC graf_rx_4, graf_rx_5, graf_rx_6 ,graf_rx_7 graf_rx_0: ... graf_rx_1: ... and so on... VD2004-01-12 04:57 PM
Hai Vdelpy,
Could you please mention what kind of error you are getting. If the variables used in the inline assembly being used by your c functions in another file, then you have to declare those variables using 'xref'. I hope you are aware of these things. Please specify the error. Tx