| 数据搜索系统,热门电子元器件搜索 |
|
STC89LE52RC 数据表(PDF) 141 Page - STCmicro Technology Co,.Ltd |
|
|
|||||||||||||||||||||||||||||
STC89LE52RC 数据表(HTML) 141 Page - STCmicro Technology Co,.Ltd |
|
141 / 165 page ![]() So, the assembled instructions are equal to MOV A, #0FFH Even though expressions evaluate to 16-bit results (i.e., 0FFFFH), in the examples above only the low-order eight bits are used, since the instruction is a move byte operation. The result is not considered too big in this case, because as signed numbers the 16-bit value FFFFH and the 8-bit value FFH are the same (-1). Expression Examples The following are examples of expressions and the values that result: Expression Result 'B' - 'A' 0001H 8/3 0002H 155 MOD 2 0001H 4 * 4 0010H 8 AND 7 0000H NOT 1 FFFEH 'A' SHL 8 4100H LOW 65535 00FFH (8 + 1) * 2 0012H 5 EQ 4 0000H 'A' LT 'B' FFFFH 3 <= 3 FFFFHss A practical example that illustrates a common operation for timer initialization follows: Put -500 into Timer 1 registers TH1 and TL1. In using the HIGH and LOW operators, a good approach is VALUE EQU -500 MOV TH1, #HIGH VALUE MOV TL1, #LOW VALUE The assembler converts -500 to the corresponding 16-bit value (FE0CH); then the HIGH and LOW operators extract the high (FEH) and low (0CH) bytes. as appropriate for each MOV instruction. Operator Precedence The precedence of expression operators from highest to lowest is ( ) HIGH LOW * / MOD SHL SHR + - EQ NE LT LE GT GE = < > < <= > >= NOT AND OR XOR When operators of the same precedence are used, they are evaluated left to right. Examples: Expression Value HIGH ( 'A' SHL 8) 0041H HIGH 'A' SHL 8 0000H NOT 'A' - 1 FFBFH 'A' OR 'A' SHL 8 4141H 141 |
|
链接网址 |
| 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 |