SCU Logo

DP234

SPASM
Instruction list

Unit Introduction
References
Topics
   Topic 1 - Basic Computer Design

   Topic 2 - Accessing Memory
   Topic 3 - More Instructions
   Topic 4 - Processes & Interrupts
   Topic 5 - Input & Output
   Topic 6 - Memory
   Topic 7 - Memory Management 1
   Topic 8 - Memory Management 2
   Topic 9- File Systems
   
Topic 10 - Advanced CPU design
L
aboratories
   Lab 1 - Unix commands
   Lab 2 - Data
   Lab 3 - Data & Stack Instructions
   Lab 4 - Arithmetic and Logical Inst.
   Lab 5 - Jumps and Loops
   Lab 6 - Operating System Calls
   Lab 7 - Interrupt Service Routines
   Lab 8 - FAT File Systems
   Lab 9 - Practice Exam
SPASM
  download
  manual

This is the alphabetical index of SPASM instructions. See also the list of instruction by type.
 
ADD reg,reg Add register to register
ADDI reg,immed Add immediate to register
ADDU reg,reg Add unsigned register to register
ADDUI reg,immed Add unsigned immediate to register
AND reg,reg Logical AND register to register
ANDI reg,immed Logical AND immediate to register
CALL addr Call subroutine at address
DIV reg,reg divide register by register
DIVU reg,reg divide unsigned register by register
HALT   Stop the machine
INT immed Force interrupt number 'immed'
JMP addr Jump to address
JE reg,reg,addr Jump to address if reg1 = reg2
JEZ reg,addr Jump to address if reg = 0
JGE reg,reg,addr Jump to address if reg1 >= reg2
JGEU reg,reg,addr Jump to address if reg1 >= reg2 (unsigned)
JGEZ reg,addr Jump to address if reg > 0
JGT reg,reg,addr Jump to address if reg1 > reg2
JGTU reg,reg,addr Jump to address if reg1 > reg2 (unsigned)
JGTZ reg,addr Jump to address if reg > 0
JLE reg,reg,addr Jump to address if reg1 <= reg2
JLEU reg,reg,addr Jump to address if reg1 <= reg2 (unsigned)
JLEZ reg.addr Jump to address if reg1 <= 0
JLT reg,reg,addr Jump to address if reg1 < reg2
JLTU reg,reg,addr Jump to address if reg1 < reg2 (unsigned)
JLTZ reg,addr Jump to address if reg1 < 0
JNE reg,reg,addr Jump to address if reg1 not = reg2
JNEZ reg,addr Jump to register not = zero
LB reg,addr Load byte into register
LBU reg,addr Load unsigned byte into register
LH reg,address Load halfword into register
LHU reg,address Load halfword into register (no sign extension)
LI reg,immed Load immediate value into register
LLH reg,address Load halfword into upper half of register
LLHI reg,immed Load immediate halfword into upper half of register
LW reg,address Load word into register
MOV reg,reg move contents of register to another register
MUL reg,reg multiply register by register
MULU reg,reg multiply unsigned register by register
NEG reg negate a number (2s complement)
NOP   do nothing
NOT reg logical complement of a register
PUSH reg push register onto the stack
POP reg pop top of stack into register
OR reg1,reg2 Logical OR register to register
ORI reg,immed Logical OR immediate to register
POP reg pop register off the stack
PUSH reg push register on to the stack
RET   return control to address on top of stack
ROL reg,reg rotate bits left by register
ROLI reg,immed rotate bits left by immediate value
ROR reg,reg rotate bits right by register
RORI reg,immed rotate bits right by immediate value
SB addr,reg store byte from register to address
SH addr,reg store halfword from register to address
SHL reg,reg shift bits left by register
SHLI reg,immed shift bits left by immediate value
SHR reg,reg shift bits rightt by register
SHRI reg,immed shift bits right by immediate value
SLH addr,reg store left half register at address
SUB reg,reg subtract register from register
SUBI reg,immed subtract immediate value from register
SUBU reg,reg subtract unsigned register from register
SUBUI reg,immed subtract unsigned immediate from register
SW addr,reg store word from register to address
XOR reg1,reg2 Logical EXLUSIVE OR register to register
XORI reg,immed Logical EXLUSIVE OR immediate to register

[Return to SPASM reference].


This page maintained by Barry Wilks.  (updated November, 1999)
© Southern Cross University, 1999