Re: C# programmer wants to learn assembly?? plz help
- From: Frank Kotler <fbkotler@xxxxxxxxxxx>
- Date: Fri, 29 Dec 2006 09:03:02 GMT
Herbert Kleebauer wrote:
Frank Kotler wrote:
Herbert Kleebauer wrote:
Your refusal to use a linker puts you uncomfortably close to the RasAsm
camp. At least, *I* wouldn't be comfortable there!
I don't refuse to use a linker. In your code you used:
extern WriteFile
import WriteFile kernel32.dll
call [WriteFile]
Did you never want to know what this exactly means? The assembler/linker somehow transfers this information from
the assembler source file into the executable output file. For example, how does the assembler/linker determine
the memory address which is used in the "call [WriteFile]"
instruction? Or how is the information "import WriteFile kernel32.dll"
stored in the exe file.
An interesting topic. What does it have to do with learning assembly language? Gideon asked for a simple console example. I only wish I could have provided something in a syntax for the tools he's using - not that I think they're particularly virtuous, but he shouldn't have to change tools to do what he wants. If he'd wanted a byte-by-byte rundown of the PE header, I suppose he would have asked for it...
To understand this, you can either write
your own assembler and linker or generate the binary manually byte
by byte.
If this is what you want to understand, yes. Or you could just read the spec... To *really* understand, you'd want to write your own loader, too, I suppose...
I used the second way, because it's much easier.
Agreed.
But
this is only for understanding and not producing an application.
For an application I most certainly would use a linker but also most
certainly would not use an assembler but a HLL compiler.
Has to be "all or nothing", eh?
That's the same with the graphics output in Linux using the X server. I want to
understand how it works. But if I had to write a graphics application
for Linux I most certainly would use one of the HL tool kits and
not open a unix domain socket to connect to the X server.
When you get down to it, it's an insane way to put pixels on the screen, whether you're doing it or the HL toolkit! But that's the way it works...
But even
if you use such a tool kit, I think it is useful to know, that an
image has to be transferred in 16 kbyte pieces with socket send
commands to the video ram.
Agreed. Almost reminds me of bank-switching. (and like bank-switching. you can probably arrange your screen updates to execute more efficiently if you know how it works)
In contrast, the PE header is just a block of data the loader uses. Not much we can do with it. I'll let the linker worry about that, and save my dwindling brain-cells for what comes *after* "_start"!
Best,
Frank
.
- Follow-Ups:
- Re: C# programmer wants to learn assembly?? plz help
- From: Herbert Kleebauer
- Re: C# programmer wants to learn assembly?? plz help
- References:
- C# programmer wants to learn assembly?? plz help
- From: giddy
- Re: C# programmer wants to learn assembly?? plz help
- From: Frank Kotler
- Re: C# programmer wants to learn assembly?? plz help
- From: //\\\\o//\\\\annabee
- Re: C# programmer wants to learn assembly?? plz help
- From: Herbert Kleebauer
- Re: C# programmer wants to learn assembly?? plz help
- From: Frank Kotler
- Re: C# programmer wants to learn assembly?? plz help
- From: Herbert Kleebauer
- C# programmer wants to learn assembly?? plz help
- Prev by Date: Re: C# programmer wants to learn assembly?? plz help
- Next by Date: Re: X without libraries... still...
- Previous by thread: Re: C# programmer wants to learn assembly?? plz help
- Next by thread: Re: C# programmer wants to learn assembly?? plz help
- Index(es):
Relevant Pages
|