Skip to content

deparr/y86-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Y86-64 Interpreter

A terribly structured and not-at-all-idiomatic implementation of the y86 assembly language described in this textbook.

This particular implementation is based on a class project I did in C.

Usage

y86 'object' files are expected as input, where each line takes the following form:

<ADDRESS>: <BYTE ENCODING> | <READABLE ASM>
    ...

For example, the following y86 asm...

nop
rrmovq %rax, %rbx
xorq %rax, %rax
halt

would produce the following object file:

0x0000: 10                     | nop
0x0001: 2003                   | rrmovq %rax, %rbx
0x0003: 6300                   | xorq %rax, %rax
0x0005: 00                     | halt

There are also examples in yo-files/

Options

-c will stop and print the machine state between every cycle, press Return to advance the machine.

-s has the effect of -c and also stops in between stages of each cycle, press Return to advance.

You can also use an online simulator to produce object code, though not all instructions are supported (breakpoints in particular).

About

A y86-64 asm interpeter

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages