| 数据搜索系统,热门电子元器件搜索 |
|
PM0044 数据表(PDF) 59 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
PM0044 数据表(HTML) 59 Page - STMicroelectronics |
|
59 / 162 page ![]() PM0044 STM8 addressing modes Doc ID 13590 Rev 3 59/162 6.14 Bit Direct (Long) Relative addressing mode This addressing mode is a combination between the Bit Direct addressing mode (for data addressing) and Relative Direct mode (for PC computation). The data byte required for the operation is found by its memory address, which follows the op-code. The bit used for the test operation is selected by the bit selector which is encoded in the instruction op-code. Following the logical test operation, the PC register value can be modified, by adding an 8-bit signed offset to it. The data address is a word, thus allowing 0000 to FFFF addressing space (requires 2 bytes after the op-code). The bit selector #n (n=0 to 7) selects the nth bit from the byte pointed to by the address. The offset follows the op-code and data address. Example: Table 39. Overview of Bit Direct (Long) Relative addressing mode Addressing mode Syntax EA formula Ptr Adr Ptr Size Dest adr Bit Long Direct Relative longmem, #pos, off (longmem) op + 1..2 Word 0000..FFFF PC = PC + off op + 3 Byte PC +127/- 128 Table 40. Available Bit Direct Relative instructions Instructions Functions BTJT, BTJF Bit Test and Jump 104B 00 DRA dc.b $00 ; Port A data register (input value) bit0 equ $0 ; data bit 0 04A7 7201104BFB wait_1 BTJF DRA, bit0, wait_1 04AC .... cont_0 Action: Test = select_bit(0, ($4B)) = select_bit(0, DRA) if (Test /= 1) then PC = PC + $FB = $0004AC - $05 = $0004A7 else PC = PC = $0004AC |
|
链接网址 |
| ALLDATASHEET是否为您带来帮助? [ DONATE ] |
关于 Alldatasheet | 广告服务 | 联系我们 | 隐私政策 | 数据表链接 | 链接交换 | 制造商名单 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 |