where can I find assembler file

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

where can I find assembler file

Jump to solution
2,708 Views
stevec
Contributor III
   I'm just starting to use CodeWarrior and would like to know where  i can find the generated assembler code. Is it a separate file somewhere?

Steve
Labels (1)
Tags (1)
0 Kudos
Reply
1 Solution
1,203 Views
CrasyCat
Specialist III
Hello
 
To get a look at the code generated by the compiler for one single module you have two solution:
  1- Use drop down menu
  - Open the Project in the IDE
  - Open the source file you want to check in an edit window
  - Click with the right mouse button in the edit window and select Disassemble from the drop down menu.
    A new edit window will be opened showing the disassembly listing.
 
  2-. Get the compiler to generate the disassembly listing when building
    - Open the project in the IDE
    - Open the Target setting window (Press ALT + F7)
    - Switch to "Compiler for HC08" or "Compiler for HC12" (depending whether you are building
       for HCS08 or HCS12).
    - Add option -Lasm in the Command Line edit box.
      Now each time you compile a source file the compiler will generate a disassembly listing file with
       extension .lst in your output directory.
     The output directory is {Project}\bin if you did not change it in your project.
 
I hope it helps.
 
CrasyCat

View solution in original post

0 Kudos
Reply
4 Replies
1,203 Views
J2MEJediMaster
Specialist I
I'm assuming you're using the HC08 tools. To generate a quick assembly dump, right-click on the source file's name and choose Disassemble from the drop-down menu that appears. If you're wanting to look at the final assembly with all of the addresses fixed up, go the Preferences panels (Edit | YourProjectName Settings...) and choose the Assembler panel. Click on the options button, and checkbox the item, "Generate a listing file". I'm using the HC12 tools here, so be warned the HC08 arrangement may be somewhat different.

---Tom
0 Kudos
Reply
1,203 Views
stevec
Contributor III
Thanks. But that path doesn't come up on my CodeWarrior. None of the pull down menus have reference to any assembler options. The Help system documents which boxes to tick but doesn't say how to get to the Assembler drop down from the main CodeWarrior 'front page'. I am using CodeWarrior Development Studio  IDE version 5.7.0. Like I said I'm new to this software so am probably missing something obvious.
0 Kudos
Reply
1,203 Views
peg
Senior Contributor IV
Hi steve,
 
You either write in "C" and "compile" to "machine code" OR write in "assembler" and "assemble" to "machine code".
If debugging or reverse engineering you might "disassemble" "machine code" into "assembler".
Machine code in the Motorola/Freescale world is often stored in a S-record format.
Codewarrior produces machine code strored in S-record format which it by default stores in \Projectname\bin as Project.abs.s19
 
Given the above, what exactly are you after?
 
0 Kudos
Reply
1,204 Views
CrasyCat
Specialist III
Hello
 
To get a look at the code generated by the compiler for one single module you have two solution:
  1- Use drop down menu
  - Open the Project in the IDE
  - Open the source file you want to check in an edit window
  - Click with the right mouse button in the edit window and select Disassemble from the drop down menu.
    A new edit window will be opened showing the disassembly listing.
 
  2-. Get the compiler to generate the disassembly listing when building
    - Open the project in the IDE
    - Open the Target setting window (Press ALT + F7)
    - Switch to "Compiler for HC08" or "Compiler for HC12" (depending whether you are building
       for HCS08 or HCS12).
    - Add option -Lasm in the Command Line edit box.
      Now each time you compile a source file the compiler will generate a disassembly listing file with
       extension .lst in your output directory.
     The output directory is {Project}\bin if you did not change it in your project.
 
I hope it helps.
 
CrasyCat
0 Kudos
Reply