Skip to content

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

License

Notifications You must be signed in to change notification settings

5j54d93/SIC-Assembler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

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

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Languages