Skip to content

KARAN-D05/Assembler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

366 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

βš™οΈ Assembler

  • This is an extension to my Computing Machinery from Scratch project, after building an advanced arithmetic machine (called Repeated Arithmetic Machine aka r_a_m) and in version4 (r_a_mv4) we succesfully implemented Machine-Code Programming by storing machine code instructions in the program memory.
  • So next logical step was to go up the computing stack from machine code to language having instructions in an english like language, called Mnemonics, so after mapping all the machine codes to mnemonics we get -The Assembly Language.

🧾 Custom Assembly Language Instructions - asm-v0


πŸ‘‰ Refer Sample Programs

βš™οΈ Implementation Stack

Python Custom Assembly

🧱 Versions Built

  • asmv0.1 -> Mapped Data control operations to assembly Language.
  • asmv0.2 -> Mapped arithmetic, system and temporal Control to assembly Language.
  • asmv0.3 -> Added Syntax Analysis, basic semantic analysis and an instruction execution report.

Machine Code Output v0.2
🧾 Machine Code Output - Assembler v0.2

asmv0.3 Syntax Analysis
πŸ•΅οΈ Syntax Analysis - Assembler v0.3

asmv0.3 Semantic Analysis
πŸ•΅οΈ Semantic Analysis - Assembler v0.3

🧩 Latest Development

  • Syntax Analysis of assembly program before being processed by assembler to save computational resources.
  • Basic Semantic analysis to detect logical flaws in assembly program before converting to machine code.

πŸš€ Future Development

  • Advanced Semantic Analysis for the assembly language, enabling validation and structured interpretation of programs before translation to machine code.
  • Mapping multiple sequences of low-level instructions into a single mnemonic, enabling higher-level abstractions and more complex machine functionality with fewer lines of assembly code - MACROS

🧰 Computing Machinery from Scratch

⬇️ Download This Repository

πŸͺŸ Windows

Download β†’ download_repos.bat

Double-click it and pick the repo(s) you want.

🐧 Linux / macOS

Download β†’ download_repos.sh

bash

chmod +x download_repos.sh
./download_repos.sh

Always downloads the latest version.

πŸ› οΈ Toolchain & Repo Utilities - Built to make navigating and interacting with this repo easier

πŸ’» Terminal-Based Manual

This project includes a built-in reference manual for the custom ASM language that can be queried directly from your terminal. View full manual: asm-manual

Linux / Mac:

curl -O https://raw.githubusercontent.com/KARAN-D05/Assembler/main/asm-manual/run-asm-manual.sh
chmod +x run-asm-manual.sh
./run-asm-manual.sh

Windows:

Invoke-WebRequest -Uri "https://raw.githubusercontent.com/KARAN-D05/Assembler/main/asm-manual/run-asm-manual.ps1" -OutFile "run-asm-manual.ps1"
powershell -ExecutionPolicy Bypass -File run-asm-manual.ps1

Full computing stack manual covering both the RAM hardware and this Assembly Language. One command for the complete reference: View full manual: stack-manual

Linux / Mac:

curl -O https://raw.githubusercontent.com/KARAN-D05/Assembler/main/stack-manual/run-stack-manual.sh
chmod +x run-stack-manual.sh
./run-stack-manual.sh

Windows:

Invoke-WebRequest -Uri "https://raw.githubusercontent.com/KARAN-D05/Assembler/main/stack-manual/run-stack-manual.ps1" -OutFile "run-stack-manual.ps1"
powershell -ExecutionPolicy Bypass -File run-stack-manual.ps1

πŸ”§ portmap - Verilog Port Extractor

portmap is a lightweight CLI tool that extracts port definitions (input, output, inout) from Verilog modules and presents them in a clean table or Markdown format.

πŸ”— Source

https://github.com/KARAN-D05/portmap-HDL/blob/main/utils/portmap

πŸ“¦ Release (Download Binary)

https://github.com/KARAN-D05/portmap-HDL/releases/tag/v1.0.0

πŸš€ Usage

portmap file.v
portmap file.v --md

🧰 Repo Filetree Generator

Filetree - A repository file tree generator that prints a visual directory tree with file-type icons and a file count breakdown by extension (.v, .circ, .md, .py and more).

Utils (Portmap + Filetree)- Fetched automatically as a utils package alongside any repo download - includes portmap binaries, filetree, and source code via download_repos.bat / download_repos.sh.

πŸ“œ License

  • Source code, HDL, and Logisim circuit files are licensed under the MIT License.
  • Documentation, diagrams, images, and PDFs are licensed under Creative Commons Attribution 4.0 (CC BY 4.0).

About

Built custom assembly language and Assembler for my custom-built Computing Machinery project as its software extension. Mapped machine-functionality to assembly capable of data-control, machine-control and temporal-control operations and Implemented an assembler with syntax and semantic analysis πŸ’».

Topics

Resources

License

Stars

Watchers

Forks

Contributors