They're not too rare for me (edit: I mean the things f0dder mentioned)... but I don't touch or try to remember 16-bit asm when coding 32-bit apps! I watch the opcode sizes, generated procedure code alignment (after some "align 16" statement) - to make alignment of internal nested loops not need to generate nops or dummy instructions (just to squeeze some more micro-ops). All done with 32-bit asm'er and disasm'er... need I explain in even more detail XD ? Any thoughts of 16-bit asm while doing that are parasitic :)  .

(edit) vid, your "tricky" example looks like  "printh offset MyLabel" in Win32 code with VKDebug or OA32DebugCenter... (/edit)
Posted on 2006-10-05 07:58:20 by Ultrano

OMG! did i just hear donkey speak out AGAINST asm!
I am both shocked and amazed!  :lol:

Hi Nice Eddie,

I like programming in assembly and since I don't do it for a living (or even work in IT at all) I can go at my own pace, not bothered by deadlines, readability or even maintainability. This is not the case in the production code world where these 3 factors are sometimes more important than the end product, in that world assembly has little place outside of a small niche for things like optimization (rarely) and low level bios programming. It is one thing to like the language and another to delude yourself into thinking it is bigger than it really is. Still, it does help in learning some aspects of Windows and machine structure that would otherwise be missed and to that end it is still worth learning but don't expect to find a job using it.

Posted on 2006-10-05 08:48:18 by donkey
Yes Brain, but where are we going to find a length of rubber hose and a spur-winged goose at this hour?
Posted on 2006-10-05 09:30:49 by Homer
My reply businesswise:
For the gaming industry, more than ever, because of all the new gaming consoles.
Special expertise in assembly on those platforms is worth a huge lot.
For X86: Nowadays, DSP is the only field I can think of where assembly makes a huge difference.

My other reply:
Well... Hacking of course! :-D
Posted on 2006-10-10 16:00:55 by zer0page

My other reply:
Well... Hacking of course! :-D

Of course meant in the cheery "write code for fun and fame" way, not anything illegal ^_^
Posted on 2006-10-10 16:46:49 by f0dder
for example when you are doing tricky things like this:
db MyLabel and 0Fh
, like when you want to display address of label.

Yes, these are rare, but not rare enough.

#include <stdio.h>

void my_function ( void );
int another_function ( int );

int main ( void ) {
unsigned long fptr[] = { ( unsigned long ) &my_function, ( unsigned long ) &another_function };
printf ( "my_function = %ld\nanother_function = %ld\n0Fh = %ld", fptr[0], fptr[1] );
return ( 0 );

void my_function ( void ) {
printf ( "my_function\n" );

int another_function ( int x ) {
return ( x );

You really don't need assembly for things like that...
Posted on 2006-10-10 20:57:27 by Synfire
synfire: i was talking about something completely different. I said you may need instruction encoding to udnerstand why sometimes you can use relocated symbol and sometimes not.
Posted on 2006-10-11 03:23:25 by vid
I've seen way too many times C++ coders spend days or weeks to figure-out a bug (or more correctly put, why their code can't do something). Also, C++ "virtual" and normal class-methods... even though they can get the hang of it, it almost always stays like "magic" or compiler-intelligence for them. Then again, pointers is the first place to stumble for them - and their way around it is to end up with assumptions of their own.
Due to such ignorance, most HLL coders are like walking blind-folded (they rarely know what hit them when a bug comes out). And with that blindfold, they don't (can't) choose straight-forward solutions in their code. I've chucked enough at people that (metaphorically speaking) take a bus, then railway, then airplane, and finally a taxi - to reach the sidewalk just accross the street.

ASM removes that blindfold. You can safely return to HLLs after you've mastered asm, as you'll no longer think of "compiler magic" or make funny assumptions.
Posted on 2006-10-12 07:54:11 by Ultrano
Ultrano: that sounds like some very inexperienced C++ programmers to me - like some who have just stepped up from Visual Basic :)

But it's a sure thing that knowing assembly is a valuable asset. It's nice being able to get the speed you need, to have a good idea of what will work and what won't, and the ability to look at machine code for certain debugging scenarios.

(I learned x86 assembly, 16 and 32bit, before learning C/C++, btw.)
Posted on 2006-10-12 08:00:47 by f0dder
Yes, those people either stepped up from VB or Pascal... but in most cases (that I've seen first-hand) C++ is people's first coding experience. Though, lately newbie coders seem to start with scripting languages (like I did). One thing is sure - almost no-one anymore starts from asm like you did. Old and slow consoles with little RAM and MHz, coupled with horrible compilers - those days were over before I started coding, and DSP speed was my only reason even to think about asm at that time.
Thus, for way too many people there's the blindfold, which thickens with the complexity of the projects they take on.

But fortunately, mobile devices like PSP, NDS, PalmOS and PPC are putting lots of weight on asm (and my second job :> ) . There's no hope of improving cpu speed because of the battery.
Posted on 2006-10-12 08:52:06 by Ultrano
I stepped up from pascal when it became too limiting for me ;) (first because of only 16bit support (this was ages ago), then because of more confined syntax).

So... pascal->asm->c->C++, and now meddling with python, perl, lua every now on then, on a very limited basis though :(

I think the real problem is that there's too many people trying to do comp.sci. that, frankly, shouldn't.

I'd love to work with ARM, or perhaps it's intel derivative used by windows mobile... platforms where I expect you can really feel the advantage of assembly :)
Posted on 2006-10-12 09:34:13 by f0dder