Assembly compiling error on PCSpim simulator

0

i'm new to assembly and i'm studying it applied on MIPS. My university teacher gave us some codes. Here there is one.

.data 0x100020000
dati1: .word 0xC000, 0xF000A000, 0x8000FFFF, 0x23150001, 0x0
.text
main:
sub1: move $t0, $zero
      la $t1, dati1
ciclo1: lw $t2, 0($t1)
         move $t3,$t2
         bne $t2, $zero, dopo1a
         ori $t4, $zero, 1
         beq $zero, $zero, dopo1b
dopo1a: slt $t4, $zero, $t2
dopo1b: bne $t4, $zero, dopo1c
        nor $t3, $t3, $t3
        addi $t3, $t3, 1
dopo1c: sw $t3, 32($t1)
        addi $t1, $t1, 4
        addi $t0, $t0, 1
        slti $t4, $t0, 5
        bne $t4, $zero, ciclo1
        jr $ra

When i try to compile it with PCSpim simulator it gaves out an error:

Exception occurred at PC=0x00000000
Bad address in data/stack read: 0x00020000
Exception occurred at PC=0x00000004
Bad address in text read: 0x00000004

NOTE: I have cleared registers in PCSpim. Also in Simulator-> Set Run Parameters i have as address or label to start program: 0x00400000. ( In another stackoverflow question my same problem got solved by this because the address was 0x00000000 ). Any help would be very appreciated! Thanks.

assembly
mips
pcspim
asked on Stack Overflow Apr 24, 2018 by (unknown user) • edited Apr 24, 2018 by (unknown user)

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0