Re: when to use proc
From: The Half A Wannabee (ShakainZulu_at_hotmail.com)
Date: 11/05/03
- Next message: hutch--: "Re: Review of Art of Assembly Language"
- Previous message: The Half A Wannabee: "Re: when to use proc"
- In reply to: Randall Hyde: "Re: when to use proc"
- Next in thread: mchiper: "Re: when to use proc"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 5 Nov 2003 10:09:28 +0100
"Randall Hyde" <randyhyde@earthlink.net> wrote in message
news:PD_pb.230$Z25.164@newsread4.news.pas.earthlink.net...
>
> "The Half A Wannabee" <ShakainZulu@hotmail.com> wrote in message
news:3fa86d38$1@news.broadpark.no...
> >
> > But I read about it in the manual on the first two hours.
>
> And you don't read about such things in the MASM manual or
> the Art of Assembly?
Oh its you again ? This was not an attack, not on the person I replied to,
and not on you or on your HLA.
I thought you wore tired of me ? Let me be more spesific.
I have got nothing againts HLA. Unlike Rene. I have no problem at all with
it. I dont know it. Even if I did I might like it. I dont know.
About the only code I ever saw from HLA was "mov (sourceregister,
destinationregister)". A bit confusing, since I learned it the other way
around. But I am sure you have your well defined reasons for doing so.
(Thats not giong to ensure that everyone likes it, even if theese reasons
are well founded). Pluss the bits you posted in a thread some time not so
long ago. I thought it looked terribly difficult. But thats me. I am a
beginner, so I cannot imidiatly have my brain wrapped around functions in
functions in functions in parantesis and espesially not in asm. My head just
tilted. I am stupid, so be it. So I made some smart remarks about it. Sorry.
The AoA is a great book. I have read it before, parts of it, and I will
surely be reading it again. Wonderful work the parts I read. The history
part was espesially joyful to read, with lots of info I never seen
elsewhere. Enjoyable. The parts about dos interrupts etc that I read in
there explained lots of stuff I only which I knew about many years before,
when I used Norton commander on a 286. But its perhaps removed from the
later work ? I have so many things on my shedule. But I will get around to
it, once I get tired from hanging out talking in this forums, and exploring
the internet with my 2mbit only a month old new toy. I am doing a catchup
from 5 years of only part time internet connection. I am a hungry usenet
junkie. I got to get myself some starting kicks first.
>
> How about from Chapter One of AoA, before an IF statement is ever
> mentioned:
> "Before discussing these high level control structures, it's important to
> point out that these are not real 80x86 assembly language statements.
> HLA compiles these statements into a sequence of one or more real
> assembly language statements for you. Later in this text, you'll learn
> how HLA compiles the statements and you'll learn how to write pure
> assembly language code that doesn't use them. However, you'll need
> to learn many new concepts before you get to that point, so we'll stick
> with these high level language statements for now since you're probably
> already familiar with statements like these from your exposure to high
> level languages. "
Yes. Bottom down. Its works as well only much slower (for me). I am an
example to the proof of that.
Now I am not sure I got energy left in me to learn the real stuff.
>
> If, as Rene claims, people go a year without understanding that statements
> like "IF" are not real assembly language statements, then their problem is
> that they didn't bother to read the very *first* chapter of AoA.
> > I was writing my
> > first assembler only app after reading the documentation.
>
> Well, you are an assembly God, right up there with Rene.
> You should be very proud of yourself. Most people are not capable
> of writing assembly "apps" within a few hours of reading the
> assembler documentation. Of course, it depends on what you call
> an "app", I suppose. Care to post the code for all to see?
>
I dont really KNOW Spasm/RosAsm either. I only gave my impressions of it.
And from a asm beginners standpoint it made sense to me.
Thats about all I tried to say. In too many words perhaps. But that was it.
I looked at the source code, amoung the things I looked at was the
implementation of the memory allocations, back then allmost two, maybe 3
years ago(?). I found a small bug in the ask macro. It has since then been
corrected. Totally rewritten the last time I (peeked would be more
accurate). Spasm is still in development (RosAsm) and its not completed
yet(LTIC). My simple program tested for the bug by allocating a huge amount
of memory in the initialization code, and free it in the
OnRightMouseButtonClick (to speak Delphi). Not much of a program, true. This
I did to test if the memory wore freed correctly by code while the app was
running, and not only freed on exit (by the OS itself). As far as my test
went, it seemed to me to be a bug. Which is not a big thing, after all in a
huge work like that its rare to find that all code is bugfree by the hands
of one single man. totally forgivable. And its has since then been
rewritten. My point is, it was not even hard to find this bug, cause the
code is absolutely readable, even for a beginner in assembly.
> > I read the SpasmHelp file and Iczellion tutorials. 2 - 3 hours. And
after
> > that I was ready to program a simple window app.
>
> Heck, I was *ready* to write a Windows app *before* reading the
> tutorials. But being ready and and being able to write decent apps
> are two different things. Now if you're claiming you were actually
> *writing* Windows apps after reading SpAsm and Iczelion's
> documentation for 2-3 hours, then you are *truly* an assembly God.
No I am not. But remember I come from windows programming for 10 years. The
transition to Spasm was easy since the API I allready know a little about.
> After writing three books on the subject and having 20 years'
> programming experience, I must admit that it took me a bit more
> than 2-3 hours study before I was writing anything I'd be willing
> to call a Windows app (on my own, as opposed to hacking up
> an existing program).
>
That was in fact what I did. A window messageloop I have written so many
times, that I didnt need the exercise, and the spasm messageloop make much
more sense then C code doing the same thing. I would say about 10 times as
much sense.
>
> > It was very exiting and
> > maybe a litle embarissment to me that it was really that easy.
>
> You are *truly* an assembly God.
> What you've got to realize is that the rest of the population simply
> doesn't have the genious qualities you seem to possess. For them,
> your approach just doesn't work too well.
>
I can tell you right now, that I am no assembler anything. I have (as stated
earlier) only been flirting with it on occations. It never got to be second
nature to me in any sence. I intend however to change things around a bit.
Since now spasm makes fulllblown application assembler writing that much
easier than I thought.
> > Heck Delphi code is sometimes more of a clutter to write than Spasm is.
>
> > And even after years you never really know what you are doing
> > (exactly). Tasm was a monster
> > in comparison to Spasm. It had (a) manual(s) that was increadably long,
and
> > the way it was written makes it boring, a pain really to read.
>
> Then again, when you needed to figure something out, it sure was nice to
> have those manuals.
Yes, perhaps. But they teach you a lot of keywords and ways to create
segments and stuff thats just boring to a beginner eager to get up and
running. Its surely (I suspect) lots of tools there for sesoned assembler
programmers working on huge projects, but for a beginner still having to
look up certain asm memonics, its just to much to take in all at once. The
Tasm manual I got from my brother, now allmost 10 years ago, had pages of
pages of references to material I didnt have a clue what ment. And that I
never saw again ever, either in Spasm or in Basm.
>
> > Whatever you
> > say about Spasm, its easy to get started with, and the code is easy to
> > understand. Also its all there. Putting related asm instructions on the
same
> > line is readable to a much higher extent than HLA code I have seen.
>
> ??????
> Putting multiple statements on a line is one of those *big* style
violations
> that most people learn *not* to do early in their programming careers.
> How long did you say you've been programming *professionally* in
> Delphi? (E.g., part of a team, where you code gets reviewed by other
> team members?). But if you really want to write such ugly code, what
> gave you the impression that HLA doesn't allow this?
FYI. I never been a professional. And I dont even like the word. But I have
the ability to look at my code from diffrent angles, so
in a certain (a bit wierd maybe) sense, I am a miniteam ;-)
Also when I delivered my first OP code to my pascal teacher, I could see he
was at a loss. When I asked him what
it was worth he told me it would be grade 1, which is the best grade they
have. Now in afterlight, I can see he was wrong.
The code I gave to him was nothing. I quit school later in the semester. I
needed to code. I needed to explore the topic myself.
I code because I love it, because it fits my profile. I am a geek. I
understand that I have to produse something, so that I can
carry my own weight, and that is why, if ever, I will become a
proffessional. Other than that it really carry no significans to me.
I worked alongside with professional IBM, database programmers in 96. Theese
people couldnt even configure or setup the PC they worked on.
But I am steering in all directions here. The Spasm style : Yes to me it
looks very good. push push call, push push call. Heck it even got rythm.
Like music. "And all that jazz".
>
> > Doesnt
> > seems like such a genious stunt, its so simple isnt it, but it works and
is
> > in fact a litle genious after all. Spasm is in itself a very strong
document
> > on assembly for a beginner, and some of the example code that follows it
is
> > brilliantly easy to follow.
>
> Except there are no tutorials for SpAsm available, just a disorganized
> "help" file written by a non-native English speaker; you can't even print
> the thing out and read it off-line. I'm happy you like it so much and it's
> great that *some* people out there really like this kind of documentation,
> but your experiences are hardly typical.
>
Well perhaps your right about that. Only reason I have needed to print out
documentaion was if it was really really hard to follow. Then I need to lie
on my tummy in bed or something and try to penetrate it. But Spasm
documentation is so easy to follow, I never saw a need for it. Besides,
doesnt it come as RTF also now, so you could actually print it if you wanted
to? And if you really wanted to print it you can just hit the print screen
key and load paint and then print it. Or you could hook the canvas with
GetDC and print it out from one of you own applications. Its not that it
cant be done.
>
> > Like the DirectX tuts. I do not much care about
> > what Betov says about C. They can take it. Its just humour I think. Just
> > like some of you excellent remarks in here earlier. And if you subract
the
> > faul language, it true in every sence. I care about what Spasm has
become
> > and for what it may become in the future. For a beginner it is very
good.
> > And thats the point. THAT IS THE POINT. To flood an assembler language
with
> > any or all the programming consepts available, is not good for
beginners. It
> > makes it look like a monsterous accomplishment to know it. You feel
beaten
> > before you ever get to start with it.
>
> ????
> Yes. I agree 100%. That's why AoA uses the concepts they already know.
> Things like IFs, WHILEs, and so on.
> "Leverage their existing knowledge" works very well for most people.
>
Maybe. For me it created an abstraction. A pillow to put my head on. This
pillow was soft and seemed good for a while.
But after some years I incremently understood that programming isnt as
simple as that. Theres is no RAD in programming in the field I like to
flurish. I understood slowly that I had to stop beeing lazy if I would ever
to get anywhere close to my goal, to understand more closely what was going
on, how to write fast code, how to create my own UI etc. Seems to me I would
have spent my energy better in studying the
hard stuff from the beginning, then It wouldnt have been so hard for me to
do it now. then I would use my younger energy to learn assembler
and I could lay my head on a pillow I knew all about in my "older" age.
>
> > The only reason I put Spasm on hold, is that I have yet not completed my
> > other work in Delphi. I want it OK and completed after a plan. Then I
will
> > not use Delphi anymore, but either Spasm or some other tool that will
force
> > me to think in assembler. Looks to me sofar that Spasm is my best
choice.
> > Cause I WANT to do it all by myself. I dont want to have to be forced to
do
> > it like every other people. I can spot most Delphi apps from how they
look.
> > I see a program and I know, that one is borland RAD product. Delphi has
its
> > good sides, but it is also a language that has no focus. It spread
itself
> > between BASM, Generic window application programming, Point and click
RAD
> > programming, and COM programming. Its very capable, but also a monster.
> > Spasm is a spesific assembler. More to the point. It teaches assembler.
Just
> > as is its purpose. Not to be the most capable or flooded with features
> > language there is. The programmer can create thoose features himself if
he
> > needs them. As shown with clear simplistic and excellent examples. I
think
> > at least the philosofy as written in the manuals are true to the task at
> > hand, learning assembly for a beginner.
>
> Well, I'm looking forward to all the great Delphi and SpAsm applications
> you're going to produce for us. I think it's wonderful that the world now
> has another certified "assembly God" who will be cranking out killer
applications
> using assembly language.
>
Hmm. I guess I must have offended you before. It wasnt really my intention.
Maybe I come out to strong ?
You seem angry. I am not. I am having a great time. Maybe its the language.
I am norwegian.
> I must admit though, your posts sound more like troll-bait and it will be
> interesting to see if you ever really *will* produce anything with
RosAsm/SpAsm.
> You would gain a lot more credibility, quite frankly, if you were to list
the
> serious Delphi applications you've created and discuss how you're going to
> write such apps in assembly. No offense, but the boasts you're making are
> quite empty; you've provided no backing for them whatsoever at all.
> You spout the same nonsense that Rene does; Rene, however, has actually
> written a *real* application, can you make the same claim?
> Cheers,
> Randy Hyde
I am working on it as we speak Randy. My page will be uploaded in the next
two to three months and I am NO,
absolutely no genious or anything near as knowledgeable as you. It will be
available with 130K lines of soucecode for
a GDI/DirectX Skin/Game/RAD tool library. Thats my lastest work. When the
page is ready. 02.2003, ask me again.
- Next message: hutch--: "Re: Review of Art of Assembly Language"
- Previous message: The Half A Wannabee: "Re: when to use proc"
- In reply to: Randall Hyde: "Re: when to use proc"
- Next in thread: mchiper: "Re: when to use proc"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]