Code Monkey home page Code Monkey logo

2-pass-assembler's Introduction

2-Pass-Assembler

C++ code for 2 Pass Assembler

This is a simple C++ code for 2 pass assembler.

Over-review of the Code

There are 2 main methods:

Pass 1: It creates 2 csv files for symbol table and section table respectively. Pass 2: It finalize the machine code for the given tables and code. (It does not create machine code for registers defined within the code.)

Other Functions:

  1. convert(int) : Converts the given decimal number to the Binary String
  2. inti() : Initialize the Machine Opcode Array with Name, Binary Code and Size.
  3. search_mot(string) : It searchers the MOT for the asked Machine Code and returns index in array.
  4. search_symbol(string) : It searches the SYMLAB and returns the location of the symbol.
  5. size_evaluation(string) : It returns the size of the variable.
  6. data_break(string) : It takes value string and converts it into Binary.
  7. store_symlab() : Stores symbol table in csv format.
  8. store_sec() : Store section table in csv.

Structures:

  1. mnemonics : Machine Opcode Table
  2. symbol : Symbol Table
  3. section: Section Table

Data Structures:

  1. Vector
  2. File Stream

Thank You. For any queries you can mail me at: [email protected]

2-pass-assembler's People

Contributors

krishna1401 avatar uditikansal avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.