Skip to content

The Instruction Set

AstroMeYT edited this page Jun 12, 2025 · 3 revisions

The Instruction Set

The instruction set for this CPU is called MISC-I, which stands for Minimal Instruction Set Computing. The I stands for iteration 1. Here are the instructions and what they so:

  • say (text string) - Prints text to the screen.
  • jmp (line number) - Jumps to a certain line in the instructions file.
  • set (register) (number value) - Sets a register to a certain value.
  • prt (register) - Prints the value of a register to the screen.
  • add (register) (register) (output register) - Adds two registers and puts the sum in another register.
  • min (register) (register) (output register) - Subtracts two registers and puts the difference in another register.
  • ask (output register) - Gives the user an input box, and stores the input in a register.
  • ift (register) (>,<,=) - Jumps to a line if a comparison is true.
  • pause - Pauses the execution until any key is pressed.
  • snd - Makes a beep sound.
  • and (register) (register) (output register) - Compares two registers (MUST be 0/1) with AND, and sends a Boolean 0/1 to a register.
  • orr (register) (register) (output register) - Compares two registers (MUST be 0/1) with OR, and sends a Boolean 0/1 to a register.
  • not (register) (output register) - Applies the NOT operation to a register (MUST be 0/1) and sends a Boolean 0/1 to a register.
  • cld - Clears the screen.
  • halt - Stops the process completely.

Clone this wiki locally