MIPS: No error in Mars IDE, but error in QTSpim [duplicate]











up vote
0
down vote

favorite













This question already has an answer here:




  • What is the “relationship” between addi and subi?

    3 answers



  • Why doesn't there exists a subi opcode for MIPS?

    2 answers




I wrote my MIPS code in Mars, and it worked completely fine. But, I am having errors in QTSpim saying



Error: "Instruction references undefined symbol at 0x00400158
[0x00400158] 0x08000000 j 0x00000000 [next] ; 115: j next"



I have no idea what the error is telling. My instructor will test the code in QTSpim, so I have to make sure it works there.










share|improve this question















marked as duplicate by Peter Cordes assembly
Users with the  assembly badge can single-handedly close assembly questions as duplicates and reopen them as needed.

StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 18 at 13:33


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.











  • 1




    There is no subi instruction. Change it to addi $t2, $t2, -1. As for the second error, make sure next is properly defined.
    – Jester
    Nov 18 at 12:02










  • What do you mean by properly defined? I checked it again but it looks ok. But, still getting an error in QTSpim.
    – Chintan Patel
    Nov 18 at 14:00






  • 1




    edit your question with a Minimal, Complete, and Verifiable example that reproduces the error in SPIM but works in MARS. Probably just 2 lines: the label definition and the j next instruction. (Make sure that actual 2-line file assembles in MARS but not SPIM.)
    – Peter Cordes
    Nov 18 at 14:04

















up vote
0
down vote

favorite













This question already has an answer here:




  • What is the “relationship” between addi and subi?

    3 answers



  • Why doesn't there exists a subi opcode for MIPS?

    2 answers




I wrote my MIPS code in Mars, and it worked completely fine. But, I am having errors in QTSpim saying



Error: "Instruction references undefined symbol at 0x00400158
[0x00400158] 0x08000000 j 0x00000000 [next] ; 115: j next"



I have no idea what the error is telling. My instructor will test the code in QTSpim, so I have to make sure it works there.










share|improve this question















marked as duplicate by Peter Cordes assembly
Users with the  assembly badge can single-handedly close assembly questions as duplicates and reopen them as needed.

StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 18 at 13:33


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.











  • 1




    There is no subi instruction. Change it to addi $t2, $t2, -1. As for the second error, make sure next is properly defined.
    – Jester
    Nov 18 at 12:02










  • What do you mean by properly defined? I checked it again but it looks ok. But, still getting an error in QTSpim.
    – Chintan Patel
    Nov 18 at 14:00






  • 1




    edit your question with a Minimal, Complete, and Verifiable example that reproduces the error in SPIM but works in MARS. Probably just 2 lines: the label definition and the j next instruction. (Make sure that actual 2-line file assembles in MARS but not SPIM.)
    – Peter Cordes
    Nov 18 at 14:04















up vote
0
down vote

favorite









up vote
0
down vote

favorite












This question already has an answer here:




  • What is the “relationship” between addi and subi?

    3 answers



  • Why doesn't there exists a subi opcode for MIPS?

    2 answers




I wrote my MIPS code in Mars, and it worked completely fine. But, I am having errors in QTSpim saying



Error: "Instruction references undefined symbol at 0x00400158
[0x00400158] 0x08000000 j 0x00000000 [next] ; 115: j next"



I have no idea what the error is telling. My instructor will test the code in QTSpim, so I have to make sure it works there.










share|improve this question
















This question already has an answer here:




  • What is the “relationship” between addi and subi?

    3 answers



  • Why doesn't there exists a subi opcode for MIPS?

    2 answers




I wrote my MIPS code in Mars, and it worked completely fine. But, I am having errors in QTSpim saying



Error: "Instruction references undefined symbol at 0x00400158
[0x00400158] 0x08000000 j 0x00000000 [next] ; 115: j next"



I have no idea what the error is telling. My instructor will test the code in QTSpim, so I have to make sure it works there.





This question already has an answer here:




  • What is the “relationship” between addi and subi?

    3 answers



  • Why doesn't there exists a subi opcode for MIPS?

    2 answers








assembly mips mars-simulator spim qtspim






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 18 at 13:58

























asked Nov 18 at 8:42









Chintan Patel

32




32




marked as duplicate by Peter Cordes assembly
Users with the  assembly badge can single-handedly close assembly questions as duplicates and reopen them as needed.

StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 18 at 13:33


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.






marked as duplicate by Peter Cordes assembly
Users with the  assembly badge can single-handedly close assembly questions as duplicates and reopen them as needed.

StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 18 at 13:33


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.










  • 1




    There is no subi instruction. Change it to addi $t2, $t2, -1. As for the second error, make sure next is properly defined.
    – Jester
    Nov 18 at 12:02










  • What do you mean by properly defined? I checked it again but it looks ok. But, still getting an error in QTSpim.
    – Chintan Patel
    Nov 18 at 14:00






  • 1




    edit your question with a Minimal, Complete, and Verifiable example that reproduces the error in SPIM but works in MARS. Probably just 2 lines: the label definition and the j next instruction. (Make sure that actual 2-line file assembles in MARS but not SPIM.)
    – Peter Cordes
    Nov 18 at 14:04
















  • 1




    There is no subi instruction. Change it to addi $t2, $t2, -1. As for the second error, make sure next is properly defined.
    – Jester
    Nov 18 at 12:02










  • What do you mean by properly defined? I checked it again but it looks ok. But, still getting an error in QTSpim.
    – Chintan Patel
    Nov 18 at 14:00






  • 1




    edit your question with a Minimal, Complete, and Verifiable example that reproduces the error in SPIM but works in MARS. Probably just 2 lines: the label definition and the j next instruction. (Make sure that actual 2-line file assembles in MARS but not SPIM.)
    – Peter Cordes
    Nov 18 at 14:04










1




1




There is no subi instruction. Change it to addi $t2, $t2, -1. As for the second error, make sure next is properly defined.
– Jester
Nov 18 at 12:02




There is no subi instruction. Change it to addi $t2, $t2, -1. As for the second error, make sure next is properly defined.
– Jester
Nov 18 at 12:02












What do you mean by properly defined? I checked it again but it looks ok. But, still getting an error in QTSpim.
– Chintan Patel
Nov 18 at 14:00




What do you mean by properly defined? I checked it again but it looks ok. But, still getting an error in QTSpim.
– Chintan Patel
Nov 18 at 14:00




1




1




edit your question with a Minimal, Complete, and Verifiable example that reproduces the error in SPIM but works in MARS. Probably just 2 lines: the label definition and the j next instruction. (Make sure that actual 2-line file assembles in MARS but not SPIM.)
– Peter Cordes
Nov 18 at 14:04






edit your question with a Minimal, Complete, and Verifiable example that reproduces the error in SPIM but works in MARS. Probably just 2 lines: the label definition and the j next instruction. (Make sure that actual 2-line file assembles in MARS but not SPIM.)
– Peter Cordes
Nov 18 at 14:04



















active

oldest

votes






















active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes

Popular posts from this blog

Costa Masnaga

Fotorealismo

Sidney Franklin