[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-72136":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":16,"stars7d":16,"stars30d":17,"stars90d":15,"forks30d":15,"starsTrendScore":18,"compositeScore":19,"rankGlobal":9,"rankLanguage":9,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":21,"hasPages":21,"topics":23,"createdAt":9,"pushedAt":9,"updatedAt":24,"readmeContent":25,"aiSummary":26,"trendingCount":15,"starSnapshotCount":15,"syncStatus":16,"lastSyncTime":27,"discoverSource":28},72136,"excelCPU","InkboxSoftware\u002FexcelCPU","InkboxSoftware","16-bit CPU for Excel, and related files",null,"Python",4734,411,53,9,0,2,10,6,29.84,"Creative Commons Zero v1.0 Universal",false,"main",[],"2026-06-12 02:02:59","# Excel 16-Bit CPU\nThe Excel 16-Bit CPU repository contains the following main files:\n```\nCPU.xlsx - The main spreadsheet which contains the CPU\nROM.xlsx - The ROM spreadsheet read by the CPU when the read ROM switch is turned on\nInstructionSet.xlsx - Explains the ISA of the CPU\ncompileExcelASM16.py - The Excel-ASM16 compiler\nExcel-ASM16.xml - Markdown for the Excel-ASM16 language compatible with Notepad++\nSample Programs - Folder of sample programs for the Excel CPU\n```\n\nThe CPU.xlsx file features a 16-bit CPU, 16 general purpose registers, 128KB of RAM, and a 128x128 display.\n\nIterative Calcuation must be turned on. This can be done by going to File -> Options -> Formulas -> then Enable Iterative Calculation and **set Maximum Iterations to 1**\n\nThe CPU runs off a clock signal set in B2. This clock signal will update under the normal conditions of recalculation within an Excel spreadsheet. Pressing the F9 key will recalculate the spreadsheet. \n\nThe Reset Button in the F2 cell, if set to true, will reset the PC register back to 0. \n\nThe computer in the CPU.xlsx file can be controlled either in automatic or manual mode. This is controlled by the button in J2. If set to true, when the clock signal from B2 is high, then the CPU will carry out the operation specified in the override slot in the Fetch Unit in cell D8. If false, then the CPU will execute the operation retrieved from the memory table as specified by the PC register. \n\nThe Reset RAM button, if set to true, will reset every memory unit to 0. \n\nThe Read ROM button, if set to true, will copy the values of the memory table in the ROM.xlsx spreadsheet onto the RAM table of the CPU.xlsx spreadsheet. \n\nNormal operation of the CPU consists of setting the Reset Button to high, either flipping the Reset RAM or Read ROM buttons on and off again (causing the RAM to be reset or the ROM to be read into the RAM table), and then turning off the Reset Button. The CPU is then set up to either run a program in Manual mode, or will carry out the program specified in RAM. \n\n\nThe CPU is designed to run according to the instruction set architecture specified in the InstructionSet.xlsx spreadsheet. \n\nWarning: It is not possible to simply mash the F9 key as fast as possible, it takes time for Excel to update so many cells, it is recommended to wait until the text \"Ready\" can be seen in the bottom left corner of Excel can be seen before continuing to press the F9 key. \n\n\nAlternatively, programs can be written in the Excel-ASM16 language and compiled to the ROM.xlsx spreadsheet.\n\nExcel-ASM16 features 24 different case-insensitive instructions. \nThere are three different operands that are used in each instruction\n```\n\tREG\t; refers to any of the 16 general purpose registers\n\tE.G. R0, R1, R15 &c.\n\t\n\tMEM\t; refers to any 16-bit addressable memory unit (formatted in hexadecimal)\n\tE.G. @0000, @F000, @FFFF, &c.\n\n\tIMD\t; refers to an immediate number usually 16-bits long, except in the case of ROL and ROR\n\t\t; can be defined either in decimal or hexadecimal\n\tE.G. #0000, $0CCC, #60340, $FF10, &c.\n```\n### LOAD\n```\n\tLOAD REG MEM\t; loads the specified memory unit into REG\n\tLOAD REG IMD\t; load specified 16-bit immediate value into REG\n\tLOAD REG REG\t; loads memory unit at the address stored in REGB into REGA\n```\n### STORE\n```\n\tSTORE REG MEM\t; stores the value of REG to the address specified\n\tSTORE REG REG \t; stores the value of REGA into the memory unit at the address in REGB\n```\n### JUMP\n```\n\tJMP IMD\t\t; sets PC to the immediate 16-bit value\n\tJEQ IMD\t\t; if ZF = 0, sets PC to the immediate 16-bit value\n\tJLT IMD\t\t; if CF = 0, sets PC to the immediate 16-bit value \n\tJGE IMD\t\t; if CF = 1 or ZF = 1, sets PC to the immediate 16-bit value \n```\n### TRAN\n```\n\tTRAN REG REG\t; transfers value from REGA to REGB\n```\n### ALGEBRAIC INSTRUCTIONS\n### ADD\n```\n\tADD REG REG\t; REGA + REGB + CF, result stored in REGA\n```\n### SUB\n```\n\tSUB REG REG\t; (REGA - REGB) - CF, result stored in REGA\n```\n### MULT\n```\n\tMULT REG REG\t; REGA * REGB, low 16-bit result stored in REGA, high 16-bit result stored in REGB\n```\n### DIV\n```\n\tDIV REG REG\t; REGA \u002F REGB result stored in REGA, REGA MOD REGB stored in REGB\n```\n### INC\n```\n\tINC REG\t; REGA++, CF not affected\n```\n### DEC\n```\n\tDEC REG\t; REGA--, CF not affected\n```\n### BITWISE INSTRUCTIONS\n### AND\n```\n\tAND REG REG\t; REGA AND REGB, result stored in REGA\n```\n### OR\n```\n\tOR REG REG\t\t; REGA OR REGB, result stored in REGA\n```\n### XOR\n```\n\tXOR REG REG\t; REGA XOR REGB, result stored in REGA\n```\n### NOT\n```\n\tNOT REG \t\t; NOT REGA, result stored in REGA\n```\n### ROLL INSTRUCTIONS\n### ROL\n```\n\tROL REG IMD\t; leftwise roll of bits of REGA carried out IMD times\n\t\t\t\t; IMD is a 4-bit value\n```\n### ROR\n```\n\tROR REG IMD\t; rightwise roll of bits of REGA carried out IMD times\n\t\t\t\t; IMD is a 4-bit value\n```\n### Flag instructions\n```\n\tCLC\t\t\t; sets CF to 0\n\tSTC\t\t\t; sets CF to 1 \n```\n### NOP\n```\n\tNOP\t\t\t; does not effect any registers or memory\n```\n### ORG\n```\n\tORG IMD\t\t; sets the location of the next instruction\n\t\t\t\t; must be further than the current length of program\n```\n### INC\n```\n\tINC \"file.bin\"\t; copies the binary file into the program\n```\n\n### Compiling\nAfter having written a program, it is compiled with the commandline instruction\n```\n\tpy compileExcelASM16.py program.s ROM.xlsx\n```\nWhere **program.s** is the user's program file, and ROM.xlsx is the ROM spreadsheet\n\nAfter compiling successfully, the program can be transferred into the CPU.xlsx program by flipping the Read ROM button at the top of the spreadsheet. Note, the ROM.xlsx file must be open for the data to update correctly. \n\n\n\n\n\n\n\n\n\n\n\n","Excel 16-Bit CPU 是一个在 Excel 中实现的 16 位 CPU 模拟器。该项目包含一个主电子表格 CPU.xlsx，其中集成了 16 位 CPU、16 个通用寄存器、128KB 的 RAM 以及一个 128x128 显示屏。此外，还提供了 ROM 表格、指令集说明、编译器等辅助文件。其核心功能包括通过 Excel 迭代计算来模拟 CPU 的运行，并支持手动和自动模式切换以控制程序执行流程。该工具适合于教育场景中教授计算机架构与汇编语言的基础知识，或是对计算机底层工作原理感兴趣的个人学习使用。","2026-06-11 03:40:32","high_star"]