When I'm programming in assembly and use the label .byte
, I have a problem executing it with Qtspim
. I tried to change the position or the value, but the problem persists and, probably, is the label.
The error reply was on line 3. At the end of the label you find the parser.
main:
.data
v : .byte 2,0,0,0,4,0,0,0
array: .byte 2,0,0,0,3,0,0,0,5,0,0,0,7,0,0,0,11,0,0,0,13,0,0,0,17,0,0,0,19,0,0,0
[..] # other code
When I change the directive .byte
to .space
the problem does not occur.
How could I resolve it?
The issue is that at least QtSpim requires the arrays to have space after the commas. So this will work just fine:
.data
v: .byte 2, 0, 0, 0, 4, 0, 0, 0
Just remember to add a space after each value.
The reason for this is that the parser QtSpim uses allows the use of a comma or a dot as decimal separator. So it is confused about your definition unless there is a space to separate.
This would be allowed for defining a float:
flo: .float 2,2
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With