compiler errors - Assembly Program working in Qtspim but not PCSpim-Cache -


i have following assembly program compiles , runs correctly in qtspim , displays correct result in qtsspim console. however, wish observe data segment in pcspim-cache not compile correctly , display correct result in out (it displays 0 in each position) should program computes kronecker product of 2 vectors specified in data portion of file. here code:

## 4/20/16 ## lab 5   .data 0x10000480 str1: .asciiz "this lab 5, a2: \n" str2: .asciiz "c = " str3: .asciiz ", "  def: .word 4   arraya:  .word 1, 2, 3 arrayb:  .word 8, 7, 6 arrayc:  .space 100  .text  main:  ## print str1 li $v0, 4  la $a0, str1 syscall  ## print str2 li $v0, 4 la $a0, str2  syscall  la $s0, arrayb         # load address of b $s0 la $s1, arraya         # load address of $s1  #la $s2, arrayc         # load address of c $s1  li $t0, 0         # initialize iterator   li $s3, 3         # 3 count     kproduct:     li $t5, 1                   # load value of     li $t1, 0                   # initialize second iterator      beq $t0, $s3, end      lw $t2, ($s0)     addi $t0, $t0, 1            # increment overall iterator      addi $s0, $s0, 4        j kloop     kloop:         beq $t1, $s3, kproduct  # when 3 calculations made          mul $t4, $t2, $t5       # a*b         addi $t5, $t5, 1        # increment         addi $t1, $t1, 1        # increment iterator           ## print next value          li $v0, 1         move $a0, $t4          syscall                         ## print space          li $v0, 4         la $a0, str3          syscall           j kloop  end:      ## end      li $v0, 10      syscall 

if shed light on why not work in both compilers appreciated. including link pcspim cache, given lab instructor use. hope familiar qtspim.

pcspim-cache link: http://www.disca.upv.es/spetit/spim.htm


Comments

Popular posts from this blog

html - Styling progress bar with inline style -

java - Oracle Sql developer error: could not install some modules -

How to use autoclose brackets in Jupyter notebook? -