PIC单片机的BCD码加法程序

pic单片机的bcd码加法程序
;******************* unsigned bcd addition ***************
;
; this routine performs a 2 digit unsigned bcd addition
; it is assumed that the two bcd numbers to be added are in
; locations num_1 & num_2. the result is the sum of num_1+num_2
; and is stored in location num_2 and the overflow carry is returned
; in location num_1
;
; performance :
; program memory : 25
; clock cycles : 17 ( worst case )
;
;*******************************************************************;
;
num_1 equ 8 ; overflow flow carry overwrites num_1
result equ 8
;
num_2 equ 9 ; num_2 + num_1 overwrites num_2
o_flow equ 9
;
;
include picreg.h
;
bcdadd movf num_1,w
clrf num_1 ;clear num_1
addwf num_2,1 ; do binary addition
btfsc status,c ; max number )
;
self goto self
;
;
org 1ff
goto main
;
end

智能家居魔镜到底有多智能,一起来感受感受吧
浅谈国产化IGBT的未来前景
有趣生活新方式—佳能HF R86
realme真我GT2大师探索版首发超级N28自由四天线
电路分析学习笔记之电路模型与电路定律
PIC单片机的BCD码加法程序
算法与算法工程师的本质区别在哪?技术并非是“造狗窝”
杭州灵伴科技携手南京钢铁打造中国钢铁AR数智样板间
论数据中心的优点和弊端
用户论文:水下环境的激光模式散斑鬼成像
平行交叉地平面的串扰
苹果欲将加速iPhone12的产能
去耦和旁路电路特性
锁相环及频率合成器的原理及电路设计方案介绍
风速传感器在太阳能发电站的应用技术解决方案
NB-IoT相比,eMTC显然“沉闷”不少
盘点各行业对于室内定位解决方案的需求!
NVIDIA与HTC,联手打造高端VR
S参数通俗讲义
半导体产业2010年第一季度重大事件分析