0

I have following declaration data:

temp db 50 DUP(0)

How do I access each byte? Let's say I do mov temp, 48 and then want to move 49 into the next byte of the allocated ones. I tried to

inc temp
mov temp, 49

but it just increased temp value to 49

user3885166
  • 217
  • 2
  • 11
  • possible duplicate of [accessing array's element in assembly language (windows)](http://stackoverflow.com/questions/2864011/accessing-arrays-element-in-assembly-language-windows) – Marc B Jan 12 '15 at 21:31

1 Answers1

1

E.g.

mov [temp + 1], 49

or, if you want to dynamically select the slot in temp to store a value in

mov [temp + ebx], 49

where ebx holds the index value (could be any register)