| поискавой системы для электроныых деталей |
|
HMS91C8032 датащи(PDF) 13 Page - Hynix Semiconductor |
|
|
|||||||||||||||||||||||||||||
HMS91C8032 датащи(HTML) 13 Page - Hynix Semiconductor |
|
13 / 157 page ![]() HMS91C8032/97C8032 10 NOV., 2001 Ver 1.02 Oddly enough, DIV AB finds less use in arithmetic "divide" rou- tines than in radix conversions and programmable shift opera- tions. An example of the use of DIV AB in a radix conversion will be given later. In shift operations, dividing a number by 2n shifts its n bits to the right. Using DIV AB to perform the division com- pletes the shift in 4 µs and leaves the B register holding the bits that were shifted out. The DA A instruction is for BCD arithmetic operations. In BCD arithmetic, ADD and ADDC instructions should always be followed by a DA A operation, to ensure that the result is also in BCD. Note that DA A will not convert a bina- ry number to BCD. The DA A operation produces a meaningful result only as the second step in the addition of two BCD bytes. 3.4 Logical Instructions Table 3-2 shows list of HMS9XC8032 logical instructions. The instructions that perform Boolean operations (AND, OR, Exclu- sive OR, NOT) on bytes perform the operation on a bit-by-bit ba- sis. That is, if the Accumulator contains 00110101B and byte contains 01010011B, then : ANL A, <byte> will leave the Accumulator holding 00010001B. The addressing modes that can be used to access the <byte> op- erand are listed in Table 3-2. The ANL A, <byte> instruction may take any of the forms: ANL A,7FH(direct addressing) ANL A, @R1 (indirect addressing) ANL A,R6 (register addressing) ANL A,#53H (immediate constant) Note that Boolean operations can be performed on any byte in the internal Data Memory space without going through the Accumu- lator. The XRL <byte>, #data instruction, for example, offers a quick and easy way to invert port bits, as in XRL P1, #0FFH. If the operation is in response to an interrupt, not using the Accu- mulator saves the time and effort to push it onto the stack in the service routine. The Rotate instructions (RL A, RLC A, etc.) shift the Accumula- tor 1 bit to the left or right. For a left rotation, the MSB rolls into the LSB position. For a right rotation, the LSB rolls into the MSB position. The SWAP A instruction interchanges the high and low nibbles within the Accumulator. This is a useful operation in BCD ma- nipulations. For example, if the Accumulator contains a binary number which is known to be less than 100, it can be quickly con- verted to BCD by the following code: MNEMONIC OPERATION ADDRESSING MODES Dir Ind Reg Imm ANL A,<byte> A = A .AND. <byte> X X X X ANL <byte>,A <byte> = <byte> .AND. A X ANL <byte>,#data <byte> = <byte> .AND. #data X ORL A,<byte> A = A .OR. <byte> X X X X ORL <byte>,A <byte> = <byte> .OR. A X ORL <byte>,#data <byte> = <byte> .OR. #data X XRL A,<byte> A = A .XOR. <byte> X X X X XRL <byte>,A <byte> = <byte> .XOR. A X XRL <byte>,#data <byte> = <byte> .XOR. #data X CRL A A = 00H Accumulator only CPL A A = .NOT. A Accumulator only RL A Rotate ACC Left 1 bit Accumulator only RLC A Rotate Left through Carry Accumulator only RR A Rotate ACC Right 1 bit Accumulator only RRC A Rotate Right through Carry Accumulator only SWAP A Swap Nibbles in A Accumulator only Table 3-2 HMS9XC8032 Logical Instructions |
|
ссылки URL |
| Вашему бизинису помогли Аллдатащит? [ DONATE ] |
Что такое Аллдатащит | реклама | контакт | Конфиденциальность | Ссылка на техническое описание | обмен ссыками | поиск по производителю 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 |