Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8899927
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T00:58:38+00:00 2026-06-15T00:58:38+00:00

Why this code is giving exception at storing the float number. I am unable

  • 0

Why this code is giving exception at storing the float number. I am unable to figure out the problem. Here is the code:

li $t1,0

Loop:

add $t0,$t1,$s0

li $v0,6
syscall
mov.s $f1,$f0

swc1 $f1,0($t0)

addi $t1,$t1,4

beq $t1,20,Mult

j Loop
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T00:58:39+00:00Added an answer on June 15, 2026 at 12:58 am

    You are probably getting an unalignment exception executing swc1 $f1,0($t0).
    The instruction swc1 needs the second argument to be an effective memory address aligned at word boundary. This means that the two least significant bits of this effective memory address (in your case the address stored at $t0) need to be zero.

    The code you posted does not show the initialization of $s0 which is likely to have at least one of the two least significant bits with 1.

    To fix your code, ensure that $s0 starts with those bits in zero so the effective memory address used in swc1 is word-aligned.

    If the initialization of $s0 is done with la $s0, label you might want to use .align 2 directive when you declare the buffer to store the data, e.g.:

    label: .align 2
           .space ...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For some reason this line of code is giving me quite a problem. struct
This code is giving me this error, which I don't understand. I can't even
I've simplified my JavaScript code to the example below; this code is giving me
Can anyone tell me what's wrong with this code? It's giving me an error
This my code, and it is giving me an unexpected $end error and I
I have this piece of code that is giving me trouble. I know all
This is my code in which every line is giving me an invalid context
I copied the code from this link by giving company name and clicking the
I cannot understand why the code below is giving me this error in firebug
I have a piece of code and I could not figure out why it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.