A Python software implementation of the Intel 4004 processor

Overview

Pyntel4004

Pyntel 4004 Logo

Build Pipeline Documentation Status GitHub Codacy Badge DeepSource DeepSource PyPI version PyPI - Downloads Plant Tree

A Python software implementation of the Intel 4004 processor.

General Information

  • Two pass assembler using the original mnemonics, directives and comments syntax
  • Monitor facility to step through code and examine registers, memory etc

Requirements

  • Python_ >= 3.8.2

Installation Instructions


Source Code

Pyntel4004โ€™s git repo is available on GitHub, which can be browsed here and cloned using:

 
    $ git clone https://github.com/alshapton/pyntel4004 pyntel4004

Verify the installation by running unit tests:

    $ cd pyntel4004/test
    $ pytest

Questions, Answers and Issues

Please use the github discussion board for questions, to ensure the right people see them in a timely manner.

Github Pyntel4004 Discussion Board

and the github issue tracker to raise any issues.

Github Pyntel4004 Issues Board


Usage Instructions

The user instructions can be found here

Design goals

  • As much of the internals as possible should be carried out using binary arithmetic and operations.
  • No 3rd party libraries to be used (i.e. pure Python).
  • Build a fully-working i4004 opcode emulator.
  • Build a fully-working assembler which generates correct op-codes.
  • Construct a fully-working software-based i4004 chip which can use the generated object code from the compiler (possibly using micro-python or circuit python on an Ardiuno Board).

Status

23-SEP-2021: Publishing releases to PyPi
10-SEP-2021: Documentation building and hosted with READTHEDOCS
12-JUN-2021: Auto-build with GITHUB Actions implemented
18-MAY-2021: Implementing full test suite
21-APR-2021: Instruction Set functionally complete Entering Testing Phase

Example

Assembler Directives and other additions

Assembler directives are not part of the program itself, but can control things like starting address, and various environmental settings.

Directive Example Meaning
end end Indicating end of program, but not necessarily end of code
org org 100 Assemble and place object code commencing at address 100
pin pin 1 Value of i4004's Pin 10 (test pin)
/ / Author: ALS A comment
label, loop, A label can be referred to in various control transfer statements. It MUST end in a comma (,)

Assemble and Run

Monitor Commands

Command Example Meaning
"Enter" "Enter" Execute the current instruction and move to the next
acc acc Show the current contents of the Accumulator
b n b 71 Create a breakpoint at address n
carry carry Show the current contents of the Carry Bit
crb crb Show the currently selected RAM Bank
off off Continue to execute the program with no trace
pc pc Show the Program Counter
pin10 pin10 Show the status of PIN10 on the i4004 chip (test pin)
q q Quit the monitor without executing any further commands
ram ram Show the complete contents of RAM
reg n reg 7 Show content of a specified register
regs regs Show all 16 registers
rom rom Show the complete contents of ROM
stack stack Show the stack and the location of the stack pointer

Licence

This package is Treeware. If you use it in production, then we ask that you buy the world a tree to thank us for our work. By contributing to the Treeware forest youโ€™ll be creating employment for local families and restoring wildlife habitats.

Credits

Pyntel 4004 Logo

.. _Python: https://www.python.org

Owner
alshapton
SpaceX Enthusiast, coder, architect, doer-of-stuff
alshapton
A simple solution for water overflow problem in Python

Water Overflow problem There is a stack of water glasses in a form of triangle as illustrated. Each glass has a 250ml capacity. When a liquid is poure

Kris 2 Oct 22, 2021
SuperCollider library for Python

SuperCollider library for Python This project is a port of core features of SuperCollider's language to Python 3. It is intended to be the same librar

Lucas Samaruga 65 Dec 22, 2022
Python script for the radio in the Junior float.

hoco radio 2021 Python script for the radio in the Junior float. Populate the ./music directory with 2 or more .wav files and run radio2.py. On the Ra

Kevin Yu 2 Jan 18, 2022
Python wrapper to different clients to determine how a particular term is used.

Python wrapper to different clients to determine how a particular term is used.

Chris Mungall 3 Oct 24, 2022
๐Ÿ™ŒKart of 210+ projects based on machine learning, deep learning, computer vision, natural language processing and all. Show your support by โœจ this repository.

ML-ProjectKart ๐Ÿ“Œ Repository This kart showcases the finest collection of all projects based on machine learning, deep learning, computer vision, natu

Prathima Kadari 203 Dec 28, 2022
Template for pre-commit hooks

Pre-commit hook template This repo is a template for a pre-commit hook. Try it out by running: pre-commit try-repo https://github.com/stefsmeets/pre-c

Stef Smeets 1 Dec 09, 2021
A similarity measurer on two programming assignments on Online Judge.

A similarity measurer on two programming assignments on Online Judge. Algorithm implementation details are at here. Install Recommend OS: Ubuntu 20.04

StardustDL 6 May 21, 2022
Covid-19-Trends - A project that me and my friends created as the CSC110 Final Project at UofT

Covid-19-Trends Introduction The COVID-19 pandemic has caused severe financial s

1 Jan 07, 2022
Prototype application for GCM bias-correction and downscaling

dodola Prototype application for GCM bias-correction and downscaling This is an unstable prototype. This is under heavy development. Features Nothing!

Climate Impact Lab 9 Dec 27, 2022
Python package that mirrors the original Nodejs ReplAPI-It.

Python-ReplAPI-It Python package that mirrors the original Nodejs ReplAPI-It. Contributing First fork the repo: $ git clone https://github.com/ReplAPI

The ReplAPI.it Project 10 Jun 05, 2022
MatroSka Mod Compiler for ts4scripts

MMC Current Version: 0.2 MatroSka Mod Compiler for .ts4script files Requirements Have Python 3.7 installed and set as default. Running from Source pip

MatroSka 1 Dec 13, 2021
This is a multi-app executor that it used when we have some different task in a our applications and want to run them at the same time

This is a multi-app executor that it used when we have some different task in a our applications and want to run them at the same time. It uses SQLAlchemy for ORM and Alembic for database migrations.

Majid Iranpour 5 Apr 16, 2022
UdemyPy is a bot that hourly looks for Udemy free courses and post them in my Telegram Channel: Free Courses.

UdemyPy UdemyPy is a bot that hourly looks for Udemy free courses and post them in my Telegram Channel: Free Courses. How does it work? For publishing

88 Dec 25, 2022
This is a Docker-based pipeline for preparing sextractor-ready multiwavelength images

Pipeline for creating NB422-detected (ODI) catalog The repository contains a Docker-based pipeline for preprocessing observational data. The pipeline

1 Sep 01, 2022
๐Ÿ‘€ nothing to see here

Woofy Woofy is blue dog companion token of YFI (Wifey) It utilizes a special Woof bonding curve which allows two-way conversion between the tokens. Th

Yearn Finance 36 Mar 14, 2022
Add any Program in any language you like or add a hello world Program โฃ๏ธ if you like give us :star:

Welcome to the Hacktoberfest 2018 Hello-world ๐Ÿ“‹ This Project aims to help you to get started with using Github. You can find a tutorial here What is

Aniket Sharma 1.5k Nov 16, 2022
Slientruss3d : Python for stable truss analysis tool

slientruss3d : Python for stable truss analysis tool Desciption slientruss3d is a python package which can solve the resistances, internal forces and

3 Dec 26, 2022
Compile Binary Ninja's HLIL IR to LLVM, for purposes of compiling it back to a binary again.

Compiles BinaryNinja's HLIL to LLVM Approach Sweep binary for global variables, create them Sweep binary for (used?) external functions, declare those

Kyle Martin 31 Nov 10, 2022
Welcome to my pod transcript search webb app!

pod_transcript_search Welcome to the pod transcript search webb app! Tech stack used: Languages used: Python (for the back-end), JavaScript (for the f

3 Feb 04, 2022
PDX Code Guild Full Stack Python Bootcamp starting 2022/02/28

Class Liger Rough Timeline Weeks 1, 2, 3, 4: Python Weeks 5, 6, 7, 8: HTML/CSS/Flask Weeks 9, 10, 11: Javascript Weeks 12, 13, 14, 15: Django Weeks 16

PDX Code Guild 5 Jul 05, 2022