📄 demo.lst
字号:
Sunplus u'nSP Assembler - Ver. 1.14.4
Listing File Has Been Relocated
.public _FIQ;
.public _IRQ0;
.public _IRQ1;
.public _IRQ2;
.public _IRQ3;
.public _IRQ4;
.public _IRQ5;
.public _IRQ6;
.public _IRQ7;
.public _BREAK;
//----------------------------------------------------------------------------*/
.include SPT6605.inc //hardware definition
< //============================================================================*/
< // Register address definitions */
< //============================================================================*/
< //-------------------------------*/
< // Port A, B, C, D */
< //-------------------------------*/
< .const P_IOA_Data = 0x7000; //R/W, portA data
< .const P_IOA_Buf = 0x7001; //R, port A output latch
< .const P_IOA_Dir = 0x7002; //R/W, portA direction, 0/1 = I/O
< .const P_IOA_PullR = 0x7003; //R/W, portA pull-highs & pull-lows
< .const P_IOA_Latch = 0x7004; //R, latch IO for wakeup
<
< //IOA0~6 for keyboard input
<
< //---------------------------------
< .const P_IOB_Data = 0x7005; //R/W, portB data
< .const P_IOB_Buf = 0x7006; //R, portB output latch
< .const P_IOB_Dir = 0x7007; //R/W, portB direction, 0/1 = I/O
<
< //---------------------------------
< .const P_IOC_Data = 0x7008; //R/W, portC data
< .const P_IOC_Buf = 0x7009; //R, portC output latch
< .const P_IOC_Dir = 0x700A; //R/W, portC direction
<
< //IOC4 shared pad with RDRC
< //IOC5 shared pad with RDIN
< //IOC7 shared with BatDet
<
< //---------------------------------
< .const P_IOD_Data = 0x700B; //R/W, portD data
< .const P_IOD_Buf = 0x700C; //R, portD output latch
< .const P_IOD_Dir = 0x700D; //R/W, portD direction, 0/1 = I/O
<
< //IOD5,6,7 shared with LCD signal
< //---------------------------------
< .const P_IOCD_Ctrl = 0x700E;
<
< //-------------------------------*/
< // Interrupt & Wake-Up */
< //-------------------------------*/
< .const P_Int = 0x7010; // write 0/1 - disable/enable interrupt
< // read 0/1 - interrupt is disabled/enabled
< .const P_IntClr = 0x7011; // write 1 - clear happened interrupt flag
< // read 1 - interrupt is happened
< .const P_WakeUp = 0x7012; // write 0/1 - disable/enable wake-up
< // read 0/1 - wake-up is disabled/enabled
< .const P_WakeUpClr = 0x7013; // write 1 - clear happened wake-up flag
< // read 1 - wake-up is happened
< .const B_Irq0 = 0x0001; // vector = FFF8
< .const B_RiInt = 0x0001;
<
< .const B_Irq1 = 0x0002; // vector = FFF9
< .const B_IoaInt = 0x0002;
<
< .const B_Irq2 = 0x0004; // vector = FFFA
< .const B_TmrAInt = 0x0004;
< .const B_Irq3 = 0x0008; // vector = FFFB
< .const B_TmrBInt = 0x0008;
< .const B_Irq4 = 0x0010; // vector = FFFC
< .const B_T32KHzInt = 0x0010;
< .const B_8KHzInt = 0x0010;
< .const B_Irq5 = 0x0020; // vector = FFFD
< .const B_T2KHzInt = 0x0020;
< .const B_1KHzInt = 0x0020;
< .const B_512HzInt = 0x0020;
< .const B_Irq6 = 0x0040; // vector = FFFE
< .const B_T128HzInt = 0x0040;
< .const B_T8HzInt = 0x0080;
< .const B_2HzInt = 0x0080;
< .const B_Ioc0Int = 0x0100;
< .const B_Ioc1Int = 0x0200;
< .const B_LineInt = 0x0400;
<
< //-------------------------------*/
< .const P_IoaWakeUp = 0x7014; // R/W, b7~b0=1 to enable IOA7~0 wake-up
<
< //-------------------------------*/
< // System Clock */
< //-------------------------------*/
< .const P_SystemClock = 0x7015;
< .const B_FoscDivBy1 = 0x0000;
< .const B_FoscDivBy2 = 0x0001;
< .const B_FoscDivBy4 = 0x0002;
< .const B_FoscDivBy8 = 0x0003;
< .const B_Sleep = 0x0007;
< .const B_NormalCpuClock = B_FoscDivBy4;
< .const B_10M = 0x0080;
<
< .const P_Watchdog_Clr = 0x7016; // period = 2sec
< // write 16-bit value to reset watch dog
<
< //-------------------------------*/
< // Time Base */
< //-------------------------------*/
< .const P_TimeBaseSet = 0x7018;
< // Time Base, generated by 32768Hz, is a combination of frequency selection
< // for timers and interrupt.
< .const B_Enable32768 = 0x8000;
< .const B_Strong32768 = 0x4000; // After powering on, set 32768 at strong mode
< // for 2 sec. Afterwards, change to weak mode
< .const B_1Hz = 0x0000;
< .const B_2Hz = 0x0001;
< .const B_4Hz = 0x0002;
< .const B_8Hz = 0x0003;
< .const B_16Hz = 0x0000;
< .const B_32Hz = 0x0004;
< .const B_64Hz = 0x0008;
< .const B_128Hz = 0x000C;
< .const B_256Hz = 0x0000;
< .const B_512Hz = 0x0010;
< .const B_1KHz = 0x0020;
< .const B_2KHz = 0x0030;
< .const B_4KHz = 0x0000;
< .const B_8KHz = 0x0040;
< .const B_16KHz = 0x0080;
< .const B_32KHz = 0x00C0;
<
< //-------------------------------*/
< // Timer A & B */
< //-------------------------------*/
< // Writing a value of N to P_TimerA_Data or P_TimerB_Data and selecting an
< // appropriate clock sources, the timer will count up from N, N+1, N+2, ....
< // ,FFFE, FFFF. After the timer reaches 'FFFF', and INT signal is generated
< // and is sent to INT controller for processing. At the same time, N will be
< // reloaded into timer and count up again.
<
< .const P_Tmr_Ctrl = 0x701A;
< .const P_TmrA_Data = 0x701B; // R/W, up-counter
< .const P_TmrA_Load = 0x701C; // W, write any value to load data to timer A
<
< .const P_TmrB_Data = 0x701E; // R/W, up-counter
< .const P_TmrB_Load = 0x701F; // W, write any value to load data to timer B
<
< //-------------------------------*/
< // Low Voltage Detect */
< //-------------------------------*/
< .const P_BatDet = 0x7021;
<
< .const B_EnBatDet = 0x0080;
< .const B_BatDet = 0x0020;
<
< //(0,0,0) Battery detect threshold is 2.38V @3V(default)
< //(0,0,1) Battery detect threshold is 2.46V @3V
< //(0,1,0) Battery detect threshold is 2.58V @3V
< //(0,1,1) Battery detect threshold is 2.66V @3V
< //(1,0,0) Battery detect threshold is 2.78V @3V
< //(1,0,1) Battery detect threshold is 2.88V @3V
< //(1,1,0) Battery detect threshold is 2.96V @3V
< //(1,1,1) Battery detect threshold is 3.06V @3V
<
< //-------------------------------*/
< // DTMF & Tone Generator */
< //-------------------------------*/
< .const P_DtmfTone = 0x7022;
< .const B_Tone0En = 0x0004;
< .const B_DacEn = 0x0100;
< .const B_Dac2Sel = 0x0200;
< .const B_DisableBias = 0x0400;
<
< .const P_Ch0Envelope = 0x7023;
<
< //-------------------------------*/
< // A/D & AGC */
< //-------------------------------*/
< .const P_AgcCtrl = 0x7025;
< .const B_AdcQuickCharge = 0x0080;
<
< .const P_AdcCtrl = 0x7026;
< .const P_PgaInSelect = 0x702C;
<
< .const P_Adc = 0x7027; // (R) 10-bits ADC (b15~b6)
<
< .const P_RiDet = 0x7028; // (R/W)
< .const B_RiDet = 0x0040;
< .const B_EnRiDet = 0x0080;
<
< //-------------------------------*/
< // L C D */
< //-------------------------------*/
< .const P_LcdCtrl = 0x7020;
<
< .const B_Duty = 0x8000; // 0-1/8,1-1/16
< .const B_LcdEn = 0x0080; // enable LCD
< .const B_LcdAllOn = 0x0020;
< .const B_LcdAllOff = 0x0010;
<
< //-------------------------------*/
< .const B_Com0 = 0x0001;
< .const B_Com1 = 0x0002;
< .const B_Com2 = 0x0004;
< .const B_Com3 = 0x0008;
< .const B_Com4 = 0x0010;
< .const B_Com5 = 0x0020;
< .const B_Com6 = 0x0040;
< .const B_Com7 = 0x0080;
< .const B_Com8 = 0x0100;
< .const B_Com9 = 0x0200
< .const B_Com10 = 0x0400
< .const B_Com11 = 0x0800
< .const B_Com12 = 0x1000
< .const B_Com13 = 0x2000
< .const B_Com14 = 0x4000
< .const B_Com15 = 0x8000;
<
< .const P_Seg0 = 0x7100;
< .const P_Seg1 = 0x7101;
< .const P_Seg2 = 0x7102;
< .const P_Seg3 = 0x7103;
< .const P_Seg4 = 0x7104;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -