Git Product home page Git Product logo

lc4-assembler's Introduction

LC4 Assembler

This project is an LC4 Assembler programmed in C, which reads an assembly language file and generates its machine code equivalent in binary format. The assembler handles file I/O operations, parsing instructions, and converting them into their binary equivalents.

Table of Contents

Description

The LC4 Assembler reads in a .ASM text file containing assembly instructions intended for PennSim and outputs a .OBJ binary file. This project demonstrates handling strings, multidimensional arrays, and file I/O in C.

Features

  • Reads assembly instructions from a text file
  • Converts instructions to their binary equivalents
  • Outputs the binary code to a .OBJ file
  • Error handling for file I/O and instruction parsing

Technologies Used

  • C programming language
  • clang compiler

Installation

  1. Compile the program:
    clang assembler.c asm_parser.c -o assembler

Usage

  1. Run the assembler:

    ./assembler <assembly_file.asm>

    Replace <assembly_file.asm> with the name of your assembly file.

  2. Example:

    ./assembler test.asm

Conclusion:

Through the development of my mini LC4 Assembler, this project offered me an opportunity to deepen my understanding of file I/O, string manipulation, and multidimensional arrays in C programming. By successfully completing this project, I not only enhanced my proficiency in C programming but also gained practical experience in working with assembly language and binary file formats.

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/fooBar)
  3. Commit your changes (git commit -m 'Add some fooBar')
  4. Push to the branch (git push origin feature/fooBar)
  5. Open a Pull Request

License

This project is licensed under the MIT License.

Contact

For any questions or support, please contact [email protected].


Feel free to use this adjusted version to reflect the completion of your project!

lc4-assembler's People

Contributors

shanto-swe029 avatar

Stargazers

Robin2020831043 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.