where can I find assembler file

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

where can I find assembler file

跳至解决方案
2,717 次查看
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
标签 (1)
标记 (1)
0 项奖励
回复
1 解答
1,212 次查看
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 项奖励
回复
4 回复数
1,212 次查看
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 项奖励
回复
1,212 次查看
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 项奖励
回复
1,212 次查看
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 项奖励
回复
1,213 次查看
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 项奖励
回复