项目作者: cicovic-andrija

项目描述 :
Systems programming toolchain: assembler, linker and emulator
高级语言: C
项目地址: git://github.com/cicovic-andrija/asm-toolchain.git
创建时间: 2020-07-11T06:48:32Z
项目社区:https://github.com/cicovic-andrija/asm-toolchain

开源协议:MIT License

下载


RISC emulator and programming tools

An implementation of an emulator for an abstract RISC instruction set,
and a toolchain consisting of an assembler and a linker that can
compile the specified assembly language and produce a binary file,
ready to be loaded and executed in the emulator.

Specification

Read the full specification of the project, in Serbian: ETF_SS

The specification also contains detailed explanation of the solution.

Quick build

In order to compile the entire toolchain, execute the following commands:

  1. $ git clone https://github.com/cicovic-andrija/risc-runtime.git
  2. $ mkdir -p ~/bin/
  3. $ make

Build each tool separately

It is possible to compile each tool separately, using an appropriate
make rule:

  1. $ git clone https://github.com/cicovic-andrija/risc-runtime.git
  2. $ mkdir -p ~/bin/
  3. $ make assembler
  4. $ make linker
  5. $ make emulator

This can also be accomplished by executing make command from
within each tool’s directory. For example, to build a linker, execute:

  1. $ git clone https://github.com/cicovic-andrija/risc-runtime.git
  2. $ cd linker/
  3. $ make

Assembler usage

  1. $ ass [-o file] [-t file] [-l file] [-a addr] [-h] input_file
Option Explanation
-o file Specify relocatable object output binary file
-t file Specify relocatable object output text file
-l file Specify log file
-a addr Define load address for sections
-h Print help message and exit

Linker usage

  1. $ lnk [-o file] [-t file] [-l file] [-i] [-h] object_file...
Option Explanation
-o file Specify executable output binary file
-t file Specify executable output text file
-l file Specify log file
-i Ignore section load addresses predefined in input files
-h Print help message and exit

Emulator usage

  1. $ emu [exec_file]

Examples

Some example programs, written in assembly language, together with
accompanying Makefiles for building with the toolchain, can be found
under ./examples.