📄 rtctempcompensation.asm
字号:
; Archelon URCC C 3.20 2005/05/27
; MSP430 CIF 2005/08/05
; Compiled "C:\Documents and Settings\All Users\Documents\TI Contest\My Entries\RTC Temperature Compensation\Quadravox\RtcTempCompensation.c" Sun Oct 08 22:14:38 2006
;
.dbgseg dbg_syms
.align 0x2
.long 0x6c69662e
.long 0x65
.long 0x1
.long 0x0
.long 0x167fffe
.long 0x0
.long DBG5
.long 0x0
.long 0x0
.long 0x0
; __builtin__ unsigned short _BIS_SR(unsigned short);
; __builtin__ unsigned short _BIC_SR(unsigned short);
; __builtin__ unsigned short _BIS_SR_IRQ(unsigned short);
; __builtin__ unsigned short _BIC_SR_IRQ(unsigned short);
; __builtin__ void _DINT(void);
; __builtin__ void _EINT(void);
; __builtin__ void _NOP(void);
; __builtin__ void _OPC(const unsigned short op);
; __builtin__ short _SWPB(short);
; __builtin__ long _SWPB_LONG(long);
; __builtin__ float _SWPB_FLOAT(float);
; __builtin__ short __bcd_add_short(short,short);
; __builtin__ long __bcd_add_long(long,long);
; __builtin__ long long __bcd_add_long_long( long long, long long );
; sfrb IE1 = (0x0000) ;
; sfrb IFG1 = (0x0002) ;
; sfrb ME1 = (0x0004) ;
; sfrb IE2 = (0x0001) ;
; sfrb IFG2 = (0x0003) ;
; sfrw WDTCTL = (0x0120) ;
; const sfrb P1IN = (0x0020) ;
; sfrb P1OUT = (0x0021) ;
; sfrb P1DIR = (0x0022) ;
; sfrb P1IFG = (0x0023) ;
; sfrb P1IES = (0x0024) ;
; sfrb P1IE = (0x0025) ;
; sfrb P1SEL = (0x0026) ;
; const sfrb P2IN = (0x0028) ;
; sfrb P2OUT = (0x0029) ;
; sfrb P2DIR = (0x002A) ;
; sfrb P2IFG = (0x002B) ;
; sfrb P2IES = (0x002C) ;
; sfrb P2IE = (0x002D) ;
; sfrb P2SEL = (0x002E) ;
; const sfrb P3IN = (0x0018) ;
; sfrb P3OUT = (0x0019) ;
; sfrb P3DIR = (0x001A) ;
; sfrb P3SEL = (0x001B) ;
; const sfrb P4IN = (0x001C) ;
; sfrb P4OUT = (0x001D) ;
; sfrb P4DIR = (0x001E) ;
; sfrb P4SEL = (0x001F) ;
; const sfrb P5IN = (0x0030) ;
; sfrb P5OUT = (0x0031) ;
; sfrb P5DIR = (0x0032) ;
; sfrb P5SEL = (0x0033) ;
; const sfrb P6IN = (0x0034) ;
; sfrb P6OUT = (0x0035) ;
; sfrb P6DIR = (0x0036) ;
; sfrb P6SEL = (0x0037) ;
; sfrb BTCTL = (0x0040) ;
; sfrb BTCNT1 = (0x0046) ;
; sfrb BTCNT2 = (0x0047) ;
; sfrb SCFI0 = (0x0050) ;
; sfrb SCFI1 = (0x0051) ;
; sfrb SCFQCTL = (0x0052) ;
; sfrb FLL_CTL0 = (0x0053) ;
; sfrb FLL_CTL1 = (0x0054) ;
; sfrb SVSCTL = (0x0056) ;
; sfrb LCDCTL = (0x0090) ;
; sfrb LCDM1 = (0x0091) ;
; sfrb LCDM2 = (0x0092) ;
; sfrb LCDM3 = (0x0093) ;
; sfrb LCDM4 = (0x0094) ;
; sfrb LCDM5 = (0x0095) ;
; sfrb LCDM6 = (0x0096) ;
; sfrb LCDM7 = (0x0097) ;
; sfrb LCDM8 = (0x0098) ;
; sfrb LCDM9 = (0x0099) ;
; sfrb LCDM10 = (0x009A) ;
; sfrb LCDM11 = (0x009B) ;
; sfrb LCDM12 = (0x009C) ;
; sfrb LCDM13 = (0x009D) ;
; sfrb LCDM14 = (0x009E) ;
; sfrb LCDM15 = (0x009F) ;
; sfrb LCDM16 = (0x00A0) ;
; sfrb LCDM17 = (0x00A1) ;
; sfrb LCDM18 = (0x00A2) ;
; sfrb LCDM19 = (0x00A3) ;
; sfrb LCDM20 = (0x00A4) ;
; sfrb U0CTL = (0x0070) ;
; sfrb U0TCTL = (0x0071) ;
; sfrb U0RCTL = (0x0072) ;
; sfrb U0MCTL = (0x0073) ;
; sfrb U0BR0 = (0x0074) ;
; sfrb U0BR1 = (0x0075) ;
; const sfrb U0RXBUF = (0x0076) ;
; sfrb U0TXBUF = (0x0077) ;
; const sfrw TAIV = (0x012E) ;
; sfrw TACTL = (0x0160) ;
; sfrw TACCTL0 = (0x0162) ;
; sfrw TACCTL1 = (0x0164) ;
; sfrw TACCTL2 = (0x0166) ;
; sfrw TAR = (0x0170) ;
; sfrw TACCR0 = (0x0172) ;
; sfrw TACCR1 = (0x0174) ;
; sfrw TACCR2 = (0x0176) ;
; const sfrw TBIV = (0x011E) ;
; sfrw TBCTL = (0x0180) ;
; sfrw TBCCTL0 = (0x0182) ;
; sfrw TBCCTL1 = (0x0184) ;
; sfrw TBCCTL2 = (0x0186) ;
; sfrw TBR = (0x0190) ;
; sfrw TBCCR0 = (0x0192) ;
; sfrw TBCCR1 = (0x0194) ;
; sfrw TBCCR2 = (0x0196) ;
; sfrw FCTL1 = (0x0128) ;
; sfrw FCTL2 = (0x012A) ;
; sfrw FCTL3 = (0x012C) ;
; sfrb CACTL1 = (0x0059) ;
; sfrb CACTL2 = (0x005A) ;
; sfrb CAPD = (0x005B) ;
; sfrw ADC12CTL0 = (0x01A0) ;
; sfrw ADC12CTL1 = (0x01A2) ;
; sfrw ADC12IFG = (0x01A4) ;
; sfrw ADC12IE = (0x01A6) ;
; sfrw ADC12IV = (0x01A8) ;
; sfrw ADC12MEM0 = (0x0140) ;
; sfrw ADC12MEM1 = (0x0142) ;
; sfrw ADC12MEM2 = (0x0144) ;
; sfrw ADC12MEM3 = (0x0146) ;
; sfrw ADC12MEM4 = (0x0148) ;
; sfrw ADC12MEM5 = (0x014A) ;
; sfrw ADC12MEM6 = (0x014C) ;
; sfrw ADC12MEM7 = (0x014E) ;
; sfrw ADC12MEM8 = (0x0150) ;
; sfrw ADC12MEM9 = (0x0152) ;
; sfrw ADC12MEM10 = (0x0154) ;
; sfrw ADC12MEM11 = (0x0156) ;
; sfrw ADC12MEM12 = (0x0158) ;
; sfrw ADC12MEM13 = (0x015A) ;
; sfrw ADC12MEM14 = (0x015C) ;
; sfrw ADC12MEM15 = (0x015E) ;
; sfrb ADC12MCTL0 = (0x0080) ;
; sfrb ADC12MCTL1 = (0x0081) ;
; sfrb ADC12MCTL2 = (0x0082) ;
; sfrb ADC12MCTL3 = (0x0083) ;
; sfrb ADC12MCTL4 = (0x0084) ;
; sfrb ADC12MCTL5 = (0x0085) ;
; sfrb ADC12MCTL6 = (0x0086) ;
; sfrb ADC12MCTL7 = (0x0087) ;
; sfrb ADC12MCTL8 = (0x0088) ;
; sfrb ADC12MCTL9 = (0x0089) ;
; sfrb ADC12MCTL10 = (0x008A) ;
; sfrb ADC12MCTL11 = (0x008B) ;
; sfrb ADC12MCTL12 = (0x008C) ;
; sfrb ADC12MCTL13 = (0x008D) ;
; sfrb ADC12MCTL14 = (0x008E) ;
; sfrb ADC12MCTL15 = (0x008F) ;
; typedef unsigned char byte;
; byte size 1
; typedef unsigned short uint16;
; uint16 size 2
; typedef short sint16;
; sint16 size 2
; typedef unsigned long uint32;
; uint32 size 4
; typedef long sint32;
; sint32 size 4
; extern uint16 SampledAdcRawValue;
; extern volatile byte UpdateTempCorrectionFlag;
; extern const byte FrequencyCorrectionTable[];
; extern uint16 RtcCorrectionTime;
; void UpdateCorrection(void);
; void InitialiseTimerA1(void);
; extern void getTemp(void);
; extern short bcd_add_short(short arg1,short arg2);
; extern signed int tempF;
; extern unsigned char seconds, minutes, hours;
; uint16 SampledAdcRawValue = 0;
.iseg RtcTempCompensation_idata
.align 0x2
RtcTempCompensation_V1:
.align 0x2
.align 0x2
.data 0x0
.dseg RtcTempCompensation_data
.align 0x2
RtcTempCompensation_V2:
.align 0x2
.global _SampledAdcRawValue
_SampledAdcRawValue:
.bss 0x2
; SampledAdcRawValue size 2
; volatile byte UpdateTempCorrectionFlag = 0;
.iseg RtcTempCompensation_idata
.byte 0x0
.dseg RtcTempCompensation_data
.global _UpdateTempCorrectionFlag
_UpdateTempCorrectionFlag:
.bss 0x1
; UpdateTempCorrectionFlag size 1
; const byte FrequencyCorrectionTable[];
; uint16 RtcCorrectionTime;
; const byte FrequencyCorrectionTable[] = {
.iseg RtcTempCompensation_data_const
.align 0x2
.global _FrequencyCorrectionTable
_FrequencyCorrectionTable:
.byte 0x91
; 145,
.byte 0x8d
; 141,
.byte 0x88
; 136,
.byte 0x84
; 132,
.byte 0x80
; 128,
.byte 0x7c
; 124,
.byte 0x78
; 120,
.byte 0x73
; 115,
.byte 0x70
; 112,
.byte 0x6c
; 108,
.byte 0x68
; 104,
.byte 0x64
; 100,
.byte 0x60
; 96,
.byte 0x5d
; 93,
.byte 0x59
; 89,
.byte 0x56
; 86,
.byte 0x52
; 82,
.byte 0x4f
; 79,
.byte 0x4c
; 76,
.byte 0x49
; 73,
.byte 0x45
; 69,
.byte 0x42
; 66,
.byte 0x3f
; 63,
.byte 0x3c
; 60,
.byte 0x3a
; 58,
.byte 0x37
; 55,
.byte 0x34
; 52,
.byte 0x31
; 49,
.byte 0x2f
; 47,
.byte 0x2c
; 44,
.byte 0x2a
; 42,
.byte 0x28
; 40,
.byte 0x25
; 37,
.byte 0x23
; 35,
.byte 0x21
; 33,
.byte 0x1f
; 31,
.byte 0x1d
; 29,
.byte 0x1b
; 27,
.byte 0x19
; 25,
.byte 0x17
; 23,
.byte 0x15
; 21,
.byte 0x14
; 20,
.byte 0x12
; 18,
.byte 0x10
; 16,
.byte 0xf
; 15,
.byte 0xe
; 14,
.byte 0xc
; 12,
.byte 0xb
; 11,
.byte 0xa
; 10,
.byte 0x9
; 9,
.byte 0x7
; 7,
.byte 0x6
; 6,
.byte 0x6
; 6,
.byte 0x5
; 5,
.byte 0x4
; 4,
.byte 0x3
; 3,
.byte 0x3
; 3,
.byte 0x2
; 2,
.byte 0x1
; 1,
.byte 0x1
; 1,
.byte 0x1
; 1,
.byte 0x0
; 0,
.byte 0x0
; 0,
.byte 0x0
; 0,
.byte 0x0
; 0,
.byte 0x0
; 0,
.byte 0x0
; 0,
.byte 0x0
; 0,
.byte 0x0
; 0,
.byte 0x0
; 0,
.byte 0x1
; 1,
.byte 0x1
; 1,
.byte 0x1
; 1,
.byte 0x2
; 2,
.byte 0x3
; 3,
.byte 0x3
; 3,
.byte 0x4
; 4,
.byte 0x5
; 5,
.byte 0x6
; 6,
.byte 0x6
; 6,
.byte 0x7
; 7,
.byte 0x9
; 9,
.byte 0xa
; 10,
.byte 0xb
; 11,
.byte 0xc
; 12,
.byte 0xe
; 14,
.byte 0xf
; 15,
.byte 0x10
; 16,
.byte 0x12
; 18,
.byte 0x14
; 20,
.byte 0x15
; 21,
.byte 0x17
; 23,
.byte 0x19
; 25,
.byte 0x1b
; 27,
.byte 0x1d
; 29,
.byte 0x1f
; 31,
.byte 0x21
; 33,
.byte 0x23
; 35,
.byte 0x25
; 37,
.byte 0x28
; 40,
.byte 0x2a
; 42,
.byte 0x2c
; 44,
.byte 0x2f
; 47,
.byte 0x31
; 49,
.byte 0x34
; 52,
.byte 0x37
; 55,
.byte 0x3a
; 58,
.byte 0x3c
; 60,
.byte 0x3f
; 63,
.byte 0x42
; 66,
.byte 0x45
; 69,
.byte 0x49
; 73,
.byte 0x4c
; 76,
.byte 0x4f
; 79,
.byte 0x52
; 82,
.byte 0x56
; 86,
.byte 0x59
; 89,
.byte 0x5d
; 93,
.byte 0x60
; 96,
.byte 0x64
; 100,
.byte 0x68
; 104,
.byte 0x6c
; 108,
.byte 0x70
; 112,
.byte 0x73
; 115,
.byte 0x78
; 120,
.byte 0x7c
; 124,
.byte 0x80
; 128,
.byte 0x84
; 132,
.byte 0x88
; 136,
.byte 0x8d
; 141,
.byte 0x91
; FrequencyCorrectionTable size 131
; 145 };
; void UpdateCorrection(void)
.dbgseg dbg_syms
DBG3:
.long 0x0
.long DBG10
.long _UpdateCorrection
.long 0x40
.long 0x1020001
.long DBG1
.long DBG7-DBG8
.long DBG9
.long DBG6
.long 0x0
.pseg RtcTempCompensation_code
DBG8:
.dbgseg dbg_syms
DBG1:
.long 0x66622e
.long 0x0
.long DBG8
.long 0x0
.long 0x1650001
.long 0x0
.long 0x145
.long 0x0
.long DBG11
.long 0x0
.dbgseg dbg_line
.align 0x2
DBG9:
.long DBG3
.long 0x0
.long _UpdateCorrection
.long 0x1
.long DBG13
.long 0x2
.long DBG14
.long 0x7
.long DBG15
.long 0x8
.long DBG16
.long 0xa
.long DBG17
.long 0xc
.long DBG18
.long 0xd
.long DBG19
.long 0xe
.long DBG20
.long 0xf
.long DBG21
.long 0x16
.long DBG22
.long 0x1d
.long DBG23
.long 0x1e
.long DBG24
.long 0x1f
.long DBG25
.long 0x21
.long DBG26
.long 0x22
.long DBG27
.long 0x23
.long DBG28
.long 0x24
.long DBG29
.long 0x26
.long DBG30
.long 0x2a
.long DBG31
.long 0x2b
.long DBG32
.long 0x2c
.pseg RtcTempCompensation_code
.global _UpdateCorrection
_UpdateCorrection:
; ENTRY
DBG12:
; tempC in reg size 2
; RtcCorrectionIndex in reg size 2
; {
DBG13:
; int tempC;
; if (UpdateTempCorrectionFlag)
DBG14:
cmp.b #0x0,&_UpdateTempCorrectionFlag
jeq UpdateCorrection_L1
DBG16:
DBG15:
; {
; uint16 RtcCorrectionIndex;
; getTemp();
call #_getTemp
DBG17:
; tempC = tempF;
mov &_tempF,r13
DBG18:
; tempC -= 32;
sub #0x20,r13
DBG19:
; tempC *= 5;
mov r13,r12
clrc
rlc r12
clrc
rlc r12
add r13,r12
DBG20:
; tempC /= 9;
mov #0x9,r13
DBG34:
call #__sdiv16
DBG21:
DBG35:
; RtcCorrectionIndex = tempC + 40;
add #0x28,r12
DBG22:
; if (RtcCorrectionIndex < (-40) )
cmp #-0x28,r12
jc UpdateCorrection_L2
DBG24:
DBG23:
; {
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -