?? bin2bcd32.s43
字號:
;void bin2bcd32(register uint8_t bcd[5], register uint32_t bin)
public bin2bcd32
public _bin2bcd32
RSEG CODE
bin2bcd32
_bin2bcd32
#define i R8
#define decimal_0 R9
#define decimal_1 R10
#define decimal_2 R11
push R8
push R9
push R10
push R11
;dint ;;;;;
clr R9 ; decimal_0 = ;;;;;debug clock stop problem
clr R10 ;decimal_1 =
clr R11 ;decimal_2 = 0;
mov #16,R8
bin2bcd32_1
rla R15
dadd decimal_0,decimal_0
dadd decimal_1,decimal_1
dadd decimal_2,decimal_2
dec i
jnz bin2bcd32_1
mov #16,i
bin2bcd32_2
rla R14
dadd decimal_0,decimal_0
dadd decimal_1,decimal_1
dadd decimal_2,decimal_2
dec i
jnz bin2bcd32_2
mov.b decimal_2,0(R12)
mov.b decimal_1,2(R12)
swpb decimal_1
mov.b decimal_1,1(R12)
mov.b decimal_0,4(R12)
swpb decimal_0
mov.b decimal_0,3(R12)
pop R11
pop R10
pop R9
pop R8
ret
end
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -