Skip to content

isa_overview

Tom Lonergan edited this page Mar 23, 2023 · 6 revisions

Overview of [as yet unnamed] ISA

Basics

  • Multicycle processor
  • 16 bit wordsize
  • 16 operations
  • 16 registers

Labels marked with label:

Comments marked with # comment

Instruction types

There are 5 types of instructions:

  • Register instructions
  • Set instructions
  • Shift instructions
  • Memory instructions
  • Special instructions
Type 4 bits 4 bits 4 bits 4 bits
Register Opcode Destination register Source register 1 Source Register 2
Set Opcode Target register First half of value Second half of value
Memory Opcode Destination register Address register Offset
Special Opcode Suboperation Padding Padding

Register instructions

Take values in 2 source registers, applies an operation as stated by opcode, stores in destination register

Set instructions

Take an 8 bit value and sets target register to that value

Memory instructions

Loads/stores a value into/out of target register from/to memory address equal to address register + offset bytes

Special instructions

Syscalls, io ops, and others. Arguments given as defined in relevant pages