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?
Name:
Anonymous2008-05-09 0:17
True. Since OP is already in classes, it's going to be kind of a crunch, but OP needs to play with this shit a lot rather than just doing school work as assigned (also important, of course). CS people are lucky enough to be able to do this, since computers are everywhere and compilers are free. You've got professional facilites available to you. Just imagine needing to purchase thousands of dollars of equipment before you could write a proper program. That's how it is in most fields. You CS kids don't know how good you have it.
OP, I want to see you reading at least one CS paper per week, and learning every living language you hear about well enough to read it. You can study the history of programming in your spare time. If you care about being successful in the field (not just grinding out programs that work often enough to get okayed for deployment, but writing good programs), this is what you'll be doing.
You have no idea how often I'm talking to a CS major and find myself delivering a lecture rather than having a discussion. You and your peers are fucking clueless, and it's all your fault for not reading and not practicing, and above all, not knowing how to consult documentation.