Hello to the entire community, me again
I'm looking for a reference manual for XGATE or some note of all the assembler instructions and their mode of use or addressing mode.
It calls my attention that I have accidentally used, for example, "INC R2" or "LDW R4, #LABEL" (I also discovered that it works in the IDE due to a typing error like this "LDW R4, LABEL")
I can't find these two examples in the list of instructions that the MC9S12XEP100RMV1 manual shows in the XGATE section.
I want to know if there are any more similar to "BSET", "BRSET", etc. among others, and to know if the instructions I used as an example above only work in the IDE due to some software error or they really work on the MCU. I understand that "LDW" is a pseudo instruction, which is actually an "LDL" plus "LDH", but in the case of "INC" the debugger shows it as "INC".
Then I noticed that I can't activate a semaphore from the XGATE but I can from the S12. I used my old way of semaphore used on the HC11 and HC08. "BRSET and BRCLR; BSET and BCLR on a semaphore register" setting a certain bit in a register with a small routine of logical functions both to set and clear a bit with the XGATE, since using "SSEM" doesn't change the state of the semaphore and returns the CARRY as if it had already been occupied by the S12 when it isn't.
Any answers to all these questions?
Excuse my English, part of it is mine and part of it is from Google Translate
Thanks for reading me.
I hope to find someone who knows how to assemble
Without further ado, I greet you sincerely.
Hi,
The assembler of the CodeWarrior can be found in the installation directory
Sometimes it is suitable to lok at disassembled C code I believe attached example will move you forward. Right miuse button at C code and disassemble.
https://www.nxp.com/docs/en/application-note/AN2685.pdf
The example of semaphores…attached.
Some more examples…
,
Best regards,
Ladislav