Giter VIP home page Giter VIP logo

2-pass-linker's Introduction

Lab 1 Andrew Park (hp1141)

To compile: javac lab1.java To run: java lab1

The program will take input from keyboard using Scanner. Simply copy & paste the appropriate input.

The program has been tested with all 9 inputs provided by Professor Yan. All 9 inputs produced correct outputs.

The program utilizes OOP using 3 main objects: Module, Symbol, and Text.

The program extensively uses ArrayList from the Java library. The choice was made due to the flexible nature of ArrayList, and the decent runtimes of different operations such as retrival, add, and more.

The arbitrary limit of Symbol length is 8. If a Symbol is longer than 8 characters, the program will produce a warning at the end. However, the program will not cut the string short or modify the string. The program will proceed without modifications after the warning.

During input read, the program will calculate the base address of each module.

During pass 1, the symbol table will be created & stored. Moreover, the absolute address of each definition will be calculated.

During pass 2, the memory map will be created & stored. The symbol table and memory map will be printed during the pass.

Errors are caught during both passes.

2-pass-linker's People

Contributors

andrewhwanpark avatar

Watchers

 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.