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

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

Jump to solution
1,224 Views
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.

Labels (1)
Tags (1)
0 Kudos
Reply
1 Solution
1,056 Views
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

 

View solution in original post

0 Kudos
Reply
2 Replies
1,057 Views
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 Kudos
Reply
1,056 Views
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 Kudos
Reply