| Electronic Components Datasheet Search |
|
UM0144 Datasheet(PDF) 10 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
UM0144 Datasheet(HTML) 10 Page - STMicroelectronics |
|
10 / 92 page ![]() 2 ST7 Addressing Modes ST7 Assembler Linker 10/92 UM0144 2.5 Immediate operands Immediate operands permit you to input a specific value for use with an instruction. They are signaled by the use of a sharp sign (#) before the value. Examples: The range for an 8-bit immediate operand is from 0 to 255. 2.6 Direct and indirect modes A direct addressing mode means that the data byte required to do the operation is found by its memory address, which follows the op-code. An indirect addressing mode means that the data byte required to do the operation is found by its memory address which is located in memory (pointer). The pointer address follows the op-code. This last group consists of memory indirect variants: ● short indirect (short pointed data), ● long indirect (long pointed data), ● short indirect indexed (short pointed data), ● long indirect indexed (long pointed data), For ST7 devices, the address specified must always be in page 0 (i.e. its address must be less than $100). Examples: To make the distinction between short and long indirect addressing mode, the suffix.w is specified to indicate that you want to work in long indirect mode (this is also true for indexed addressing mode). Implicitly, if nothing is specified, the short indirect addressing mode is assumed. For ST7 devices, you can also use.b to specify short indirect addressing mode (as with the indexed addressing mode). lab08 ld A,#1 ; load A with immediate value 1 lab09 bset memory,#3 ; set bit #3 in memory location btjt memory,#3,label ; test bit #3 of memory and jump if true (set) ld A,[80] ; short indirect ld A,[80.b] ; short indirect ld A,[80.w] ; long indirect lab12 equ 80 ld A,([lab12],X) ; short indirect X-indexed ld A,([lab12.b],X) ; short indirect X-indexed ld A,([lab12.w],Y) ; long indirect Y-indexed |
|
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 |