tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Adding asm examples
Julio Merino <jmmv%netbsd.org@localhost> wrote:
> On 11/14/11 10:32 PM, Valeriy E. Ushakov wrote:
>> Julio Merino<jmmv%netbsd.org@localhost> wrote:
>>> Exactly my point. I could also RTFS of things people have pointed out,
>>> but that's not my idea of "learner-friendly" material; specially for a
>>> complete newbie in a topic.
>>
>> I understand your enthusiasm, but I still don't think teaching
>> complete newbies assembly programming to be something that netbsd
>> should consider a useful goal.
I still didn't get an answer to this question. What does this all
have to do with netbsd?
>> Especially so when the examples you
>> choose are hardly "learner-friendly".
>
> As I have mentioned countless times already: the particular example I
> posted is poor, precisely due to my lack of knowledge on the area. It
> can (and will, according to the suggestions already in the thread) be
> fixed to be more representative, so please stop looking at that example.
This is the only example that was committed and which is at least
netbsd-specific. What else was there to look at? Ok, I will stop.
You also mentioned that
| There could be another example showing the C->ASM call protocol.
for which I suggested that there's nothing netbsd-specific about it
and you can trivially obtain this kind of examples from the compiler.
I think dsl@ also expressed his agreement with that last suggestion
earlier in the thread.
Compile
int foo(int a) { return a; }
with -S, rename the output to .S add it to your SRCS and hack away.
Call foo() from your main.c. Change signature of foo to suit your
needs.
Have you actually tried that?
> By the way, making fun of people does not seem like a good way to
> convince them that they are wrong; it's just gonna piss them off.
It was never my intention to make fun of you. The "look ma" comment,
if that was what triggered your reaction, was about the original linux
example that I vaguely remember seeing in passing some time ago.
>> As I said, you are not helping any newbies, yourself included,
>
> Why do you keep assuming that this is useless, including to myself? How
> can you decide what I can find or cannot find useful?
Why do you keep assuming that your learning experience is
representative of that of a typical subset of netbsd users? That is,
to repeat myself, what is the target audience and how it is relevant
to netbsd. Why we as a project want to commit ourselves to
maintaining assembler tutorials for N+1 architectures?
I don't prescribe you how you should learn an assembler, though I
tried to provide hints based on my experience with learning (FSVO
"learning") assemblers for more than half a dozen architectures. But
when you want to commit your examples, it's no longer just about your
own learning experience. I think I can question both the quality and
relevance of the examples in particular and the wisdom of having such
examples in tree in general.
> It may be useless to you, but I'd have found it extremely helpful if
> it had been there... just as the example code I found online did
> (although it pushed me in the wrong direction, because it is not
> reviewed).
When you say that you as a newbie found this or that example helpful,
nobody can really argue with that as it's a statement about you ("I
found it helpful"), not about an example. If I decide to learn
somthing I may find some techniques or examples helpful that would
horrify experienced practitioners. Yet they will also be in no
position to challenge my statement that I found those examples
helpful.
Now, please, can we finally start discussing the examples per se?
Have you tried "cc -S" route? Did you find that it suck? Confusing?
Do you still want a hand-written example after trying cc -S?
And there's also that question about netbsd relevant target audience
that I'd still like to get an answer for. I dont think that you have
shown how teaching complete newbies assembler programming is relevant
to their day-to-day use of netbsd.
-uwe
Home |
Main Index |
Thread Index |
Old Index