MC9RS08KA1 FREESCALE [Freescale Semiconductor, Inc], MC9RS08KA1 Datasheet - Page 61

no-image

MC9RS08KA1

Manufacturer Part Number
MC9RS08KA1
Description
RS08 Microcontrollers
Manufacturer
FREESCALE [Freescale Semiconductor, Inc]
Datasheets

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Company:
Part Number:
MC9RS08KA1CDB
Quantity:
12 306
Part Number:
MC9RS08KA1CPC
Manufacturer:
FREESCALE
Quantity:
20 000
Part Number:
MC9RS08KA1CSC
Manufacturer:
TI
Quantity:
213
Part Number:
MC9RS08KA1CSC
Manufacturer:
FREESCALE
Quantity:
20 000
Part Number:
MC9RS08KA1CSC
0
Company:
Part Number:
MC9RS08KA1CSCR
Quantity:
2 439
8.2.7
This 8-bit page select register allows the user to access all memory locations in the entire
16K-byte address space through a page window located from $00C0 to $00FF. This register
resides at the memory mapped location $001F. For details on the PAGESEL register, please refer to
the RS08 Core Reference Manual.
8.3
Whenever the MCU reads information from memory or writes information into memory, an addressing
mode is used to determine the exact address where the information is read from or written to. This section
explains several addressing modes and how each is useful in different programming situations.
Every opcode tells the CPU to perform a certain operation in a certain way. Many instructions, such as load
accumulator (LDA), allow several different ways to specify the memory location to be operated on, and
each addressing mode variation requires a separate opcode. All of these variations use the same instruction
mnemonic, and the assembler knows which opcode to use based on the syntax and location of the operand
field. In some cases, special characters are used to indicate a specific addressing mode (such as the #
[pound] symbol, which indicates immediate addressing mode). In other cases, the value of the operand
tells the assembler which addressing mode to use. For example, the assembler chooses short addressing
mode instead of direct addressing mode if the operand address is from $0000 to $001F. Besides allowing
the assembler to choose the addressing mode based on the operand address, assembler directives can also
be used to force direct or tiny/short addressing mode by using the “>” or “<” prefix before the operand,
respectively.
Some instructions use more than one addressing mode. For example, the move instructions use one
addressing mode to access the source value from memory and a second addressing mode to access the
destination memory location. For these move instructions, both addressing modes are listed in the
documentation. All branch instructions use relative (REL) addressing mode to determine the destination
for the branch, but BRCLR, BRSET, CBEQ, and DBNZ also must access a memory operand. These
instructions are classified by the addressing mode used for the memory operand, and the relative
addressing mode for the branch offset is assumed.
The discussion in the following paragraphs includes how each addressing mode works and the syntax clues
that instruct the assembler to use a specific addressing mode.
8.3.1
This addressing mode is used when the CPU inherently knows everything it needs to complete the
instruction and no addressing information is supplied in the source code. Usually, the operands that the
CPU needs are located in the CPU’s internal registers, as in LSLA, CLRA, INCA, SLA, RTS, and others.
A few inherent instructions, including no operation (NOP) and background (BGND), have no operands.
8.3.2
Relative addressing mode is used to specify the offset address for branch instructions relative to the
program counter. Typically, the programmer specifies the destination with a program label or an expression
Freescale Semiconductor
Addressing Modes
Page Select Register (PAGESEL)
Inherent Addressing Mode (INH)
Relative Addressing Mode (REL)
MC9RS08KA2 Series Data Sheet, Rev. 3
Chapter 8 Central Processor Unit (RS08CPUV1)
61

Related parts for MC9RS08KA1