SRC Instruction Set

Label: op-code operands ;comments
Values are assumed to be decimal unless terminated by B (binary) or H (hexadecimal)
CategoryOpcodeOperandsMeaning
Load and
store
ldra, c2(rb)Load from displacement address
ldra, c2Load from absolute address when rb is register 0
ldrra, c1Load from relative address
stra, c2(rb)Store into displacement address
stra, c2Store into absolute address when rb is register 0
strra, c1Store into relative address
lara, c2(rb)Load value of displacement address into ra
lara, c2Load value of absolute address into ra when rb is register 0
larra, c1Load value of relative address into ra
Arithmetic addra, rb, rcAdd rb to rc, and put result in ra
addira, rb, c2Add rb to immediate constant, and put result in ra
subra, rb, rcSubtract rc from rb, and put result in ra
negra, rcPlace 2's complement negative of rc into ra
andra, rb, rcAND rb and rc, and put result in ra
andira, rb, c2AND rb and immediate constant, and put result in ra
orra, rb, rcOR rb and rc, and put result in ra
orira, rb, c2OR rb and immediate constant, and put result in ra
notra, rcPlace logical NOT of rc into ra
Shift shrra, rb, c3Shift rb right into ra by constant shift count c3 <= 31
shrra, rb, rcShift rb right into ra by count in rc; c3 is 0
shrara, rb, c3Shift rb right with sign-extend into ra by constant c3
shrara, rb, rcShift rb right with sign-extend into ra by count in rc
shlra, rb, c3Shift rb left into ra by constant c3
shlra, rb, rcShift rb left into ra by count in rc; c3 is 0
shcra, rb, c3Shift rb left circularly into ra by constant c3
shcra, rb, rcShift rb left circularly into ra by count in rc; c3 is 0
Branch brrb, rc, c3Branch to target in rb if rc satisfies condition c3
brrbBranch unconditionally to rb
brnv Branch never
brzrr, rcBranch to rb if rc is zero
brnzrb, rcBranch to rb if rc is nonzero
brplrb, rcBranch to rb if rc is non-negative
brmirb, rcBranch to rb if rc is negative (sign is minus)
brlra, rb, rc, c3Branch to rb if rc satisfies c3, and save PC in ra
brlra, rbBranch unconditionally to rb, and save PC in ra
brlnvraDo not branch, but save PC in ra
brlzrra, rb, rcBranch to rb if rc is zero, and save PC in ra
brlnzra, rb, rcBranch to rb if rc is nonzero, and save PC in ra
brlmira, rb, rcBranch to rb if rc is negative, and save PC in ra
brlplra, rb, rcBranch to rb if rc is non-negative, and save PC in ra

 

 

CategoryOpcodeOperandsMeaning
Misc. nop No operation
stop Set Run to zero, halting the machine
een Exception enable
edi Exception disable
rfi Return from interrupt PC <- IPC; enable exceptions
svira, rbSave II and IPC in ra and rb, respectively
rira, rbRestore II and IPC from ra and rb, respectively

SRC Assembly Language Conventions

.orgVALUELoad the program starting at the address Value
.equVALUEDefine the Label symbol to be the constant Value
.dcbVALUE[,VALUE]Allocate bytes and set to the 8-bit Values
.dchVALUE[,VALUE]Allocate halfwords and set to the 16-bit Values
.dcVALUE[,VALUE]Allocate memory words and set to the 32-bit Values
.dbCOUNTAllocate storage for Count 8-bit bytes
.dhCOUNTAllocate storage for Count 16-bit halfwords
.dwCOUNTAllocate storage for Count 32-bit words

CSci281/SRC_instruction_set.html was last edited by Randolph Bentson, on 2008/09/16T16:35:57-07:00

Valid HTML 4.01 Strict Valid CSS!