📄 current.asm
字号:
;********************************************************
; PROJECT NAME : nimh charger *
; Author : borg *
; VERSION : V0.0 *
; BODY : SN8P2704a *
; COMPILER : 1.99N *
; function : *
; input : *
; output : tempvolt1_l, tempvolt1_h *
; tempvolt2_l, tempvolt2_h *
; use register : data1, data2, tempvolt1_l, tempvolt1_h*
; tempvolt2_l, tempvolt2_h *
; use flag : dtemp1_f, dtemp2_f *
; run cycles : *
; *******************************************************
mncurrent:
b0bts1 current_turn_f
jmp mncurrent90
mov a,#10010001b
mov adm,a
mov a,#11111101b
mov p4con,a
call adcchange
mov a,data1
mov current_l,a
mov a,data2
mov current_h,a
mncurrent50:
b0bts1 nopan_check_f
jmp mncurrent10
incms nopan_count
nop
mov a,#6
cmprs a,nopan_count
jmp mncurrent10
clr nopan_count
bclr nopan_check_f
mov a,current_l
sub a,nopan_const_l
mov a,current_h
sbc a,nopan_const_h
b0bts1 fc
jmp mncurrent502
jmp mncurrent501
mncurrent501:
bclr nopan_f
jmp mncurrent10
mncurrent502:
bset nopan_f
bclr outctrl_p
jmp mncurrent10
;------------------------------------------------
mncurrent10:
mov a,current_l
sub a,cur_const_l
mov a,current_h
sbc a,cur_const_h
b0bts1 fc
jmp mncurrent20
jmp mncurrent30
mncurrent20:
bclr cur_warning_f
jmp mncurrent90
mncurrent30:
bset cur_warning_f
jmp mncurrent90
mncurrent90:
ret
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -