Motorola M68CPU32BUG Manuale Utente Pagina 12

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 35
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 11
10
• Read Appendix 3 in its entirety.
• Generate the S-record file which is to be downloaded to the microcontroller board.
Part 1: Machine code generation
The assembly program for this experiment is in Appendix 1.
Generate the machine code that corresponds to this program into machine code in hexa-
decimal format.
Part 2: S-Record creation
Generate the S-record file for the machine code created in Part 1.
In order to generate the S-record file a thorough understanding of the S-record format is
needed. Refer to the Appendix 3 for the details of the S-record format.
The following example illustrates the steps for the generation of an S-record. Note that
the spaces between the numbers in the steps below are for readability and should not be
there in the actual S-record file.
Example program:
ORG $4000
MOVE.L #$1234,D0
MOVE.L D0,D1
Step 1: Generate the machine code in byte code format:
20 3C 00 00 12 34
22 00
Step 2: Break the code into blocks. For this example, 2 blocks will be used, even though
one would be sufficient.
Block 1: 20 3C 00 00 12 34
Block 2: 22 00
Step 3: Append to the left the starting address, or the address location where the blocks
will be stored. Address $4000 will be used to store this program as specified by the ORG
command in the code:
40 00 20 3C 00 00 12 23
40 06 22 00
Step 4: Count the character pairs (bytes) of each block in step 3. Add 1 to this number
and append the final result to the left of each block.
09 40 00 20 3C 00 00 12 34
05 40 06 22 00
Vedere la pagina 11
1 2 ... 7 8 9 10 11 12 13 14 15 16 17 ... 34 35

Commenti su questo manuale

Nessun commento