Hi Douglas-san,

Thanks for the information.
I could clean up my code on CW5.

Finally following code could be compiled successfully.

asm void
foo ( void )
{

     MOVEM.L D0-D7/A0-A7, -(SP)
     LINK         A6, #-4
     LEA          0xFFFFF305, A0
     BCLR    #2, (a0)
     UNLK       A6
     MOVEM.L (SP)+, D0-D7/A0-A7
     RTS
}

"Douglas>I think your assembly is a bit buggy (though it's true that
codewarrior
"Douglas>doesn't always report the error messages on the right line)
"Douglas>
"Douglas>>      link.w    a6, +0x04
"Douglas>--------------------------
"Douglas>Problems:
"Douglas>- The
"Douglas>.w
"Douglas>isn't needed (and I think codewarrior doesn't like it)
"Douglas>- You need a
"Douglas>before the 0x04
"Douglas>- You likely want the displacement to be negative, since right now
you're
"Douglas>Putting a6 on the stack and immediately popping it off.
"Douglas>Suggested fix:
"Douglas>link a6, #-4
"Douglas>
"Douglas>>      lea.l     0xfffff305, a0      // Here illegal addressing mode
error
"Douglas>-----------------------------------------------------------------------
---
"Douglas>Problems:
"Douglas>- The
"Douglas>.l
"Douglas>isn't needed
"Douglas>Suggested fix:
"Douglas>lea 0xfffff305, a0
"Douglas>>      bclr 0x0002, a0          // Here    illegal addressing mode
error
"Douglas>-----------------------------------------------------------------------
-
"Douglas>Problems:
"Douglas>- You need a # before the displacement
"Douglas>- bclr doesn't work on address registers (see the 68K manual)
"Douglas>Suggested fix:
"Douglas>bclr 2, d0
"Douglas>
"Douglas>


Thanks, Ciao!

Kazushige Matsui
-------------------------------------------------------
Network Product Development, Application Design, Yasu IBM-Japan
Tie     :  1617-8374
TEL    :  077-587-8374
FAX    :  077-587-8484
e-mail :  [EMAIL PROTECTED]
★★★★ お知らせ: 電話番号・FAX番号・内線がかわりました! ★★★★

Reply via email to