Skip to content

Latest commit

 

History

History
50 lines (43 loc) · 2.29 KB

README.md

File metadata and controls

50 lines (43 loc) · 2.29 KB

Hypothetical-Machine-Assembler

├── README.md (This file)
├── /docs
│ └── Trabalho1.pdf (Specifications of the assembler to be done - in portuguese)
│ └── test-codes (a directory with some .asm codes for validation)
├── /code
| └── /src/
|         └── main.cpp (principal code of the project)
| └── /includes/ (libraries headers directory)
|          └── preprocessor.h (Preprocessor's library header)
|          └── assembler.h (Assembler's library header)
| └── /lib/ (libraries source code directory)
|          └── preprocessor.cpp (preprocessor's library source code)
|          └── assembler.cpp (Assembler's library source code)
| └── CMakeLists.txt (Cmake build configurations)
| └── build.sh (building script)
| └── build (directory made by the script and is deleted when it's done compiling)

Introduction:

An assembler of an invented simple assembly language, this language was invented to facilitate the understanding of compilers, interpreters and basic software components.

ISA of our hypothetical machine:

Other directives of our hypothetical machine:

Requirements:

  • Any operating system (Linux, Windows, macOS)
  • Cmake - at least version 3

Instructions:

Just run the script build.sh

>sh build.sh

And then run the program with the assembly program you would like to assemble:

>./bin/main 'Input-filename'.asm

Expected output (if no errors we're found on the original input file):

  • 'Input-filename'.pre (the preprocessed file)
  • 'Input-filename'.obj (the object binary code of the input file)

Conventions adopted writing the code: https://gist.github.com/lefticus/10191322