The inbuilt Compiler is a high-level language compiler that supports modern language constructs. It can generate CPU instructions that the CPU Simulator can run. The generated bytecode can also be run using the provided Virtual Machine as a console application.

Compiler Image

A relatively basic but complete high-level teaching language is developed to support the CPU and OS simulations. This language incorporates the standard language control structures, constructs and system calls which are used to demonstrate a modern computer system’s key architectural features. A compiler is developed for this language that generates both assembly language and its equivalent binary byte-code as output. The compiler is also able to disassemble the binary byte-code back to its assembler code equivalent thus demonstrating reverse-engineering concept desirable in certain circumstances.

The compiler includes refinements such as code optimizations, support for profiling, display of compiler stages and the binary code generated as well as some statistical data. Additionally, the compiler includes an integrated tabbed source editor capable of handling multiple source code at the same time. The “teaching” compiler can support a module on compiler design.

The compiler optimizations can be used to demonstrate performance gains due to reductions in code size and enhancing CPU pipelining when jump instructions are eliminated. They can also be used to demonstrate that an experienced human assembly coder is still a better producer of more efficient code than optimizing compilers! The compiler and its associated language naturally support the CPU and the OS simulations thus reflecting the importance of the language processors.

Compiler Data

Symbol Table: Displays information on program variables such as type, size in bytes, any associated register, memory address, whether initialised and reference counts. Some variables may be stored in registers instead of main memory locations for faster access.

Subroutine List: Displays information on subroutines. Information such as subroutine address, size in bytes, are displayed. Other attributes such as interrupt number for interrupt handling subroutines, exception number for exception handling subroutines, whether thread subroutine, and whether inline subroutine are also shown.

Classes: This information is displayed for object oriented programs containing classes. It shows the methods and their access attributes as well as the class variables and their access attributes. The tree structured display shows the inheritance hierarchy of classes.

%d bloggers like this: