1.3 Computer Hardware Organization

We begin by familiarising ourselves with the computer hardware.

Figure 1.1 Internal block diagram of a CPU.

Figure 1.1 Internal block diagram of a CPU.

The function of the CPU is to fetch these instructions from memory and execute them. To perform the actions of fetch and execute, they use the following:

1.5 Memory System Operation

Every computing system has a memory map, which is a structure of data that indicates how memory is laid out. Every memory location has two components: contents and address.

Figure 1.2 9S12 Memory Map.

Figure 1.2 9S12 Memory Map.

The HCS12 has 64k bytes of memory space. This memory space has addresses $0000 to $FFFF, which are divided into four sections.

  1. Register: $0000 to $03FF
  2. EEPROM: $0800 to $0FFF
  3. RAM: $2000 to $3FFF
  4. Code ROM: $4000 to $FFFF

The important one to look at is the code ROM space, which is set aside for program space used for the program code. The RAM space is for data storage and the EEPROM is used mainly for storage of critical data.

1.8 The HCS12 CPU Registers