• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

Learning Assembly

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.

Quantum Clocker

Registered
Joined
Dec 20, 2002
Location
Maryland
Hey,
I'd like to get started writing windows applications with assembly; I already have experience with VB, C, and C++. Can anyone lead me in the right direction? Thanks...
 
If that is the same Art of Assembly book that I'm thinking of, they don't even use i386 assembly - they use their own instruction set.

Besides, you want to write Windows apps in assembly, right? That means you can already write in assembly, right?
 
You mean you want to write an entire Windows program in assembly, or write them in some other language but only write time-critical parts of the program in assembly? If you want to write the entire program in assembly, you can only write console apps because gui requires a high level language to interact with Windows API.
 
Ok, now we're getting somewhere. I obviously have some misconceptions...

Is there a tutorial or webpage or something that can lay it out in black and white for me?
 
If you want to write the entire program in assembly, you can only write console apps because gui requires a high level language to interact with Windows API.

No, he *could* use assembly... it would just be insanely laborious.
 
If that is the same Art of Assembly book that I'm thinking of, they don't even use i386 assembly - they use their own instruction set.

Besides, you want to write Windows apps in assembly, right? That means you can already write in assembly, right?

nah, I am talking about the 16 bit version, he unfortunately went to his own assembly called HLA in the book on 32bit programming, but the 16bit one is pure x86.

No, he *could* use assembly... it would just be insanely laborious.

for the most part, C++ and assembly initialization is almost the same as you have to use the same classes and functions, you just have to access them in the assembly way such as:

push 0...

...push szClassName

call CreateWindow
 
I wouldnt use that site too much, as it has alot of non-standard syntax... meaning it will be a pain in the rear to port it to another, more heavy duty, assembler.

edit: to clarify, those tutorials use alot of personal assembly and would be best to stay away from it, just like you should stay away from HLA.
 
well, the tutorial uses the guys function library, and you should never limit yourself to what someone else programmed in assembly(for example, he has functions such as putchar() already declared, you would do better to learn how to do them yourself).
 
what you want to learn depends on the hardware you want to program on or the program that emulates it.

why on earth you would want to learn this is beyond me. you deffinately have more geek in you than me.

i was forced to last semester and if you are interested in a watered down version of the intel architecture. go to http://www.cs.uiowa.edu/~jones/assem/ and knock yourself out, that'll give you the jist of what assem is about.

also what are you trying to accomplish by writing apps in assembly language? is it an understanding of what goes on in the hardware or just curiosity? because like someone mentioned, it gets to be pretty tetious.
 
Last edited:
why on earth you would want to learn this is beyond me. you deffinately have more geek in you than me.

optimization of heavily used code. for example, most compilers still make a big mess with SSE/2 optimizations, and put 20 lines of slow assembly instructions where 3 instructions would do(and see a 90% gain in performance :D).

also, its a nice language, if you ever wanted to have the power to do something in C++ but didnt want to use bloated code, just program up a library in assembly
 
You don't have to know the ins and outs of writing a whole win32 program in assembly to be able to rewrite one heavily-traveled portion of your program in asm.


if you ever wanted to have the power to do something in C++ but didnt want to use bloated code, just program up a library in assembly

Your code is going to be alot more bloated looking in assembly than in C.

A good algorithm in C will be better than a bad algorithm in asm.
 
Your code is going to be alot more bloated looking in assembly than in C.

I was talking about at the machine code level. For example, C++ happens to teach too many people bad habits with iterators such as for(...) and switch()/case statements. and OOP tends to lend itself to bloated code unless you are an great programmer with a thorough design before you start on the code.

A good algorithm in C will be better than a bad algorithm in asm.

I was talking about equal algorithms. there are some cases where assembly might actually be less lengthy to write than equiv C++ code, and once you use SSE/mmx/etc. optimizations in your code, you are probably going to find(unless you have a great compiler) that you HAVE to use assembly as most compilers are too stupid to do things efficiently with it.
 
Back