[top] Last update: 2025 Quick reference: Table of Hmmm Instructions Instruction Description Aliases System instructions halt Stop! None read rX Place user input in register rX None write rX Print contents of register rX None nop Do nothing None Setting register data setn rX N Set register rX equal to the integer N (-128 to +127) None addn rX N Add integer N (-128 to 127) to register rX None copy rX rY Set rX = rY mov Arithmetic add rX rY rZ Set rX = rY + rZ None sub rX rY rZ Set rX = rY - rZ None neg rX rY Set rX = -rY None mul rX rY rZ Set rX = rY * rZ None div rX rY rZ Set rX = rY // rZ (integer division; rounds down; no remainder) None mod rX rY rZ Set rX = rY % rZ (returns the remainder of integer division) None Jumps! jumpn N Set program counter to address N None jumpr rX Set program counter to address in rX jump jeqzn rX N If rX == 0, then jump to line N jeqz jnezn rX N If rX != 0, then jump to line N jnez jgtzn rX N If rX > 0, then jump to line N jgtz jltzn rX N If rX < 0, then jump to line N jltz calln rX N Copy addr. of next instr. into rX and then jump to mem. addr. N call Interacting with memory (RAM) pushr rX rY Store contents of register rX onto stack pointed to by reg. rY None popr rX rY Load contents of register rX from stack pointed to by reg. rY None loadn rX N Load register rX with the contents of memory address N None storen rX N Store contents of register rX into memory address N None loadr rX rY Load register rX with data from the address location held in reg. rY loadi, load storer rX rY Store contents of register rX into memory address held in reg. rY storei, store Table of Contents Hmmm the (Harvey Mudd Miniature Machine) is a 16-bit, 26-instruction simulated assembly language with 28 = 256 16-bit words of memory. Hmmm is written in Python, and it is intended as an introduction to assembly coding in general. Programs written in Hmmm consist of numbered lines with one instruction per line, and comments. Hmmm is implemented as a single program w...
First seen: 2025-09-10 20:11
Last seen: 2025-09-10 23:12