1 ##################################################################
3 # AUTHOR: Steve Rhoads (rhoadss@yahoo.com)
4 # DATE CREATED: 1/10/02
5 # FILENAME: opcodes.asm
6 # PROJECT: Plasma CPU core
7 # COPYRIGHT: Software placed into the public domain by the author.
8 # Software 'as is' without warranty. Author liable for nothing.
10 # This assembly file tests all of the opcodes supported by the
12 # This test assumes that address 0x20000000 is the UART write register
13 # Successful tests will print out "A" or "AB" or "ABC" or ....
14 # Missing letters or letters out of order indicate a failure.
15 ##################################################################
23 la $gp, _gp #initialize stack pointer
24 la $4, __bss_start #$4 = .sbss_start
25 la $5, _end #$5 = .bss_end
30 nop #nops required to place ISR at 0x3c
34 #Code to place at address 0x3c
40 InterruptVector: #Address=0x3c
41 mfc0 $26,$14 #C0_EPC=14 (Exception PC)
46 mtc0 $0,$12 #disable interrupts
47 lui $20,0x2000 #serial port write address
48 ori $21,$0,'\n' #<CR> letter
49 ori $22,$0,'X' #'X' letter
51 ori $24,$0,0x0f80 #temp memory
62 #Patch interrupt vector to 0x1000003c
63 la $5, OS_AsmPatchValue
77 ######################################
78 #Arithmetic Instructions
79 ######################################
219 addiu $7,$6,2356+1+'E' #E
324 ######################################
325 #Branch and Jump Instructions
326 ######################################
686 ######################################
687 #Load, Store, and Memory Control Instructions
688 ######################################
847 ######################################
848 #Logical Instructions
849 ######################################
941 ######################################
943 ######################################
997 ######################################
999 ######################################