Hi everyone,
I've been trying to analyse some routines in a program written in C language with the Disassemble option in CW for Microcontrollers V6.2 (the trial version), to see the assembly instructions, but I've got some doubts:
1. The .dump window for my source file has this line:
;Address ObjectCode Label Opcode Operands Comment
0x0000000E 0x600A bra.s *+12 ; 0x0000001a
From which I understand that will set the Program Counter to the address of the instruction + 2 + 12 (0x00000E + 2 + 12 = 0x00001C) and not to 0x00001A as the comment says.
But if we look at the machine code, it is 0x600A, which means that the displacement is 0x0A, a 10 in decimal, and that would set the PC to 0x00001A as it suposeddly must do. So I want to know why the displacement at the Object Code is different to that of the assembly operand.
Here is the description for BRA, as it says in the Coldfire Family Programmer Reference Manual:
"Description: Program execution continues at location (PC) + displacement. Branches can be forward with a positive displacement, or backward with a negative displacement. The PC contains the address of the instruction word of the BRA instruction plus two."
Probably I'm misunderstanding something, so please explain me why this happens. Besides, I don't know what that .s in the instruction stands for (I only knew there was .b, .w and .l) and there may lie the answer, but I can't find what it means even in the Coldfire Reference.
2. On the same disassembly there is this line:
;Address ObjectCode Label Opcode Operands Comment
0x0000001C 0x63F2 bls.s *-12 ; 0x00000010
Which would make the program counter point after the previous command I showed you. The function of this line is very clear, but again, I don't know what the .s is for and also I can't find the instruction BLS neither in the Colfire RM, nor in the MCFJM51 RM. So I would like to know what they mean.
3. I would like you to provide me some references to understand .dump disassembly files better, as there are many sections I don't understand and they seem to have very useful information.
Thanks in advance.