COMPILING AND LINKING A C/C++ PROGRAM

This page provide instructions on how to compile, assemble, and link a source file written in C/C++. The compiler, assembler, and linker programs are available in both UNIX and PC platform. The commands for the compiler, assembler, and linker in the UNIX environment is similar to those under the PC platform: An example of a linker command file is shown below:

   /*MATRIXC.CMD - LINKER COMMAND FILE */ 
   -c /*using C convention */ 
   -stack 0x100 /*256 words stack */ 
   matrixc.obj /*object file */ 
   -O matrixc.out /*executable output file */ 
   -l rts30.lib /*run-time library support*/ 
   
   MEMORY 
   { 
   RAMS: org=0x809800, len=0x2 /*boot stack */ 
   RAM0: org=0x809802, len=0x3FE /*internal block 0*/ 
   RAM1: org=0x809C00, len=0x3C0 /*internal block 1*/ 
   } 
   SECTIONS 
   { 
   .text: {} > RAM0 /*code */ 
   .cinit: {} > RAM0 /*initialization tables*/ 
   .stack: {} > RAM1 /*system stack */ 
   }