BI8051.TXT

Beschreibung zum CALM-Assembler fr 8044, 8051/52, 80512/5, 80C252/452

Gewhlte Adressierung
   Da die relative Adressierung limitiert ist, wird nur dort, wo es
mglich ist, vom CALM-Assembler die relative Adressierung eingesetzt.
Ansonsten wird die absolute Adressierung verwendet. Die Adressierung
innerhalb eines 2 KByte Blockes muss explizit mit "!" angegeben werden.

Automatische Optimisierung des Befehlscodes
   Die Codeoptimisierungsmglichkeiten fr Sprungbefehle sind:

    JUMP    R8^Adresse  [ 2 Bytes ]
    JUMP    16^Adresse  [ 3 Bytes ]

Der CALM-Assembler whlt den ersten Fall, wenn die Adresse im ersten
Durchlauf bekannt und innerhalb der Grenzen einer relativen 8-Bit-
Adressierung liegt.
   Operanden mit dem Register A und dem Bit C haben krzere Befehlcodes
als mit anderen Registern. Bit C ist mit F:#7 identisch, fhrt aber
je nach Adressierungsschreibweise zu unterschiedlichen Befehlcodes:

    CLRC                [ 1 Byte ]
    CLR     F:#7        [ 2 Bytes ]

Bemerkungen
   Die Namen der Register und Bedingungsbits lassen nicht auf die
entsprechende Datenlnge schliessen. 16-Bit-Register sind PC und DP.
1-Bit-Register (Bedingungsbits) sind C, H, F0, RS1, RS0 und V. Alle
anderen Register sind 8 Bit breit. Einige Register sind nur "Kopien"
der tatschlichen Daten (z.B. P0..P3). Beachten Sie die Hersteller-
dokumentation.
   Fr eine CALM-Schreibweise existieren mehrere, funktionell 100%
identische Befehlscodes (insbesondere mit Register A und Bit C). Der CALM
Assembler whlt einen davon. Die anderen knnen nicht generiert werden.
   Das Modul I8051.PRO lsst sich mit   .PROCSET Auswahl   umschalten,
wobei fr Auswahl I8044, I8051, I8052, S80512, S80515, I83C252 oder I83C452
eingesetzt werden kann.
   Der "Special Function Register"-Adressraum kann auch direkt adressiert
werden, z.B. fr die Byteadressierung mit   MOVE SFR^128..255,A   und fr die
Bitadressierung mit   NOT SFR^128..248:#0..7   (128..248: Vielfaches von 8).
Beispiel:   MOVE SFR^16'F0,A   ist identisch mit   MOVE B,A   .
   Mit .PROCSET BLOCK2K whlt der Assembler (falls mglich) die 2K-Adressierung
fr JUMP/CALL. Vorgabe: NOBLOCK2K.

Unterschiede zum Herstellerassembler
   Die unterschiedlichen Bezeichnungen der Operationscodes sind in den
Befehlslisten angegeben.
   Schreibweise        CALM                   Intel
   der                 #Wert                  #Wert
   Adressierung:       Adresse                Adresse
                       {Register}             @Register

   Pseudobefehle:      .ASCII                 DB ' '
                       .END                   END
                       .ENDIF                 ENDIF
                       .IF                    IF
                       .LOC                   ORG
                       .8, .16                DB, DW

Description du 8044, 8051/52, 80512/5, 80C252/452 pour l'assembleur CALM

Adressage choisi
   Puisque l'adressage relatif est limit, l'assembleur choisit l'adressage
relatif partout o c'est possible. Sinon, l'adressage absolu est choisi.
L'adressage  l'intrieur d'un bloc de 2 Koctets doit tre explicitement
indiqu par "!".

Optimisation automatique du code machine
   Pour les instructions de saut, les optimisations possibles sont:

    JUMP    R8^adresse  [ 2 octets ]
    JUMP    16^adresse  [ 3 octets ]

L'assembleur CALM choisit le premier cas si l'adresse est connue  la
premire passe et est  l'intrieur des limites d'un adressage
relatif 8 bits.
   Les oprandes avec le registre A et le bit C ont des codes machine plus
court qu'avec les autres registres. Bit C est identique  F:#7, mais
des codes machine diffrents sont gnrs selon la notation d'adressage:

    CLRC                [ 1 octet ]
    CLR     F:#7        [ 2 octets ]

Remarques
   Les noms des registres et des indicateurs ne donnent aucune information
concernat la taille de donnes correspondante. PC et DP sont des registres
16 bits. C, H, F0, RS1, RS0 et V sont des registres 1 bit (indicateurs). Tous
les autres registres ont une taille de 8 bits. Quelques registres ne sont que
des "copies" des vraies donnes (p.ex. P0..P3). Rfrez-vous  la
documentation du fabricant.
   Plusieurs codes machine, fonctionnellement 100% identiques, ont qu'une
notation CALM (particulirement ceux avec le registre A et le bit C).
L'assembleur CALM choisit un. On ne peut pas gnrer les autres.
   Le module I8051.PRO est commutable par   .PROCSET slection   , o
slection peut tre I8044, I8051, I8052, S80512, S80515, I83C252 ou I83C452.
   L'espace d'adressage des "Special Function Register" est galement adressable
directement, p.ex. pour l'adressage de byte par   MOVE SFR^128..255,A   et pour
l'adressage de bit par   NOT SFR^128..248:#0..7   (128..248: multiple de 8).
Exemple:   MOVE SFR^16'F0,A   est quivalent    MOVE B,A   .
   Par .PROCSET BLOCK2K, l'assembleur choisit (si possible) l'adressage 2K
pour JUMP/CALL. Par dfaut: NOBLOCK2K.

Diffrences par rapport  l'assembleur du fabricant
   Les diffrents noms des codes opratoires sont indiqus dans la
carte de rfrence.
   notation de         CALM                   Intel
   l'adressage:        #valeur                #valeur
                       adresse                adresse
                       {registre}             @registre

   pseudo-             .ASCII                 DB ' '
   instructions:       .END                   END
                       .ENDIF                 ENDIF
                       .IF                    IF
                       .LOC                   ORG
                       .8, .16                DB, DW

CALM assembler description for the 8044, 8051/52, 80512/5, 80C252/452

Chosen addressing mode
   As the relative addressing is limited in size, the CALM assembler
can not choose always the relative addressing mode. Normally, the
absolute addressing mode is coded. The addressing within a 2 KByte
block must be explicitly specified by a "!".

Automatic optimisation of the instruction code
   There exist code optimisation possibilities for jump instructions:

    JUMP    R8^address  [ 2 bytes ]
    JUMP    16^address  [ 3 bytes ]

The CALM assembler chooses the first case, when the address is known in the
first pass and within the limits of the relative 8 bit addressing mode.
   Operands with the register A and the bit C have shorter instruction codes
than the other registers. Bit C is identical with F:#7, but does not produce
always the same instruction code (depending on the addressing notation):

    CLRC                [ 1 byte ]
    CLR     F:#7        [ 2 bytes ]

Remarks
   There exist no relations between the name of the registers and the
condition bits and their data lengths. PC and DP are 16 bit registers.
1 bit registers (condition bits) are C, H, F0, RS1, RS0 and V. All
other registers are 8 bit wide. Some registers are only "copies" of
the real data (i.e. P0..P3). Please refer to the producer documentation.
   In some cases, there exist one CALM notation for several, functionally
100% identical instruction codes (especially with the register A and bit C).
The CALM assembler chooses one of them. There is no possibility to generate
the others.
   The module I8051.PRO is switchable by   .PROCSET selection   , where
selection may be I8044, I8051, I8052, S80512, S80515, I83C252 or I83C452.
   The "Special Function Register" address space is also directly addressable,
e.g. for the byte addressing with   MOVE SFR^128..255,A   and for the bit
addressing with   NOT SFR^128..248:#0..7   (128..248: multiple of 8).
Example:   MOVE SFR^16'F0,A   is equivalent to   MOVE B,A   .
   With .PROCSET BLOCK2K the assembler chooses (if possible) the 2K addressing
mode for JUMP/CALL. Default: NOBLOCK2K.

Differences to the producer assembler
   The different notations of the operation codes are given in the CALM
reference card.
   notation of         CALM                   Intel
   the addressing      #value                 #value
   mode:               address                address
                       {register}             @register

   pseudo-             .ASCII                 DB ' '
   instructions:       .END                   END
                       .ENDIF                 ENDIF
                       .IF                    IF
                       .LOC                   ORG
                       .8, .16                DB, DW
