Re: newbe about API

From: GodSmack (WAHT?)
Date: 03/29/04


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


Relevant Pages

  • Re: How to set up a Linux machine that occupies the minimum memory footprint ?
    ... Of course, if you use 8GB of RAM, or more precisely if you ... Are you saying that if I have a 4GB RAM memory, ... Linux will somehow "know" that it doesn't have ... You've said in another message that your app is ...
    (comp.os.linux.setup)
  • Re: How to set up a Linux machine that occupies the minimum memory footprint ?
    ... Of course, if you use 8GB of RAM, or more precisely if you ... Are you saying that if I have a 4GB RAM memory, ... Linux will somehow "know" that it doesn't have ... You've said in another message that your app is ...
    (comp.os.linux.misc)
  • Re: need a thumbnail browser without memory limitations
    ... When you are working with media files, you need to decide how you are going to limit the memory requirements of your app. ... For display pictures, you can take approaches that limit the memory requirements such as minimal caching. ... lets say you need to load the next 10 thumbnails as the user scrolls. ...
    (microsoft.public.vb.general.discussion)
  • Re: Large text file - in memory ( > 60mb)
    ... The file is over 64mb in size, reading it line by line to do a search ... while running the app, it would mean reading/searching the>64mb file many ... Then I have to show this record found (wich ... maybe creating a datatable to ease the search but I'm pretty sure memory ...
    (microsoft.public.dotnet.framework)
  • Re: out of memory
    ... I have connections, and IO streams, ... it is possible to Manage to write your own custom Managed Memory ... >> Management and Garbage Collection is not to allow you more time to play ... you probably didn't put the app under any stress. ...
    (microsoft.public.dotnet.framework.aspnet)