10.2 using JMP instruction with IX1/2 addressing mode in Relocatable Assembly

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

10.2 using JMP instruction with IX1/2 addressing mode in Relocatable Assembly

ソリューションへジャンプ
1,229件の閲覧回数
MatthewScott_DE
Contributor II

Attempting to JMP to another labeled point, plus an offset, within the same block of relocatable assembly code.

 

Using codewarrior 10.2 with C and relocatable assembly support on the project.  Wondering if there is a complier option that will allow me to use this instruction.

 

Thank you for the help.

ラベル(1)
タグ(1)
0 件の賞賛
返信
1 解決策
1,061件の閲覧回数
bigmac
Specialist III

Hello,

 

I assume that you are using separate .asm file(s) for your assembly code, and not inline assembly within a .c file?

 

If the offset label is defined within a .c file, this will need to be imported to the .asm file using XREF.  It would be helpful if you would attach a code snippet to demonstrate your problem.  You should also mention which errors are reported by the compiler.

 

Regards,

Mac

 

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
1,062件の閲覧回数
bigmac
Specialist III

Hello,

 

I assume that you are using separate .asm file(s) for your assembly code, and not inline assembly within a .c file?

 

If the offset label is defined within a .c file, this will need to be imported to the .asm file using XREF.  It would be helpful if you would attach a code snippet to demonstrate your problem.  You should also mention which errors are reported by the compiler.

 

Regards,

Mac

 

0 件の賞賛
返信
1,061件の閲覧回数
MatthewScott_DE
Contributor II

This was assembly written within a .c file using the #asm/endasm directives.

 

EX:

#asm ... LDHX INDEX JMP BITD,XBITD PULA SUB #V2 BLE MTCH BRA NTCH PULA SUB #V2 BLE MTCH BRA NTCH ...#endasm

 

I have since changed to a different meathod that doesn't involve any indexed jumping.  I am now using the index to directly select the SUB value from a part of the direct page memory.

0 件の賞賛
返信