SkillAgentSearch skills...

PandesalCPU

A simplistic 8-bit multi-cycle CPU

Install / Use

/learn @Shim06/PandesalCPU
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Pandesal CPU

Pandesal CPU is an 8-bit multi-cycle general-purpose CPU architecture inspired by the classic MOS 6502. Built at the logic-gate level and implemented in Logisim Evo.

<p align="center"> <img src="https://github.com/Shim06/PandesalCPU/blob/e9fe837feb57f12e510e1308459be8efaffd6bc1/docs/images/CPU.png"> </p>

Assembler

Convert your .asm programs into executable .bin images using the PandesalAssembler.

Emulator

Run your Pandesal .bin programs using the PandesalEmu.

Architecture Specs

  • Data Bus: 8-bit
  • Address Bus: 16-bit (64 KB addressable memory)
  • Endianness: Little Endian
  • Arithmetic: Integer only
  • Design Inspired by: MOS 6502

CPU Registers

| Register | Size | Description | |---------------------------|-------|--------------------------------------| | Program Counter (PC) | 16-bit| Points to the current instruction | | Accumulator (A) | 8-bit | Main register for arithmetic | | ALU B Register (B) | 8-bit | Second operand register for ALU | | Status Register (SR) | 4-bit | Holds CPU flags | | X Index Register (X) | 8-bit | Used for indexing and addressing | | Y Index Register (Y) | 8-bit | Same as above | | Stack Pointer (SP) | 8-bit | Stack offset within page $0100 | | General-Purpose Registers | 8-bit | 5 additional general registers |


Status Flags

| Flag | Bit | Description | |----------|-----|------------------------------------| | Negative | N | Set if result is negative | | Overflow | O | Set if signed overflow occurred | | Zero | Z | Set if result is zero | | Carry | C | Set if carry/borrow occurred |


ALU Instructions

| Mnemonic | Description | |----------|--------------------------| | ADC | Add with Carry | | SBC | Subtract with Carry | | NOT | Bitwise NOT | | AND | Bitwise AND | | XOR | Bitwise XOR | | OR | Bitwise OR | | LSH | Logical Shift Left | | RSH | Logical Shift Right |


Branch Instructions

| Mnemonic | Description | |----------|-------------------------------| | BCC | Branch if Carry Clear | | BCS | Branch if Carry Set | | BEQ | Branch if Equal (Zero set) | | BMI | Branch if Minus (Negative set)| | BNE | Branch if Not Equal | | BPL | Branch if Positive | | BVC | Branch if Overflow Clear | | BVS | Branch if Overflow Set |

Related Skills

View on GitHub
GitHub Stars27
CategoryDevelopment
Updated17d ago
Forks0

Languages

Python

Security Score

90/100

Audited on Mar 24, 2026

No findings