B-Tech Project - CISC Emulator

By: Peter McClymont
Supervisor: DR S. Manoharan
 
 

Project Description


My B-Tech project is a CISC emulator, emulating the Pentium (IA-32) processor. My supervisor is Dr S.Manoharan. 

It was originally the idea that I would be writing an emulator for the new Intel Itanium (IA-64) processor. I downloaded a cross compiler which I was unable to get running in a Linux box so this meant that an emulation of the Itanium (IA-64) was out of the question. This lead me to continue with writing an emulator for the Pentium processor instead. A similar project was started by Nalin Gupta and he suceeded in the writing of a loader. His project was adapted to continue progress with the emulator. You can take a look at his project homepage at http://www.tcs.auckland.ac.nz/~ngup001/durvasa
 
 

Progress


I have found many useful resources from the web, the library and from Nalin which I have used to become familiar to the Pentium architecture. This includes two pdf files, one which I got from Nalin (The Sofware Developers Manual part 2) and the other  I got from the http://www.intel.com web site (The Sofware Developers Manual part 1).

Along the way I have come accross a number of problems that have hindered my progress. I have twice had to fix the loading of the core that Nalin wrote. The first time it missed loading one of the sections into the core, and the second time it was not correctly calculating the size of the text and data segments. This was affecting each read that was being made from the data segment and giving incorrect data back. I have had to rewrite the implementation of the EIP (the instruction pointer). The old implementation didn't allow a proper implementation of the absolute call and jump instructions. This was because the EIP held a pointer to the core array rather than the actual current virtual address. 

The debugging and testing has been a long process that has required a lot of patience. One bug in the program will screw up the whole emulation process so it has been vital to detect and fix all problems. The addition of a few basic system calls has been finished too.

The current version now correctly runs the 'add.o' object file included with the source, that adds two numbers together. The emulation doesn't correctly run on the print.o (prints 'Hello World' to the screen), but this is very close.

Feel free to download the Source, the Elf library, and the Readme files, which will allow you to run the emulator.

Also feel free to look at my final Report or Presentation.
 



site maintained by: Peter McClymont