Re: newbe about API
From: GodSmack (WAHT?)
Date: 03/29/04
- Next message: Beth: "Re: Hey Mr. Hyde!"
- Previous message: Ro : "NASM and push byte, ret; ret 4; ret 16"
- In reply to: Herbert Kleebauer: "Re: newbe about API"
- Next in thread: Beth: "Re: newbe about API"
- Reply: Beth: "Re: newbe about API"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 29 Mar 2004 13:36:11 +0200
På Mon, 29 Mar 2004 12:03:28 +0200, skrev Herbert Kleebauer
<klee@unibwm.de>:
> The Half a Wannebee wrote:
>
> The program is based on mars.exe from Tim Clarke. mars.exe is
> speed optimized (it was written 10 years ago and worked well
> on a 486), the DOS version of erde.exe is size optimized (only
> 1 kbyte) and the Win32 version isn't optimized at all (just
> a 1:1 translation of the C version). For a description of the
> algorithm read:
>
> http://groups.google.com/groups?selm=2kvceb%24rjr%40tukki.cc.jyu.fi&output=gplain
Oki. Might just do that. Allthough I have a few suspisions allready
>
> The purpose of erde.exe is, to show that even a small program
> written in a HLL language is much easier to understand than a
> program written in assembler.
That my friend, depends on the assembler. The only thing that supposidly
makes HLL easier to "understand", is that they traditionally uses longer
qualifiers/names, and also that they can do more complex aritmetic
directly in code.(_) Apart from that, and even so, I'd say that HLL are
_not_ easier at all. Rather they make things _more_ hard to understand. If
you did something in asm, the liklyhood you understand what you did is
higher, than if you did the same thing in HLL. Yes that right. In a HLL
you can do something, and not understand what you have done. This is much
more difficult to do in asm. Point beeing : Asm makes it faster and easier
to understand.
> This is even true for the used,
> very clear and simple 68k assembler syntax, let alone code for
> MASM, TASM, NASM, SPASM, .... (Just look at the C source:
> ftp://137.193.64.130/pub/assembler/erde.zip ).
Maybe I will. Later when I am feeling better. Still ozzy.
> It also
> clearly shows, that a beginner always should start learning
> assembly using DOS and not Windows. You will exactly learn
> the same about programming the processor, but the OS overhead
> is much smaller.
I think we talk about diffrent things. The erde demo is a demo. Even if it
performs excellent and draws fast, it is doing very little. I have such a
software 3D engine in one of my applications About boxes, cause that was
the only place I could justify putting it. Programming dos, when you need
large databases and many complex things, like in a desktop application,
and not just a simle game engine, programming dos is a veritable
nightmare. At least back then when I gave it a shot. Also the overhead is
absolutely insignificant, when we talk about something more lengthy work
than a demo. In fact, the overhead for a dos program should be larger than
for a Win32 app, due to win32, flat memory organisation. Besides. Overhead
in win32 is not even a question. The way the win32 mm works, you can
allocate all memory of the whole machine, if you are not explisitly using
it, it will never be used either. If you say allocate, and USE 30 megs of
memory, and then minimize your app, all this memory is flushed to disk in
less then a second. When you maximize the app, the memory will only be put
back in ram, when read or written too, and only 2K at the time. This means
if you app displays only data from the first 2K, thats the only 2K that
will be brought back to ram when restored. Maybe the 2K is really 64K, but
still my point is, a little overhead has nothing whatsoever to mean in
win32 nowadays. And this makes programming it, far far easier than DOS,
where you have to account for every byte you use no ?
>
> The same as in real life: As fast as you run, the finish line always
> is a few miles away (see Bethtool or assembly rebirth).
That is good, because each time I "finnish" an app, I start to get bored.
"Today" I wrote an fully asm app, that searches my harddrives in
O(veryfast) time. Possible because the not searching part of the app was
written from before. My delphi app that does the same thing, is minutes
slower. This will become my first useful asm app in a few days or so. Some
testing an generalizing it to read map and shares as well, is neeeded,. It
will be finnished. I allways finnish. They key I use, is to work at
several apps at the same time. If I get bored, I continue with one of the
others. In this way, suddenly one day, I have 10, not one apps, that all
have learned from each others bugs. (They use same codebase). I think my
coding "philosophy" makes single programmer buisness possible. Allthough
maybe not just yet.....(okey, one point for you)
:-)
-- w/w/w.Opera.com
- Next message: Beth: "Re: Hey Mr. Hyde!"
- Previous message: Ro : "NASM and push byte, ret; ret 4; ret 16"
- In reply to: Herbert Kleebauer: "Re: newbe about API"
- Next in thread: Beth: "Re: newbe about API"
- Reply: Beth: "Re: newbe about API"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|