Name: Anonymous 2008-05-08 22:38
Hello, I had a question about incrementing a pointer to the next element in an array! For my project I am programming in Assembly, specifically in LC-3. Anyway.
Would something like this
GETC
STR R0, R4
ADD R4, #1
(loop)
Take the value with GETC, store it in the array element R4 is pointing at, and advance the pointer to the next element? I am afraid It might just add 1 to the value AT r4, rather than incrementing the pointer 1, which is its intended purpose. Any help?
Would something like this
GETC
STR R0, R4
ADD R4, #1
(loop)
Take the value with GETC, store it in the array element R4 is pointing at, and advance the pointer to the next element? I am afraid It might just add 1 to the value AT r4, rather than incrementing the pointer 1, which is its intended purpose. Any help?