| Electronic Components Datasheet Search |
|
COP8TAB9 Datasheet(PDF) 47 Page - National Semiconductor (TI) |
|
|
|
|||||||||||||||||||||||||||||
COP8TAB9 Datasheet(HTML) 47 Page - National Semiconductor (TI) |
|
47 / 59 page ![]() 19.0 Instruction Set (Continued) erand addressing modes and transfer-of-control addressing modes. Operand addressing modes are the various meth- ods of specifying an address for accessing (reading or writ- ing) data. Transfer-of-control addressing modes are used in conjunction with jump instructions to control the execution sequence of the software program. 19.3.1 Operand Addressing Modes The operand of an instruction specifies what memory loca- tion is to be affected by that instruction. Several different operand addressing modes are available, allowing memory locations to be specified in a variety of ways. An instruction can specify an address directly by supplying the specific address, or indirectly by specifying a register pointer. The contents of the register (or in some cases, two registers) point to the desired memory location. In the immediate mode, the data byte to be used is contained in the instruction itself. Each addressing mode has its own advantages and disad- vantages with respect to flexibility, execution speed, and program compactness. Not all modes are available with all instructions. The Load (LD) instruction offers the largest number of addressing modes. The available addressing modes are: • Direct • Register B or X Indirect • Register B or X Indirect with Post-Incrementing/ Decrementing • Immediate • Immediate Short • Indirect from Program Memory The addressing modes are described below. Each descrip- tion includes an example of an assembly language instruc- tion using the described addressing mode. Direct. The memory address is specified directly as a byte in the instruction. In assembly language, the direct address is written as a numerical value (or a label that has been defined elsewhere in the program as a numerical value). Example: Load Accumulator Memory Direct LD A,05 Reg/Data Contents Contents Memory Before After Accumulator XX Hex A6 Hex Memory Location A6 Hex A6 Hex 0005 Hex Register B or X Indirect. The memory address is specified by the contents of the B Register or X register (pointer register). In assembly language, the notation [B] or [X] speci- fies which register serves as the pointer. Example: Exchange Memory with Accumulator, B Indirect X A,[B] Reg/Data Contents Contents Memory Before After Accumulator 01 Hex 87 Hex Memory Location 87 Hex 01 Hex 0005 Hex B Pointer 05 Hex 05 Hex Register B or X Indirect with Post-Incrementing/ Decrementing. The relevant memory address is specified by the contents of the B Register or X register (pointer register). The pointer register is automatically incremented or decremented after execution, allowing easy manipulation of memory blocks with software loops. In assembly lan- guage, the notation [B+], [B−], [X+], or [X−] specifies which register serves as the pointer, and whether the pointer is to be incremented or decremented. Example: Exchange Memory with Accumulator, B Indirect with Post-Increment X A,[B+] Reg/Data Contents Contents Memory Before After Accumulator 03 Hex 62 Hex Memory Location 62 Hex 03 Hex 0005 Hex B Pointer 05 Hex 06 Hex Intermediate. The data for the operation follows the instruc- tion opcode in program memory. In assembly language, the number sign character (#) indicates an immediate operand. Example: Load Accumulator Immediate LD A,#05 Reg/Data Contents Contents Memory Before After Accumulator XX Hex 05 Hex Immediate Short. This is a special case of an immediate instruction. In the “Load B immediate” instruction, the 4-bit immediate value in the instruction is loaded into the lower nibble of the B register. The upper nibble of the B register is reset to 0000 binary. Example: Load B Register Immediate Short LD B,#7 Reg/Data Contents Contents Memory Before After B Pointer 12 Hex 07 Hex Indirect from Program Memory. This is a special case of an indirect instruction that allows access to data tables stored in program memory. In the “Load Accumulator Indi- rect” (LAID) instruction, the upper and lower bytes of the Program Counter (PCU and PCL) are used temporarily as a pointer to program memory. For purposes of accessing pro- gram memory, the contents of the Accumulator and PCL are exchanged. The data pointed to by the Program Counter is loaded into the Accumulator, and simultaneously, the original contents of PCL are restored so that the program can re- sume normal execution. Example: Load Accumulator Indirect LAID Reg/Data Contents Contents Memory Before After PCU 04 Hex 04 Hex PCL 35 Hex 36 Hex Accumulator 1F Hex 25 Hex Memory Location 25 Hex 25 Hex 041F Hex www.national.com 47 |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |