COP8SA-DM National Semiconductor, COP8SA-DM Datasheet - Page 32

no-image

COP8SA-DM

Manufacturer Part Number
COP8SA-DM
Description
MODULE DEBUGGING FOR COP8SA
Manufacturer
National Semiconductor
Datasheet

Specifications of COP8SA-DM

Module/board Type
Debugger Module
For Use With/related Products
Cop 8
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
Other names
*COP8SA-DM
Register Indirect
Post-Increment or Post-Decrement
Indexed Addressing
1.7.7
Routines/Subroutines
A routine is a segment of code which performs a specific function. A subroutine is a
segment of code which performs a specific part of function. A subroutine is usually called
by several different routines or called several times from a single routine.
Stack Manipulation
On some microcontrollers, the stack is assigned a particular segment of memory and the
microcontroller initializes the stack pointer to a specific address upon reset. This is
referred to as stack initializing by hardware. There are also cases where the stack pointer
is initialized the user program (software) at the beginning of the program to point to a
segment of available memory. The stack may be addressed by instructions such as PUSH
and POP. The PUSH instruction places a piece of data on the stack and increments or
1-20
MICROCONTROLLER BASICS
Programming
fied in the instruction.
Example: LD A, 00
A register which contains the address of the oper-
and in memory is specified in the instruction.
Example: LD A, [B]
Similar to register indirect, a register containing
the address of the operand in memory is specified
in the instruction. However, the contents of the
register (the memory address) is automatically
incremented or decremented after the operand is
fetched from the specified location.
Example: LD A, [B+] or LD A, [B-]
Similar to register indirect except an index num-
ber is also specified in the instruction. This index
number/displacement is added to the contents of
a base register to form the actual address of the
operand. The base register may be either implied
in the instruction or given as an additional argu-
ment. This addressing mode is used to access en-
tries in a table. The base address represents the
starting location of the table in memory. The dis-
placement represents the distance between the
start of the table and the desired element in the
table.
Example: LD A, 12[B] or ADD A, 14[R0]

Related parts for COP8SA-DM