6502 basics
-
- Member
- Posts: 55
- Joined: Wed Jun 11, 2014 2:33 pm
- Location: Lake Macquarie, NSW, Australia
- Contact:
Re: 6502 basics
Alas, Prime, you were hoping for opinions AND consensus! Unfortunately each of us has a slightly differing opinion on commenting and level of detail and word usage and formatting and capitalisation and voice and ...
I suggest you just write two different versions of the tutorial, one brief and the other containing plenty of detail. Some beginners will not need hand-holding, others will.
I suggest you just write two different versions of the tutorial, one brief and the other containing plenty of detail. Some beginners will not need hand-holding, others will.
Re: 6502 basics
In all seriousness I won't be commenting as I did again,anyone with the desire to learn will have the material at hand be it a book or google to reference the instruction set.MarcWalters wrote:Alas, Prime, you were hoping for opinions AND consensus! Unfortunately each of us has a slightly differing opinion on commenting and level of detail and word usage and formatting and capitalisation and voice and ...
Ya no kidding Marc
I suggest you just write two different versions of the tutorial, one brief and the other containing plenty of detail. Some beginners will not need hand-holding, others will.
Re: 6502 basics
Man, please knock it off. That behavior sucks so much. Giving a guy shit about commenting code, x=x+1, "wat?" and all that crap. You did the same thing to a post of mine and more or less turned the post (a good one, too) into crap -- and don't think for a second I've forgotten and all is fine. Meanwhile, and while enjoying the comfort of an anonymous keyboard, your code upload level sits at "x = NULL".dudz wrote:wat?A loop counter is a variable
So, how about some code (or at least a tutorial) from you? The first line could go like this: "A loop counter is a variable."
Re: 6502 basics
if only you had understood the point. try reading the post i referred to again:
and nowhere did i give that guy shit, i just suggested what i think is an improvement - which he asked for in the first place. i dont know what his background is, but this kind of comments are typical beginner mistakes - and thus shouldnt appear in a tutorial by all means.
that implies that the X register cant be a loop counter, because it is not a variable (and thus my suggested comment is "incorrect and misleading") - which is, frankly, bullshit - of course a register can keep a variable, only because you dont store it to memory, it does not mean its not one. and how much code i uploaded is completely irrelevant for that matter (and you have no idea of how much i contributed to various places anyway). much more important though, "increment x register" does not belong into the comment, just like "x=x+1" - because thats what the damned instruction does, and you can always look that up. in the comments belongs what the instruction does in the program, ie what you can not look up in the opcode reference.Prime wrote:A loop counter is a variable so that statement is incorrect and misleading,i'll fix that for yoududz wrote:"increment loop counter" would be much more like it, IMHOWhat should your comment be? So you end up putting x=x+1. Not a big deal in the larger context.
"Increment x register used as loop counter"
and nowhere did i give that guy shit, i just suggested what i think is an improvement - which he asked for in the first place. i dont know what his background is, but this kind of comments are typical beginner mistakes - and thus shouldnt appear in a tutorial by all means.
Re: 6502 basics
Prime wrote:A loop counter is a variable so that statement is incorrect and misleading,i'll fix that for yoududz wrote:"increment loop counter" would be much more like it, IMHOWhat should your comment be? So you end up putting x=x+1. Not a big deal in the larger context.
"Increment x register used as loop counter"
So me saying Increment x register used as (loop counter) is me implying x register can't be used as a loop counter?dudz wrote:that implies that the X register cant be a loop counter, because it is not a variable (and thus my suggested comment is "incorrect and misleading") - which is, frankly, bullshit -
Re: 6502 basics
The point is that you frequently criticize inconsequential, non-issues (the "comment point value" of x=x+1... a non-factoring cycle count in an article describing a generic loop for a stack frame, to name just two), ...and then casually toss in something like the comment about Prime's beginner commenting style -- which by the way, is a subjective luxury an author enjoys. And let's face it, if you're still farting around on a Commodore 64 and criticizing fellow programmers (and their code commenting style) in public, then you are a beginner yourself. Let's get serious here -- the guy is a professional programmer.
Crappy comments is no comments at all. After that is up to the author's fancy. The same goes for tutorials written in a little text box. It's real easy to sit on the outside looking in. You wanna be Stephen King? Fine, then be Stephen King... in your next tutorial. And enough already -- look where this thread has ended up. I forgot what it's about.
Crappy comments is no comments at all. After that is up to the author's fancy. The same goes for tutorials written in a little text box. It's real easy to sit on the outside looking in. You wanna be Stephen King? Fine, then be Stephen King... in your next tutorial. And enough already -- look where this thread has ended up. I forgot what it's about.
Re: 6502 basics
no. you said "that statement is incorrect and misleading" because "A loop counter is a variable" - and that is simply not the case. infact, making a difference between "a variable" and "a register" hardly ever makes sense at all (in 6502 code), because most of the time (on 6502 anyways) registers are (temporary and/or local) variables. if the register would hold a constant value, then it makes sense to put that into a comment. of course your comment is correct, and contains even more information even than what i suggested - but it again describes the "inx" instruction ("increment x register") which is not what a comment should do. as said before, good comments describe what happens in the context of the program, they dont describe what individual instructions or operations do (thats what an opcode reference is for). in this example perhaps "advance loop counter" or maybe "advance index" would be even better for matter, because thats really all that matters at this point. look at the next line for example:So me saying Increment x register used as (loop counter) is me implying x register can't be used as a loop counter?
Code: Select all
bne ClearScreenLoop //if x register is not equal to zero goto ClearScreenLoop
edit: MarcWalters already said it very well in his first post actually... except that you probably shouldnt really refer to richards tutorials (actually forget them =P)
Re: 6502 basics
You are incorrect and it is misleading! xregister is not a loopcounter it can be used as a loopcounter I did say increment x register used as loop counter.Look dudz I've ignored your personal attack and let it go.
You've hijacked my thread over a silly reason x = x +1 and made a comment increase loop counter which I corrected you on which I also put a smiley to let you know I was sorta joking at the same time.Now your nit picking again about bne.
Do you understand the concept of spoon feeding a person that doesn't know even what a variable is?That's what I was trying to do,why do you get so defensive?
I edited my first post with your definition of bne thanks for that.
I don't want to argue how about were both correct and incorrect that seem fair?
You've hijacked my thread over a silly reason x = x +1 and made a comment increase loop counter which I corrected you on which I also put a smiley to let you know I was sorta joking at the same time.Now your nit picking again about bne.
Do you understand the concept of spoon feeding a person that doesn't know even what a variable is?That's what I was trying to do,why do you get so defensive?
I edited my first post with your definition of bne thanks for that.
I don't want to argue how about were both correct and incorrect that seem fair?
Re: 6502 basics
yeah whatever. read MarcWalters post about a dozen times more, there is little to add to it left. if you can't see how it is not a good idea to comment "inx" with "x=x+1",then you should team up with satpro perhaps
Who is online
Users browsing this forum: No registered users and 9 guests