I am trying to make an array to which I have provided the data at compile time in MIPS. but I am getting error and thus the code is not getting compiled. Here is the chunk of code which is causing error.
.data
array: .space 'A','B','C','D','E','F','G','H','I'
What is the reason for error? If you know any tutorials which explain arrays of .space, .byte and .word, please mention them in answer.
Regards
 
                        
You can't use
.spacedirective for initialized arrays..spaceis for reserving N uninitialized bytes. You can use.byteor.wordfor such purpose, depending on the size of your data. In your example, you're using ASCII characters, so.byteshould be OK.Any MIPS assembly reference should be OK. Here's one.