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.
已解决! 转到解答。
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
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
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.