tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Adding asm examples
On 11/12/11 10:34 PM, Valeriy E. Ushakov wrote:
> [...]
>
> You still haven't answered my question, who are the target audience?
Me, for example: someone who is reading a book on architecture X, finds
something interesting that wants to try (like inspecting some particular
register values) and has no trivial way to do so right away because all
the examples in the book are written for a different assembler and I
have no idea how to manually construct a pure assembler binary for
NetBSD that performs the correct syscalls. (My memories vaguely include
dos x86 code, which is very different as you may know. E.g. I wouldn't
know how to write an x86 hello world for NetBSD right now.)
Some other people in this thread have expressed why they think this
would be valuable to them. Granted, in the current form, the code does
not cover their "use cases" yet. The most obvious of these is having an
example that shows how to write an asm function that can be called from C.
> If I squint at it just the right way I can, in principle, see the
> purpose of the specific example you committed *provided* that there
> are also a MI man page on our ELF notes and arch-specific SYS(2) pages
> on syscall ABI (lib/libc/arch/*/SYS.h). But your example as committed
> fails to even use symbolic note and syscall names that netbsd headers
> do provide!
Well, I will gladly improve that. As I said in the commit message, I'm
not experienced at this point to know if the code is good or not. I was
actually expecting it not to be... but there is nothing preventing it
from being improved!
> [...]
> I don't find examples "stupid" (I didn't use that word either, btw),
> but I still have my doubts about target audience, hence my choice of
> "pointless". I also think that linuxish examples/howtos don't quite
> become netbsd, so, as I said, if you want to provide documentation for
> these areas, please, do it properly.
My apologies; that comment was out of tone, although it was not
addressed to you in particular. I have actually read the word stupid
elsewhere in a discussion about this particular thread.
--
Julio Merino / @jmmv
Home |
Main Index |
Thread Index |
Old Index