參數(shù)資料
型號: AN1218
廠商: 飛思卡爾半導(dǎo)體(中國)有限公司
英文描述: HC05 to HC08 Optimization
中文描述: 以HC08的優(yōu)化HC05
文件頁數(shù): 41/56頁
文件大?。?/td> 417K
代理商: AN1218
Application Note
Appendix D — Using the Stack in a Subroutine to Compute a Cube
AN1218 Rev. 2
41
* Store away low byte of 16-bit result
* to Y_LOW
* Store high byte of 16-bit result to var2
STA 10T,SP ;store low answ to Y_LOW
STX 2,SP ;store high answ to var2
* Multiply high byte of 16-bit result by X_IN
LDA 11T,SP ;A
X_IN
LDX 1,SP ;load X with var1
MUL ;X:A = X_IN * var1
* Store high byte of answer to Y_HIGH
STX 8T,SP ;store high byte to Y_HIGH
* ADD var2 to the low byte answer to get Y_MED
* If there is a carry, add one bit to Y_HIGH
ADD 2T,SP ;A = var2 + A
BCS CS ;branch if C bit set in CCR
BRA FIN ;C bit is 0, branch to FIN
CS INC 8T,SP ;add 1 to Y_HIGH
FIN STA 9T,SP ;store A to Y_MED
* Save X,H, and A on stack
* Increment stack for 2 bytes
* Restore X,H, and A
* Return from the subroutine
AIS #$02
PULA
PULH
PULX
RTS
DONE NOP
BRA DONE
***** Initialize the reset vector
ORG $FFFE
DW START
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 功能描述: