ILEGAL OPERAND WHEN INSERT ASM CODE INTO C CODING

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

ILEGAL OPERAND WHEN INSERT ASM CODE INTO C CODING

2,965件の閲覧回数
ganimides
Contributor I
Hi guys!
 
When use the Codewarrior ASM statement inserting this portion below the compiler gives me some error "ilegal operand".
 
 
THis is what I mean:
 
asm  
    {          
        
        
      mov #$00,DDRD    
      mov  #$30,T2SC        
                         
      mov  #$7F,T2MODH
      mov  #$FF,T2MODL      
      mov  #$08,T2SC0       
      mov  #$08,T2SC1       

        lda   #0x00  
        sta   HexDW
       
        lda   #0x00 
        sta   HexDW+1  --->ilegal operand
       
        lda   #0x00  
        sta   HexDW+2  --->ilegal operand
       
        lda   #0x00 
        sta   HexDW+3  --->ilegal operand
       
        lda   #0x00  
        sta   HexDW+4  --->ilegal operand
       
        lda   #0x00 
        sta   HexDW+5  --->ilegal operand
       
  bla bla bla.....
 
How do I fix this problem?.

Cheers.
 
Ganimides 
ラベル(1)
0 件の賞賛
返信
2 返答(返信)

764件の閲覧回数
CrasyCat
Specialist III
Hello Not sure which CPU you are targeting, but can you try: sta HexDW:1 instead of sta HexDW+1 CrasyCat
0 件の賞賛
返信

764件の閲覧回数
jah
Contributor I
try something like:
_asm nop;
0 件の賞賛
返信