| |
xIII
Registered: Nov 2008 Posts: 210 |
KickAss coding question
If I use a for loop and load a value from a table which is stored to a label inside the for loop the value is always the first value of the table ?
just an example:
.for (var i=0; i<38; i++) {
lda valuefromtable+i
sta store+1
store:
lda #$00
sta $d020
}
rts
valuefromtable: .byte 0,1,2,3,4,5,6,7,8,9,10
Question: how can this be solved ? or what am I doing wrong ? |
|
... 10 posts hidden. Click here to view all posts.... |
| |
Mixer
Registered: Apr 2008 Posts: 455 |
Quote: Word. I think also cars should be only used by people who can build an engine.
I like that sentence, because it is so true. |
| |
Oswald
Registered: Apr 2002 Posts: 5095 |
if you dont learn your shit, then you will end up putting up questions like the above.
especially the dissassembly, and not understanding kickass did exactly what he was asking for is like a disaster. its not like he cant build an engine, he doesnt even knows which pedal does what. |
| |
xIII
Registered: Nov 2008 Posts: 210 |
@Cruzer/Burglar: I was expecting a different value after LDA when I checked the result of the parsing by Kickass. But I know now that the code is OK once I run it!
Just add this question to the list: 'stupid coding questions by xIII' ;)
Knut: thanks
Nith: it was just a fast example.
Oswald: Maybe... one day... if I keep trying... if I keep asking... I'll be a big boy too... maybe... probably not... but maybe... ok... not... but I don't care :) |
| |
Burglar
Registered: Dec 2004 Posts: 1105 |
@oswald, isnt learning exactly what he's trying to achieve?
experienced coders (such as myself) don't mind giving noob coders some explanations and pointers ;) |
| |
Oswald
Registered: Apr 2002 Posts: 5095 |
me too, but its frustrating when the asker disappears, and leaves us here wondering what he even wanted :)
knut has the right answers. |
Previous - 1 | 2 - Next |