Skip to content

My little compiler of custom assembly for the toy virtual machine

Notifications You must be signed in to change notification settings

JungleTryne/LittleCompiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LittleCompiler

My little compiler of custom assembly for the toy virtual machine.

program:
    LDA R1, 10u
    @loop
    INP R0
    OUTR R0
    EQ R0, R1
    JNCMP @loop
    FIN

Warning

The syntax is clumsy (for example, there must be a new line at the end of the source), but eventually I will try to fix it. Also, compiler errors are not that informative, so make sure that you are writing the right instructions.

Instructions

To learn about architecture and available instructions, please refer to the docs of the virtual machine

Examples

To see the examples, check examples folder.

How to run?

cargo run <path_to_source> <path_to_compiled_bin>

For example:

cargo run ./examples/fibonacci.las ./bin/fibonacci.bin

About

My little compiler of custom assembly for the toy virtual machine

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages