Home » WDCTools » WDC02cc with Optimizer

WDC02cc with Optimizer

Introduction

The WDCTools suite with this extension provides the tools needed to do effective C and assembly language development for the 65C02 family of microprocessors. The compiler is built on top of the WDC W65xx assembly language development system. The assembly language development system consists of a full macro assembler, an object file linker and an object file librarian. It is important to note that WDCTools and extensions such as this C Compiler and Optimizer are to ONLY be used with WDC 65xx technology and WDC does not promote the use with any other 65xx technology.

Compiler Operation

The WDC C compiler reads the input file function by function and produces a parse tree for the entire function. A few optimizations are performed on the tree before generating code. The code generator then reads the parse tree and generates a list of assembly language instructions that are written to a temporary file. If the optimizer has been invoked, it reads the assembly language file, im proves the code where possible and writes it back out. The assembler is then executed to convert the assembly language instructions into object format. The assembler deletes the temporary file after finishing.

Optimizer

This version of the compiler comes with a post-pass-peephole optimizer called WDC02OPT. This optimizer operates on the assembly language output of the compiler and performs a number of optimizations that generally save about 10 percent on code size depending on the program. To invoke the optimizer, use the -SP option. If -SP is used in conjunction with -A, the output file will contain the optimized assembly language.

Note that the optimizer makes assumptions about the format of the assembly language output of the compiler and will not operate properly on hand-written assembly language programs.

The following optimizer options support the corresponding compiler options:

  • -L Call the assembler with the listing option
  • -LW Call the assembler with the wide listing option.
  • -K Causes the path name specifying the name of the listing file to be placed in the reserved word __FILE__.

 

Please provide your name and email address for your free download.

Please wait...
Loader