Re: Windows Assembly
- From: Philip Smith <spamandviruses@xxxxxxx>
- Date: Tue, 13 Sep 2005 04:39:36 GMT
The processor doesn't really care how the operands are ordered, a direction flag can be set to accept either approach.
I'm afraid that direction flag doesn't do what you think it does.
When you say "real assembler" I suppose you don't consider AS a real assembler as it's native AT&T style syntax is src, dest.
No, what I don't consider a real assembler is a thing like HLA which simply dumps out MASM source. That's a preprocessor, not an assembler.
It's a good thing you don't have to program assembly for other CPU's. Some of them also use src/dst.
CPUs aren't either way. It's entirely the assembly language that decides that sort of thing.
It all boils down to what syntax you are used to using, which ultimately becomes your prefered syntax.
And that's what I'm talking about.
If someone gets a job programming in assembly language, it'll probably be with MASM, or maybe with TASM. What are the odds that it'll be with something that's "src, dest"? It's what, GAS and HLA vs. every single other x86 assembler?
So why not teach the students the "conventional" operand order and allow that to become their preferred syntax, rather than allow them to spend an entire course becoming used to the opposite simply because it was easier that way for them on their first day?
This shouldn't even be debatable. One of two things are true here:
1. learning "dest, src" is difficult 2. learning "dest, src" is easy
If #1 is true, then you have to teach them "dest, src" otherwise you're not giving them a complete education.
If #2 is true, then there's no reason not to teach them "dest, src" and so all that teaching them "src, dest" could possibly do is confuse them when they go to use one of the more common assemblers.
There just isn't any room for a good reason not to teach "dest, src". .
- Follow-Ups:
- Re: Windows Assembly
- From: sevagK
- Re: Windows Assembly
- References:
- Windows Assembly
- From: Richard Cooper
- Re: Windows Assembly
- From: Frank Kotler
- Re: Windows Assembly
- From: Richard Cooper
- Re: Windows Assembly
- From: sevagK
- Windows Assembly
- Prev by Date: Re: Windows Assembly
- Next by Date: Re: WaitForSingleObjectEx() is broken
- Previous by thread: Re: Windows Assembly
- Next by thread: Re: Windows Assembly
- Index(es):
Relevant Pages
|
Loading