Hi everyone, I'm just starting out on the long road of learning asm :( and i have question, basically i was wondering do you all code pure asm here or just use asm to optimise c/delphi code. Thanks!
Posted on 2003-09-19 15:46:18 by kaeru
Hi kaeru!

...and welcome :)

About your question... it depends... here you'll find a lot of different people.

From someone coding pure assembler to someone interacting between Visual Basic and ASM (just have a look to the COM forum).

Personally I use assembler to create small tools or Windows services, without interaction with other languages.

But this is just me...
Posted on 2003-09-19 16:11:36 by Cip
Many people here code complete, standalone programs in asm. There are also several commercial programs, completely written in asm.
The road of learning asm is , IMO, shorter and more understandable than C++ . It was after I learnt asm (in a relatively good degree) that I could comprehend the true nature of C++. Anyway, I was first an electronics engineer, so different rules maybe apply to me :)
But once you've gotten into asm, and you've got some good template proggies/libs to make development easier, I doubt you'll ever think to switch to another language.
Posted on 2003-09-19 19:55:58 by Ultrano
Welcome kaeru,
Yes. I think the forum is pure-asm oriented.
And im my hobby-time i'm pure asm coder, like the most of all i think.

What is good of pure asm is that all other things you do inside is your pure asm code, not a compiler code.
B7
Posted on 2003-09-20 06:45:52 by Bit7
pure assembly = for fun.

Otherwise, I use it "where needed" - to do special stuff, or to gain some additional speed when the compiler doesn't do a good enough job. I regard coding full-asm applications as a waste of time, but that's just a personal preference. Do what you think is best/fun (and do learn a HLL if you want to get a programming job.)
Posted on 2003-09-21 05:52:34 by f0dder
I enjoy the fact i dont need to buy a 500$ IDE just to make a program and sell it. Im not big business, and i dont code for one, so programming solely in ASM is prefect for me.

:NaN:
Posted on 2003-09-21 22:19:14 by NaN
While i was reading the C++ books and all the stuff you have to do for Visual C++ and its ID just for one API compaired to the speed i can do it in asm seems a waste of time... but thats just me..
Posted on 2003-09-21 22:28:54 by devilsclaw
devilsclaw, it's not just you ;) I hate all those conversions, where the compiler thinks dword isn't dword, and on each line of your code you have to teach it again and again. lol
I love masm for another thing - macros. I have already defined several common-used by me macros, so I can make this code:
start:
OnErrorGoTo some_eror
msgbox "hello world"
malloc 100
free eax
ClearError some_error

woah :eek: I see easy-to-understand VB/C code, that compiles to the fastest similar code possible (if we forget about "sub esp,100" :grin: )
:alright:
Posted on 2003-09-22 04:25:18 by Ultrano
NaN, if you really don't like paying for your tools, you can download sort of okay quality products like GCC (mingw32 with the dev-c++ IDE) for free. The GNU C++ compiler produces okay code these days - and you're still free to use assembly for the hotspots (like one would do anyway).

As for type conversions, that's mainly a windows GUI issue - the API is pretty poorly laid out. This can be encapsulated, though... and in real projects, most of your code will not be dealing with the API anyway.

So it all comes down to what you use your tools for, what you need. And if you decide to do any commercial programming, be a bit careful using the "free" version of masm.

Btw, as for macros - C compilers (and most other modern languages) have inline functions. Pretty neat thing about those is that register allocation is handled automatically.

But again - it's mostly personal preference. If you code fast with asm, or enjoy it - fine. I enjoy coding in high-level languages and focus on hotspots and "weird code" with assembly.
Posted on 2003-09-22 08:40:54 by f0dder
Thanks for all the reply's im glad this board is filled with helpfull people! I think I'm going to try and code pure asm at the moment... I must say that after learning it a little more,I think it's a totally awesome language unlike anything i've seen. When I get good enough it will be my language of choice. :grin:
Posted on 2003-09-22 18:03:30 by kaeru
Well, I've been a programmer going on 35 years now, and assembly is my favorite language, by far. I can't count the number of languages that I've "played with" over the years. Some consider me an expert in Cobol, but show me a Perl script, and I'll need the book and lots of time to figure it out. :)

I consider myself an expert at mainframe (IBM System-360/370/390) asm, an almost expert (considering this crowd) in x86 asm, and spent several years with 6502 asm. With experience, you can, usually, write the fastest and smallest programs in assembly language. And with experience, you will be able to develop code fairly quickly, especially once "you've seen that before" and have a "library" of code to start with.

But the one thing that few mention is the fact that asm gives you complete control over everything that a specific CPU can do. You really are talking at the "hardware" level, where you have absolute control over every instruction that the machine is capable of executing, without the assumptions of a compiler.

I'll let you decide how important that is.

:)
Posted on 2003-09-22 19:49:19 by S/390
What is delphi anyway?:grin:
Posted on 2003-09-22 20:51:41 by drhowarddrfine
delphi = object pascal with a (very) rapid frontend designer and a comprehensive runtime library. Too bad it generates such sloppy code, and that it's modularity/granularity isn't fine-grained enough... and that so many fools link the VCL statically instead of redistributing it.
Posted on 2003-09-23 03:13:13 by f0dder