English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
所有分類

請問8051的加法與乘法
1234H*5678H-3657H*1369H-23H*12H
H代表16進位喔...

2006-11-14 17:46:51 · 1 個解答 · 發問者 尋夢ㄟ天王... 1 in 電腦與網際網路 程式設計

1 個解答

答案是 2073F3B
給您一段類似的副程式參考
*foumula {[(R3) X 9Dh] + (R2)} X 1Eh
*OUTPUT:ACC=(A),(R3),(R2)
WORD_MUL:MOVA,R3
MOVB,#9DH
MULAB;R3 X 9D
ADDA,R2;+R2
MOVR2,A
CLRA
ADDCA,B
MOVR3,A;(R3)(R2)
MOVA,R2
MOVB,#1EH
MULAB;R2 X 1E
MOVR2,A;Lo byte to R2
MOVA,R3
MOVR3,B;temp Hi byte to R3
MOVB,#1EH
MULAB
ADDA,R3;R3 X 1E
MOVR3,A;real Hi byte to R3
CLRA
ADDCA,B;result 3 bytes (A),(R3),(R2)
RET

2006-11-20 04:03:56 · answer #1 · answered by 有兩把刷子的ㄚ超 5 · 0 0

fedest.com, questions and answers