Skip to content

Latest commit

 

History

History
64 lines (46 loc) · 1.51 KB

README.md

File metadata and controls

64 lines (46 loc) · 1.51 KB

SIC Assembler

CodeQL GitHub GitHub Repo stars packages GitHub repo size

An assembler for SIC(Simplified Instructional Computer)in Python.

  • assembler.py:main program
  • pass1.py:Create SYMTAB(Symbol Table)
  • pass2.py:Write object file
  • sic.py:store SIC instruction set and directive

How To Use

  1. Download this repository via git clone
git clone https://github.com/5j54d93/SIC-Assembler
  1. Change directories to this repository via cd or drag this folder and drop in terminal
cd SIC-Assembler
  1. Run assembler.py
python3 assembler.py <source file>

Example

run python3 assembler.py addexample.asm in terminal to convert .asm to .obj

addexample.asm

ADDEX	START	1000
FIRST	LDA	THREE
        ADD	FIVE
        STA	RESULT
        RSUB
THREE	WORD	3
FIVE	WORD	5
RESULT	RESW	1
        END	FIRST

addexample.obj

HADDEX 001000000015
T0010001200100C18100F0C10124C0000000003000005
E001000

License:MIT

This package is MIT licensed.