The objective of my code is to present the numbers 0 to 15 in hexadecimal ~ above the Digital laboratory Sim.

You are watching: Fetch address not aligned on word boundary

I"m gaining this error

Runtime exemption at 0x00400024: store address not set on word boundary 0xffff0011This is the password I"m using:

.datadigitos: .word 0x3F,0x6,0x5B,0x4F,0x66,0x6D,0x7D,0x7,0x7F,0x67,0x77,0x7F,0x39,0x3F,0x79,0x71contador: .word 16 .textmain: la $t0,0xFFFF0011 la $a0,contador lw $t1,0($a0) li $t9,0 la $t2, digitos loop: lw $t3,0($t2) sw $t3, 0($t0) addi $t9,$t9,1 addi $t2,$t2,4 blt $t9,$t1,loopThe instruction la $t0,0xFFFF0011 is the one responsible by the error. 0xFFFF0011 controls the left led and also 0xFFFF0010 controls the ideal led.

Here is the funny part. If I use 0xFFFF0010 the code functions as expected but if I use the 0xFFFF0011 it does no work.

What am ns doing wrong?


mips mars-simulator
re-superstructure
follow
edited Mar 9 "13 in ~ 13:12
*

Bart
18.7k77 gold badges6868 silver badges7575 bronze badges
request Mar 22 "12 in ~ 21:33
*

FavolasFavolas
6,5232727 yellow badges6969 silver badges114114 bronze badges
add a comment |

1 prize 1


energetic earliest Votes
8
Are you sure that the error is continue on the line? i think the error is actually happening here:

sw $t3, 0($t0)The trouble is the you"re make the efforts to save a word (because you"re using sw) come an address that"s not word-aligned. 0xFFFF0011 is no word-aligned. The reason why 0xFFFF0010 works is since it is word-aligned.

A native is 4 bytes long, for this reason the valid word-aligned addresses space 0xFFFF0010, 0xFFFF0014, 0xFFFF0018, etc. Something in in between isn"t word-aligned.

You should have the ability to fix this by changing it native sw come sb:

sb $t3, 0($t0)This works due to the fact that storing a byte go not require a word-aligned address.

Edit: come clarify, a word-aligned attend to is one that"s divisible by 4.


share
follow
edited Mar 22 "12 at 21:57
reply Mar 22 "12 at 21:47
*

JeffJeff
6,92133 yellow badges2121 silver badges3131 bronze title
2
include a comment |

her Answer


Thanks for contributing response to stack Overflow!

Please be certain to answer the question. Carry out details and share your research!

But avoid

Asking because that help, clarification, or responding to various other answers.Making statements based upon opinion; ago them increase with recommendations or an individual experience.

To learn more, see our advice on writing great answers.

See more: A Fault Has Occurred Causing A Virtual Cpu To Enter The Shutdown State


Draft saved
Draft discarded

Sign increase or log in


sign up making use of Google
sign up utilizing Facebook
authorize up utilizing Email and Password
send

Post as a guest


name
email Required, yet never shown


Post as a guest


surname
email

Required, yet never shown


write-up Your price Discard

By clicking “Post your Answer”, you agree to our terms of service, privacy policy and cookie plan


Not the answer you're feather for? Browse various other questions tagged mips mars-simulator or ask your own question.


The Overflow Blog
Featured top top Meta
connected
0
MIPS indict in Data Directive
0
Runtime exception, store resolve not aligned on word boundary
1
MIPS: store attend to not to adjust on word border
3
Nested for Loop Multiple problems Mips
1
Why I have the error "store deal with not set on word boundary"
3
What walk this MIPS assembly code correspond to?
1
MARS MIPS simulator's built-in assembler aligns an ext than requested?
warm Network questions much more hot questions

inquiry feed
subscribe to RSS
inquiry feed To subscribe to this RSS feed, copy and paste this URL right into your RSS reader.


*

stack Overflow
assets
company
ridge Exchange Network
site style / logo © 2021 stack Exchange Inc; user contributions licensed under cc by-sa. Rev2021.11.23.40817


Stack Overflow works best with JavaScript enabled
*

her privacy

By click “Accept every cookies”, friend agree stack Exchange deserve to store cookies on your maker and disclose details in accordance through our Cookie Policy.