Skip to content

Building Assembler for my custom-built Computing Machinery. I aim to develop a complete Instruction set that completely maps every possible Machine code instruction to the Assembly language and its Macros 💻.

License

Notifications You must be signed in to change notification settings

KARAN-D05/Assembler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

289 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, primitive 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.
  • Primitive 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

🛠️ Toolchain

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

🧰 Computing Machinery from Scratch

📜 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

Building Assembler for my custom-built Computing Machinery. I aim to develop a complete Instruction set that completely maps every possible Machine code instruction to the Assembly language and its Macros 💻.

Topics

Resources

License

Stars

Watchers

Forks

Contributors