Re: To RISC or not to RISC
- From: Donkey <contact_nospam_donkey@xxxxxxxxxxx>
- Date: Tue, 31 Oct 2006 03:10:56 GMT
Herbert Kleebauer wrote:
Donkey wrote:
Sorry to state the obvious and something that you likely already know
but this is just another example of legacy in the x86. Accumulator
High/Low (AH/AL), Base High/Low (BH/BL), Counter High/Low (CH/CL) and
Data High/Low (DH/DL) Destination Index (DI), Source Index (SI), Stack
Pointer (SP) and Base Pointer (BP), prefix an E for 32 bit Extended.
That's not correct. Intel makes the hardware and for compatibility we
still have the same register set in modern x86 processors as in the
8086 (extended to 32 bit). But nowhere in the chip are the names AL,AH,AX...
engraved nor are the register addressed by this names (but by three bits in the
opcode). It's the writer of an assembler and not Intel who decides which
symbolic names to use for the registers (and for the instructions and operand
size). And I see
Of course it's correct, Intel decided on the naming convention long before the 8086 and in order to allow code level compatibility with legacy processors they kept the same naming convention through the switch to GP registers. That by the way is what legacy is all about. I most certainly know that EAX is not engraved in the chip, but then neither is MOV, why not change that to LOAD or some such ? After all nothing is being physically moved in the processor, just some electrons bouncing around.
1. the author of the assembler is a sadist who enjoys it see the user
of the assembler suffer
2. or the user of the assembler prefer to use this names (and the Intel
syntax in general). If the latter is the case, then there are also
two possible reasons:
- they want to show how smart the are, because they are able to read
and write such an unreadable collection of characters and they never
would use a clean and simple syntax and proper register names because
everybody could program in assembler then
- or they are masochist who enjoy it to suffer from such a syntax
This is not a question of syntax, it has only to do with mnemonic devices, syntax is an entirely different thing. Changing the word for CAR does not alter grammar in any way.
The only reason why even in currently developed assemblers this names are still used:
1: Because Intel determines the mnemonic devices we use and it prefers consistency over practicality or even readability for legacy purposes.
Donkey
.
- Follow-Ups:
- Re: To RISC or not to RISC
- From: Evenbit
- Re: To RISC or not to RISC
- References:
- To RISC or not to RISC
- From: KJH
- Re: To RISC or not to RISC
- From: Herbert Kleebauer
- Re: To RISC or not to RISC
- From: Donkey
- Re: To RISC or not to RISC
- From: Herbert Kleebauer
- To RISC or not to RISC
- Prev by Date: Re: HLA and embedded controllers
- Next by Date: Improving one's algorithm
- Previous by thread: Re: To RISC or not to RISC
- Next by thread: Re: To RISC or not to RISC
- Index(es):
Relevant Pages
|