Create array of bytes

135 Views Asked by At

I'm trying to create an array in memory to store bytes. I can do it with words with the following code

You can test the code here https://cpulator.01xz.net/?sys=nios-de1soc

.text
.global _start
_start:
    movia r8, PATH
    movi r4, 0xE
    stw r4, 0(r8)
    stw r4, 4(r8)

.data
ARRAY:
    .skip 10

When i change the line stw r4, 4(r8) with stw r4, 1(r8) it gives me the error Warning: stw address 00000031 is misaligned. I mostly understand the concept of misalignment, but is there any way of specifying in .skip 10 that it should be .byte and not .word? Thanks

0

There are 0 best solutions below