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.
assembly mips mars-simulator spim qtspim
marked as duplicate by Peter Cordes
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.
add a comment |
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.
assembly mips mars-simulator spim qtspim
marked as duplicate by Peter Cordes
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 nosubi
instruction. Change it toaddi $t2, $t2, -1
. As for the second error, make surenext
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 thej next
instruction. (Make sure that actual 2-line file assembles in MARS but not SPIM.)
– Peter Cordes
Nov 18 at 14:04
add a comment |
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.
assembly mips mars-simulator spim qtspim
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
assembly mips mars-simulator spim qtspim
edited Nov 18 at 13:58
asked Nov 18 at 8:42
Chintan Patel
32
32
marked as duplicate by Peter Cordes
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
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 nosubi
instruction. Change it toaddi $t2, $t2, -1
. As for the second error, make surenext
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 thej next
instruction. (Make sure that actual 2-line file assembles in MARS but not SPIM.)
– Peter Cordes
Nov 18 at 14:04
add a comment |
1
There is nosubi
instruction. Change it toaddi $t2, $t2, -1
. As for the second error, make surenext
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 thej 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
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
1
There is no
subi
instruction. Change it toaddi $t2, $t2, -1
. As for the second error, make surenext
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