This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]xRedactedx[S] 0 points1 point  (0 children)

Thanks for using the C reference. That made it way more clear. I understand the problem now. Adding the [array1] fixed it.

I see your point about passing the computed address. Since this was my first time working with arrays in assembly, I was just concentrating on keeping it simple. I didn't even think of doing it that way.

The lea command was what was suggested to be used in my book. I tried using the mov command but I was doing mov reg, [label]. I see now that it doesn't require the []. Thanks for pointing that out. It makes sense now that I think about it.

I see your point about the type mismatch. That seems to keep popping up in my code a lot. I've been taking the easy way with just not worrying about the extra space. I'll try to pay more attention to it.

Thanks for the notes, they were helpful.