Skip to content

A programmed assembler, parser, pre-processor for a hypothetical machine created for education purposes

License

Notifications You must be signed in to change notification settings

zaitera/Hypothetical-Machine-Assembler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

80 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A programmed assembler, parser, pre-processor for a hypothetical machine created for education purposes

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages