mpc5554  c code to assembly code help

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

mpc5554  c code to assembly code help

2,054 Views
juzi
Contributor I
 
 hello,
     i  need to  translate the following c code             
             SIU.PCR[189].R=0X0100;
into  assembly code,i do not  how to do it.
   the code is for mpc5554.can you help me? thanks.
 
Labels (1)
0 Kudos
2 Replies

531 Views
lptttt
Contributor I
directly write the memory address
like this:not real code
 
lwz  r13,0X0100
lwz  r14,adress_of_SIU.PCR[189].R
stw  r13,0(r14)
0 Kudos

531 Views
CrasyCat
Specialist III
Hello
 
You can let CodeWarrior disassemble the generated code.
This is done in the following way:
  - Open your project in CodeWarrior
  - Open the Target settings dialog (press ALT + F7)
  - Switch to the "EPPC Disassembler" panel
  - Check "Show Source Code" check box.
  - Click OK to close the dialog.
  - Open the C source file, where you have the instruction in an edit window
  - Click with the right mouse button in the edit window
  - Select Disassemble. A new window is opened showing disassembly listing.
 
Scroll down until you see source code for your function and check the code
generated by the compiler here.
 
CrasyCat
0 Kudos