Hey there
I'm (very) new to programming for the 6502, but I do have a little experience in programming. I've been following the Nerdy Nights tutorials and I'm pretty far into it, but in every example file in the tutorial, there's a section that looks like:
Now, I know this is just an infinite loop, but the tutorial never explains what it's there for. What would you ever need an infinite loop for? Wouldn't it just crash the game?
And does the code under labels get executed every frame, or only when it jumps to that label?
Another question, why are the sprites/backgrounds defined at the very bottom of the code, but then used before that? Wouldn't you need to load the graphics before you can use them, or does the order of the code not matter in assembly?
Sorry for all the questions, but assembly seems to be a lot different (to me at least) from other programming languages and it has me all confused
Any help is appreciated, and expect more questions
I'm (very) new to programming for the 6502, but I do have a little experience in programming. I've been following the Nerdy Nights tutorials and I'm pretty far into it, but in every example file in the tutorial, there's a section that looks like:
Code:
Forever:
JMP Forever
JMP Forever
Now, I know this is just an infinite loop, but the tutorial never explains what it's there for. What would you ever need an infinite loop for? Wouldn't it just crash the game?
And does the code under labels get executed every frame, or only when it jumps to that label?
Another question, why are the sprites/backgrounds defined at the very bottom of the code, but then used before that? Wouldn't you need to load the graphics before you can use them, or does the order of the code not matter in assembly?
Sorry for all the questions, but assembly seems to be a lot different (to me at least) from other programming languages and it has me all confused
Any help is appreciated, and expect more questions