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,226 次查看
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,058 次查看
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,059 次查看
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,058 次查看
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 项奖励
回复