Assembler
A custom assembler with macro support and a two-pass assembly process, implementing efficient code translation, error handling, and file management in C.
Install / Use
/learn @talfig/AssemblerREADME
<!-- Assembler Headline -->
<h1 align="center">🔧 Assembler: The Code Converter</h1>
<!-- Welcome Description -->
<p align="center">
Welcome to the ultimate assembler built in C, designed to transform your assembly code into machine language with precision and elegance.
<br>
🎨 Custom Assembly Language | 🌟 Macro Magic | 💡 Detailed Error Reporting
</p>
<p align="center">
<!-- GitHub Stars -->
<a href="https://github.com/talfig/Assembler">
<img src="https://img.shields.io/github/stars/talfig/Assembler?color=ff69b4&label=Stars&logo=github&style=flat-square" alt="GitHub stars">
</a>
<!-- GitHub Forks -->
<a href="https://github.com/talfig/Assembler/fork">
<img src="https://img.shields.io/github/forks/talfig/Assembler?color=ffd700&label=Forks&logo=github&style=flat-square" alt="GitHub forks">
</a>
<!-- Repo Views -->
<a href="https://github.com/talfig/Assembler">
<img src="https://komarev.com/ghpvc/?username=talfig-Assembler&label=Repo%20views&color=ff6347&style=flat-square" alt="Repo views">
</a>
<!-- License -->
<a href="https://github.com/talfig/Assembler/blob/main/LICENSE">
<img src="https://img.shields.io/badge/license-AGPL-blue.svg" alt="License">
</a>
</p>
<p align="center">
<!-- Contributions Welcome -->
<a href="https://github.com/talfig/Assembler">
<img src="https://img.shields.io/badge/Contributions-Welcome-00c4cc?style=flat-square" alt="Contributions Welcome">
</a>
<!-- Made with Love -->
<a href="https://github.com/talfig/Assembler">
<img src="https://img.shields.io/badge/Made%20with%20♥-00c4cc?style=flat-square" alt="Made with Love">
</a>
</p>
<!-- Creator -->
<h2 align="center">🌌 Creator: Tal Figenblat 🌌</h2>
<!-- TABLE OF CONTENTS -->
<details>
<summary>Table of Contents</summary>
<ol>
<li><a href="https://github.com/talfig/Assembler/blob/main/README.md#project-background-and-objectives">Project Background and Objectives</a></li>
<li><a href="https://github.com/talfig/Assembler/blob/main/README.md#hardware">Hardware</a></li>
<li><a href="https://github.com/talfig/Assembler/blob/main/README.md#features">Features</a></li>
<li><a href="https://github.com/talfig/Assembler/blob/main/README.md#supported-opcodes">Supported Opcodes</a></li>
<li><a href="https://github.com/talfig/Assembler/blob/main/README.md#opcodes-specification">Opcodes Specification</a>
<ul>
<li><a href="https://github.com/talfig/Assembler/blob/main/README.md#first-group-two-operand-opcodes">First Group: Two-Operand Opcodes</a></li>
<li><a href="https://github.com/talfig/Assembler/blob/main/README.md#second-group-one-operand-opcodes">Second Group: One-Operand Opcodes</a></li>
<li><a href="https://github.com/talfig/Assembler/blob/main/README.md#third-group-no-operand-opcodes">Third Group: No-Operand Opcodes</a></li>
</ul>
</li>
<li><a href="https://github.com/talfig/Assembler/blob/main/README.md#assembly-language-syntax">Assembly Language Syntax</a>
<ul>
<li><a href="https://github.com/talfig/Assembler/blob/main/README.md#macros">Macros</a></li>
<li><a href="https://github.com/talfig/Assembler/blob/main/README.md#directives">Directives</a></li>
<li><a href="https://github.com/talfig/Assembler/blob/main/README.md#instructions">Instructions</a></li>
<li><a href="https://github.com/talfig/Assembler/blob/main/README.md#variables-labels">Variables (Labels)</a></li>
</ul>
</li>
<li><a href="https://github.com/talfig/Assembler/blob/main/README.md#addressing-methods-modes">Addressing Methods (Modes)</a></li>
<li><a href="https://github.com/talfig/Assembler/blob/main/README.md#addressing-methods-for-operations">Addressing Methods for Operations</a></li>
<li><a href="https://github.com/talfig/Assembler/blob/main/README.md#first-word-encoding">First Word Encoding</a>
<ul>
<li><a href="https://github.com/talfig/Assembler/blob/main/README.md#opcodes">Opcodes (Bits 14-11)</a></li>
<li><a href="https://github.com/talfig/Assembler/blob/main/README.md#source-operand">Source Operand (Bits 10-7)</a></li>
<li><a href="https://github.com/talfig/Assembler/blob/main/README.md#destination-operand">Destination Operand (Bits 6-3)</a></li>
<li><a href="https://github.com/talfig/Assembler/blob/main/README.md#a-r-e-field">A,R,E Field (Bits 2-0)</a></li>
</ul>
</li>
<li><a href="https://github.com/talfig/Assembler/blob/main/README.md#addressing-methods-encoding">Addressing Methods Encoding</a>
<ul>
<li><a href="https://github.com/talfig/Assembler/blob/main/README.md#immediate-addressing">Immediate Addressing</a></li>
<li><a href="https://github.com/talfig/Assembler/blob/main/README.md#direct-addressing">Direct Addressing</a></li>
<li><a href="https://github.com/talfig/Assembler/blob/main/README.md#indirect-register-addressing">Indirect Register Addressing</a></li>
<li><a href="https://github.com/talfig/Assembler/blob/main/README.md#direct-register-addressing">Direct Register Addressing</a></li>
<li><a href="https://github.com/talfig/Assembler/blob/main/README.md#unused-bits">Unused Bits</a></li>
</ul>
</li>
<li><a href="https://github.com/talfig/Assembler/blob/main/README.md#types-of-statements-in-assembly-language">Types of Statements in Assembly Language</a></li>
<li><a href="https://github.com/talfig/Assembler/blob/main/README.md#directive-statements">Directive Statements</a>
<ul>
<li><a href="https://github.com/talfig/Assembler/blob/main/README.md#data-directive">".data" Directive</a></li>
<li><a href="https://github.com/talfig/Assembler/blob/main/README.md#string-directive">".string" Directive</a></li>
<li><a href="https://github.com/talfig/Assembler/blob/main/README.md#entry-directive">".entry" Directive</a></li>
<li><a href="https://github.com/talfig/Assembler/blob/main/README.md#extern-directive">".extern" Directive</a></li>
</ul>
</li>
<li><a href="https://github.com/talfig/Assembler/blob/main/README.md#instruction-fields">Instruction Fields</a>
<ul>
<li><a href="https://github.com/talfig/Assembler/blob/main/README.md#labels">Labels</a></li>
<li><a href="https://github.com/talfig/Assembler/blob/main/README.md#numbers">Numbers</a></li>
<li><a href="https://github.com/talfig/Assembler/blob/main/README.md#strings">Strings</a></li>
</ul>
</li>
<li><a href="https://github.com/talfig/Assembler/blob/main/README.md#instruction-statement-formats">Instruction Statement Formats</a>
<ul>
<li><a href="https://github.com/talfig/Assembler/blob/main/README.md#two-operand-instruction">Two-Operand Instruction</a></li>
<li><a href="https://github.com/talfig/Assembler/blob/main/README.md#one-operand-instruction">One-Operand Instruction</a></li>
<li><a href="https://github.com/talfig/Assembler/blob/main/README.md#no-operand-instruction">No-Operand Instruction</a></li>
</ul>
</li>
<li><a href="https://github.com/talfig/Assembler/blob/main/README.md#the-a-r-e-field-encoding">The A,R,E Field Encoding</a>
<ul>
<li><a href="https://github.com/talfig/Assembler/blob/main/README.md#the-a-r-e-bits">The A,R,E Bits</a></li>
</ul>
</li>
<li><a href="https://github.com/talfig/Assembler/blob/main/README.md#macro-handling">Macro Handling</a></li>
<li><a href="https://github.com/talfig/Assembler/blob/main/README.md#assembler-with-two-passes">Assembler with Two Passes</a>
<ul>
<li><a href="https://github.com/talfig/Assembler/blob/main/README.md#first-pass">First Pass</a></li>
<li><a href="https://github.com/talfig/Assembler/blob/main/README.md#second-pass">Second Pass</a></li>
</ul>
</li>
<li><a href="https://github.com/talfig/Assembler/blob/main/README.md#object-file-format">Object File Format</a>
<ul>
<li><a href="https://github.com/talfig/Assembler/blob/main/README.md#entries-file-format">Entries File Format</a></li>
<li><a href="https://github.com/talfig/Assembler/blob/main/README.md#externals-file-format">Externals File Format</a></li>
</ul>
</li>
<li><a href="https://github.com/talfig/Assembler/blob/main/README.md#example-program">Example Program</a></li>
<li><a href="https://github.com/talfig/Assembler/blob/main/README.md#installation">Installation</a>
<ul>
<li><a href="https://github.com/talfig/Assembler/blob/main/README.md#linux">Linux</a></li>
<li><a href="https://github.com/talfig/Assembler/blob/main/README.md#github-codespaces">GitHub Codespaces</a></li>
</ul>
</li>
<li><a href="https://github.com/talfig/Assembler/blob/main/README.md#usage">Usage</a></li>
<li><a href="https://github.com/talfig/Assembler/blob/main/README.md#error-handling">Error Handling</a></li>
<li><a href="https://github.com/talfig/Assembler/blob/main/README.md#directory-structure">Directory Structure</a></li>
<li><a href="https://github.com/talfig/Assembler/blob/main/README.md#appendix">Appendix</a>
<ul>
<li><a href="https://github.com/talfig/Assembler/blob/main/README.md#program-status-word-psw">Program Status Word (PSW)</a></li>
<li><a href="https://github.com/talfig/Assembler/blob/main/README.md#linking-and-loading">Linking and Loading</a>
<ul>
<li><a href="https://github.com/talfig/Assembler/blob/main/README.md#linking">Linking</a></li>
<li><a href="https://github.com/talfig/Assembler/blob/main/README.md#loading">Loading</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="https://github.com/talfig/Assembler/blob/main/README.md#license">License</a></li>
<li><a href="https://github.com/talfig/Assembler/blob/main/README.md#contact">Contact</a></li>
</ol>
</details>
<!-- Project Background and Objectives -->
<h2 id="project
