DT EQU 30H ; PACKED BCD DT1 DATA DT ; 0.01m DT2 DATA DT+1; 1m DT3 DATA DT+2; 100m DT4 DATA DT+3; 10000m DT5 DATA DT+4; 1000000m DT6 DATA DT+5; 100000000m
;-------------------------------------- ; DT = 0 SUB_CLR_DATA: MOV R0, #DT MOV R2, #6 CLR_DATA: MOV @R0, #0 INC R0 DJNZ R2, CLR_DATA RET ;------------------------------- SUB_ADD_30_CM: MOV R0, #DT MOV A, #30 CLR C NEXT_ADD_30: ADDC A, @R0 DA A MOV @R0, A CLR A INC R0 JC NEXT_ADD_30 RET