Next: int 10h AX = 4F00h
From: Herbert Kleebauer on 23 Jul 2005 15:43
> > Great logic. Let's use a bad design because we then at least
> > are compatible to the other bad designs! Why not use a superior
> > design so you are better than all this compatible bad designs?
> You're the one with flawed logic here. You say that the vendor's syntax
> is hard for you to work with. Fine, write a new language with syntax
> that doesn't offend you. But don't call it an AVR assembler. Saying
> it's an AVR assembler implies that it assembles AVR assembly language,
> the syntax of which was defined by Atmel.
You are mixing up terms here. The designer of a processor
architecture defines the machine language (i.e. which bit
pattern is which instruction). An assembler converts a textual
representation of processor instructions (assembly language)
to machine language. This means the syntax of an assembler
is defined by the writer of the assembler and not by the
designer of the processor. I don't know how many assemblers
for the AVR architecture exist, but the Atmel AVR assembler
is just one of them and in no way something special.
There are also many assemblers for the x86 architecture which
are all incompatible. Non of them is the "standard". Even if
Intel would write it's own assembler, they couldn't say, this
is the valid assembler syntax for x86 processors. All they
can define is the machine language but not the assembly
I suppose there is also a GCC port for AVR. Would you
also say that the generated GAS code (which I suppose
is in AT&T syntax) is not an AVR assembler code?
From: larwe on 23 Jul 2005 16:04
> You are mixing up terms here. The designer of a processor
> architecture defines the machine language (i.e. which bit
> pattern is which instruction). An assembler converts a textual
> representation of processor instructions (assembly language)
> to machine language. This means the syntax of an assembler
> is defined by the writer of the assembler
You will observe that the mnemonics and operand order are defined in
the datasheets provided by Atmel. I would call this a vendor definition
of the recommended assembly language, no?
> There are also many assemblers for the x86 architecture which
> are all incompatible. Non of them is the "standard". Even if
The differences between, say, TASM and MASM, mostly lie in the
pseudo-ops and special instructions that influence segment layout, etc.
These aren't part of the instruction set. Besides, weren't you the one
saying we shouldn't imitate silly designs? You just pointed out that
x86 assemblers are fragmented; why are you now trying to fragment the
AVR assembler market?
In practical terms, the specific point we're arguing about right now
really doesn't matter: the bottom line is that if it doesn't build code
out of manufacturers' app notes or from the millions of lines of
published sourcecode, it's not very useful.
From: Mochuelo on 23 Jul 2005 18:38
On Thu, 21 Jul 2005 19:47:04 +0200, Herbert Kleebauer <klee(a)unibwm.de>
>Have to write some AVR code and therefore have read the
>AVR Instruction Set manual and tried the assembler included
>in AVR studio. I think the used syntax is completely
I must then be some kind of a God, because I did the impossible,
according to your sentence above. I have been using AVR syntax for
almost two years now, with no problems. Yes, I may have liked better
other ones, but I had no problem using this one.
>so I decided to write my own assembler.
>first version can be downloaded from:
>Maybe there are some AVR experts who can give some suggestions
>for an improvement or are even willing to do some testing.
Well, good luck with that.
>The used syntax:
From: Mike Silva on 23 Jul 2005 19:53
Anton Erasmus wrote:
> If you really want to use a different assembler syntax, rather write
> software that translates your syntax into the manufacturer specified
And vice versa.
> Keeping all the symbols as symbols and not translating them to
> numbers. You then can use a standard assembler for the device to
> generate your executable.
Seems to me like the perfect solution to the (real or imagined) problem.
From: Richard H. on 23 Jul 2005 22:41
Herbert Kleebauer wrote:
> But how are AVR programs debugged at all?
Aside from the typical pin twiddling, etc. in hardware, the AVR
Assembler has a very good simulator. With it, you can develop and test
most of a project without a hardware platform, tweak the inputs in
bizarre ways, and see the effects on every register bit.
It's not a substitute for testing on the platform, but it gets through
the early stages and logic issues much faster with excellent visibility.