OpenCores
URL https://opencores.org/ocsvn/plasma/plasma/trunk

Subversion Repositories plasma

[/] [plasma/] [trunk/] [tools/] [opcodes.asm] - Diff between revs 111 and 148

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 111 Rev 148
Line 7... Line 7...
# COPYRIGHT: Software placed into the public domain by the author.
# COPYRIGHT: Software placed into the public domain by the author.
#    Software 'as is' without warranty.  Author liable for nothing.
#    Software 'as is' without warranty.  Author liable for nothing.
# DESCRIPTION:
# DESCRIPTION:
#    This assembly file tests all of the opcodes supported by the
#    This assembly file tests all of the opcodes supported by the
#    Plasma core.
#    Plasma core.
#    This test assumes that address 0xffff is the UART write register
#    This test assumes that address 0x20000000 is the UART write register
#    Successful tests will print out "A" or "AB" or "ABC" or ....
#    Successful tests will print out "A" or "AB" or "ABC" or ....
#    Missing letters or letters out of order indicate a failure.
#    Missing letters or letters out of order indicate a failure.
##################################################################
##################################################################
        .text
        .text
        .align  2
        .align  2
Line 31... Line 31...
   ori   $5,$5,0
   ori   $5,$5,0
   lui   $sp,0
   lui   $sp,0
   ori   $sp,$sp,0xfff0
   ori   $sp,$sp,0xfff0
 
 
   mtc0  $0,$12             #disable interrupts
   mtc0  $0,$12             #disable interrupts
   ori   $20,$0,0xffff      #serial port write address
   lui   $20,0x2000         #serial port write address
   ori   $21,$0,'\n'        # letter
   ori   $21,$0,'\n'        # letter
   ori   $22,$0,'X'         #'X' letter
   ori   $22,$0,'X'         #'X' letter
   ori   $23,$0,'\r'
   ori   $23,$0,'\r'
   ori   $24,$0,0x0f80      #temp memory
   ori   $24,$0,0x0f80      #temp memory
 
 
Line 638... Line 638...
 
 
   #a: LB
   #a: LB
   ori   $2,$0,'a'
   ori   $2,$0,'a'
   sb    $2,0($20)
   sb    $2,0($20)
   or    $2,$0,$24
   or    $2,$0,$24
   li    $3,0x41424344
   li    $3,0x414243fc
   sw    $3,16($2)
   sw    $3,16($2)
   lb    $4,16($2)
   lb    $4,16($2)
   sb    $4,0($20)
   sb    $4,0($20)
   lb    $4,17($2)
   lb    $4,17($2)
   sb    $4,0($20)
   sb    $4,0($20)
   lb    $4,18($2)
   lb    $4,18($2)
   sb    $4,0($20)
   sb    $4,0($20)
   lb    $2,19($2)
   lb    $2,19($2)
 
   sra   $3,$2,8
 
   addi  $3,$3,0x45
 
   sb    $3,0($20)
 
   addi  $2,$2,0x49
   sb    $2,0($20)
   sb    $2,0($20)
   sb    $23,0($20)
   sb    $23,0($20)
   sb    $21,0($20)
   sb    $21,0($20)
 
 
   #b: LBU
   #b: LBU

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.