Star 历史趋势
数据来源: GitHub API · 生成自 Stargazers.cn
README.md

16-bit CPU emulator from scratch in pure C

File Structure

16bit-cpu/
├── opcodes.h        — The 16 task types
├── cpu.h            — The office blueprint
├── instruction.h    — Task form encoding/decoding
├── alu.c            — The calculator + status board
├── memory.c         — The filing cabinet
├── cpu_execute.c    — The worker's daily routine
├── assembler.c      — The secretary
└── main.c           — Hire the worker, run the demo

Compile & Run

gcc -o cpu16 main.c cpu_execute.c alu.c assembler.c memory.c -Wall -std=c11
./cpu16

Expected Output

=== 16-BIT CPU EMULATOR ===
=== The Office Worker Simulation ===

...
Worker went home after 411 tasks.

=== DESK STATUS ===
  Sticky note R0 = 5050 (0x13BA)
  ...
  Sticky note R5 = 5050 (0x13BA)
  ...

=== VERIFICATION ===
  R0 (register)    = 5050 ✓
  R5 (from memory) = 5050 ✓
  Memory[1000]     = 5050 ✓

✓ SUCCESS! All three match: 1+2+...+100 = 5050

关于 About

16-bit CPU emulator from scratch in pure C

语言 Languages

C100.0%

提交活跃度 Commit Activity

代码提交热力图
过去 52 周的开发活跃度
1
Total Commits
峰值: 1次/周
Less
More

核心贡献者 Contributors