MD5000 ASSEMBLER

Team Leader: Dan Wells
Team Member: Julie Gravley
Team Member: Paul Millar
Team Member: Nan Ma

Project Background

This project is a combined project between ECE291 and ECE249. In ECE249 Paul Millar, Dan Wells, and one other person are designing an 8-bit microprocessor that will be implemented using VHDL code and flash CPLD technology. The goal in the ECE249 portion of this project is to complete the hardware and have a totally functional processor by the end of the semester. This processor has a 256 byte RAM which stores machine instructions and program data.

To help make the processor more useful and easier to interface, our ECE291 final project fulfills two specific needs of the processor design. The first portion of the project is a command-line assembly compiler on the 80x86. Instead of having to write programs in machine code, a simple assembly language (strongly based on the 80x86 assembly instructions) allows the user to write long programs without having to code in binary.

Project Accomplishments

1) We designed a command-line compiler for the MD5000.
· Open a standard text file as an input (given as a command-line parameter).
· Output is a text file with ASCII zeros and ones, representing the machine code equivelant of the input ASM file.
· Check the syntax of each line as it compiles. If there is an error, a message will be displayed on the screen with the line number and the type of error (several specific types of errors are be recognized and reported by the compiler).
· Allow the declaration of 1-byte variables.
· Allow for comments via the semi-colon (like MASM).
· Allow immediate data to be entered in decimal, binary, and HEX.
· Labels for branching.

2) We also designed a simulator for our compiler which properly executes the compiled code and shows the updating of registers and memory.

This project was very, very challenging because none of us had designed a compiler before. Everything was done in assembler, and we had to sit down and really think about how to approach this problem. There are so many cases where an error could be in code and how to compile a line. Our compiler had to handle all of these variables, and, for the most part, we were very successful. We were able to finish our project with only a few minor glitches.