參數(shù)資料
型號: AN1218
廠商: 飛思卡爾半導(dǎo)體(中國)有限公司
英文描述: HC05 to HC08 Optimization
中文描述: 以HC08的優(yōu)化HC05
文件頁數(shù): 27/56頁
文件大?。?/td> 417K
代理商: AN1218
Application Note
Four New Signed Branch Instructions, Detail
AN1218 Rev. 2
27
register X. The quotient is placed in the
accumulator A, and the remainder is placed
in the high order index register H. The
divisor is left unchanged.
New DAA and the
NSA instruction
The decimal adjust accumulator, DAA, and the nibble swap
accumulator, NSA, are new instructions to help with binary coded
decimal(BCD)operations. TheDAAinstructionallowstheusertoadjust
the accumulator so that the number represents a BCD number.
Swapping nibbles is needed for packing BCD numbers into memory.
One use of BCD is data instrumentation. It is easier to store and
manipulate these numbers in BCD rather than convert or decode
numbers from hexadecimal. Packing is used to store decimal numbers
into memory. Instead of one byte storing one decimal, the NSA
instruction easily swaps nibbles in the accumulator so that two decimal
numberscanbestoredinonebyte.
AppendixJ—FiveMiscellaneous
CPU08 Instructions Including BCD, Divide, and CCR Operations
gives examples using the DAA instruction and the NSA instruction.
Refer to
Appendix L — CPU08 BCD Example Code
for an example of
BCD code.
DAA
Decimal Adjust Accumulator
Operation:
(A)10
Description: Adjusts the contents of the accumulator and
the state of the CCR carry bit after binary
coded decimal operations so that there is a
correct BCD sum and an accurate carry
indication. The state of the CCR half carry
bit affects operation.
NSA
Nibble Swap Accumulator
Operation:
A
(A[3:0]:A[7:4])
Description: Swaps upper and lower nibbles (4 bits) of
the accumulator. This is used for more
ef cient stor age and use of binary coded
operands.
F
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
.
相關(guān)PDF資料
PDF描述
AN1746 Migrating from the MC68HC705K1 to the MC68HC705KJ1
AN2635 On-Chip FLASH Programming Routines
AN4009 ALARM IC SAMPLE APPLICATIONS
ARP2805D/SF 1-OUTPUT 150 W DC-DC REG PWR SUPPLY MODULE
AS1977-T nPower Single Comp. Open-Drain; Package Type: SOT23-5
相關(guān)代理商/技術(shù)參數(shù)
參數(shù)描述
AN122677 制造商:AN# - MILITARY 功能描述:
AN122683 制造商:AN# - MILITARY 功能描述:
AN122694 制造商:AN# - MILITARY 功能描述:
AN122717 制造商:AN# - MILITARY 功能描述:
AN122718 制造商:AN# - MILITARY 功能描述: