Interior_Banner_Events

Constructing an Assembler and Virtual Machine

Devin Wright and Dr. Curtis Ray Welborn, Department of Computer Science, Utah Valley University, 800 West University Parkway, Orem UT 84058

In the first half of the Computer Science track Capstone, students design and build a RISC-based assembler (ASM) and virtual machine (VM) from scratch. This project is completed by a single individual; group projects and collaboration of any kind is prohibited. Students must also implement assembly programs to demonstrate their ASM/VM and all of the required features function properly. 

For Project 1, students build a 2-pass ASM and a VM capable of the sequential execution of code. In the first pass, proper syntax is verified and the symbol table is created. In the second pass, byte code is generated and loaded into the VM’s memory. The VM interprets and executes the byte code. This phase’s assembly program is a sequence of mathematical operations that displays formatted results to the console. 

Project 2 adds register indirect addressing capability and branching instructions. This phase’s assembly program implements if-else statements and loops that perform various operations on arrays.

For Project 3, registers are implemented for creating activation records on the run-time stack in the ASM/VM, along with an instruction that allows character data to be read from the terminal. This phase’s assembly program implements non-recursive functions and reinforces control structure concepts. The large assembly program required tests whether students’ coding skills can scale up.

Project 4 has three parts. In parts 1 and 2, students refine what they learn in projects 2 and 3 by implementing a recursive function and performing more array processing. For part 3, students add instructions that implement thread stacks to allow the recursive function from parts 1 and 2 to execute on multiple non-native threads.

The ASM/VM constructed during the first half of the Capstone is utilized during the second half where students will then implement an object-based compiler for their personally-constructed VM.




Additional Abstract Information

Presenter: Devin Wright

Institution: Utah Valley University

Type: Poster

Subject: Computer Science

Status: Approved


Time and Location

Session: Poster 4
Date/Time: Tue 11:00am-12:00pm
Session Number: 3619