⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main.lst

📁 第二届盛群比赛之前做的一个项目
💻 LST
📖 第 1 页 / 共 4 页
字号:
文件:MAIN.c       盛群编译器版本 2.86 页次1



;  34: uchar const RxTxConf_buf[10] =
  34  0000              _RxTxConf_buf .SECTION INPAGE'CODE'
  34  0000              l_RxTxConf_buf:
  34  0000  0086        MOV [06h],A
  34  0001              _RxTxConf_buf:
  34  0001  0901        RET A,1
  34  0002  090C        RET A,12
  34  0003  0944        RET A,68
  34  0004  0920        RET A,32
  34  0005  0920        RET A,32
  34  0006  09CC        RET A,204
  34  0007  09CC        RET A,204
  34  0008  09CC        RET A,204
  34  0009  09CC        RET A,204
  34  000A  0958        RET A,88

; 129: {
 129  000B              __acsr EQU [027H]
 129  000B              __adcr EQU [026H]
 129  000B              __adrh EQU [025H]
 129  000B              __adrl EQU [024H]
 129  000B              __hdr EQU [023H]
 129  000B              __hsr EQU [022H]
 129  000B              __hcr EQU [021H]
 129  000B              __hadr EQU [020H]
 129  000B              __pwm3 EQU [01dH]
 129  000B              __pwm2 EQU [01cH]
 129  000B              __pwm1 EQU [01bH]
 129  000B              __pwm0 EQU [01aH]
 129  000B              __pfc EQU [029H]
 129  000B              __pf EQU [028H]
 129  000B              __pdc EQU [019H]
 129  000B              __pd EQU [018H]
 129  000B              __pcc EQU [017H]
 129  000B              __pc EQU [016H]
 129  000B              __pbc EQU [015H]
 129  000B              __pb EQU [014H]
 129  000B              __pac EQU [013H]
 129  000B              __pa EQU [012H]
 129  000B              __tmr1c EQU [011H]
 129  000B              __tmr1l EQU [010H]
 129  000B              __tmr1h EQU [0fH]
 129  000B              __tmr0c EQU [0eH]
 129  000B              __tmr0l EQU [0dH]
 129  000B              __tmr0h EQU [0cH]
 129  000B              __intc1 EQU [01eH]
 129  000B              __intc0 EQU [0bH]
 129  000B              __status EQU [0aH]
 129  000B              __tblh EQU [08H]
 129  000B              __tblp EQU [07H]
 129  000B              __pcl EQU [06H]
 129  000B              __acc EQU [05H]
 129  000B              __mp1 EQU [03H]
 129  000B              __iar1 EQU [02H]
 129  000B              __mp0 EQU [01H]
 129  000B              __iar0 EQU [00H]
 129  0000              @MAIN .SECTION 'CODE'
文件:MAIN.c       盛群编译器版本 2.86 页次2 

 129  0000              _main PROC
文件:MAIN.C       盛群编译器版本 2.86 页次2

 129  0000              begin:

; 132: 	keycnt=0;
 132  0000  1F00     R  CLR _keycnt
 132  0001  1F00     R  CLR _keycnt[1]

; 133: 	loopcnt=0;
 133  0002  1F00     R  CLR _loopcnt
 133  0003  1F00     R  CLR _loopcnt[1]

; 134: 	poscnt=0;	
 134  0004  1F00     R  CLR _poscnt

; 135: 	FlagRec=0;
 135  0005  3400     R  CLR _FlagRec

; 136: 	IsAlarm=0;
 136  0006  3400     R  CLR _IsAlarm

; 137: 	signstar=0;
 137  0007  3400     R  CLR _signstar

; 138: 	InitIO(); 					// Initialize IO port
 138  0008  2000     R  CALL _InitIO

; 142:     LCD_init();  
 142  0009  2000     R  CALL _LCD_init

; 143: 	 CLEARSCREEN;
 143  000A  0F01        MOV A,01h
 143  000B  0080     R  MOV LCD_en_command0,A
 143  000C  2000     R  CALL _LCD_en_command

; 144: 	 Delay(100);
 144  000D  0F64        MOV A,064h
 144  000E  0080     R  MOV Delay0,A
 144  000F  2000     R  CALL _Delay

; 146: 	LCD_write_string(0,LINE1,"   Car Partner");
 146  0010  0F00        MOV A,00h
 146  0011  0080     R  MOV LCD_write_string0,A
 146  0012  0F00        MOV A,00h
 146  0013  0080     R  MOV LCD_write_string1,A
 146  0014  0F00     R  MOV A,OFFSET L2
 146  0015  0080     R  MOV LCD_write_string2,A
 146  0016  2000     R  CALL _LCD_write_string

; 147: 	LCD_write_string(0,LINE2," Ready");
 147  0017  0F00        MOV A,00h
 147  0018  0080     R  MOV LCD_write_string0,A
 147  0019  0F01        MOV A,01h
 147  001A  0080     R  MOV LCD_write_string1,A
 147  001B  0F00     R  MOV A,OFFSET L3
 147  001C  0080     R  MOV LCD_write_string2,A
 147  001D  2000     R  CALL _LCD_write_string

; 148: 	 Delay(100);
文件:MAIN.c       盛群编译器版本 2.86 页次3 

 148  001E  0F64        MOV A,064h
 148  001F  0080     R  MOV Delay0,A
 148  0020  2000     R  CALL _Delay

; 150: 	Config905();				// Config nRF905 module
 150  0021  2000     R  CALL _Config905

; 151: 	SetTxMode();				// Set Tx Mode
 151  0022  2000     R  CALL _SetTxMode

; 152: 	TxPacket();					// Transmit Tx buffer data
 152  0023  2000     R  CALL _TxPacket

; 153: 	Delay(500);					// delay for led light	
 153  0024  0FF4        MOV A,0f4h
 153  0025  0080     R  MOV Delay0,A
 153  0026  2000     R  CALL _Delay

; 155: 	SetRxMode();				// Set nRF905 in Rx mode
 155  0027  2000     R  CALL _SetRxMode
文件:MAIN.C       盛群编译器版本 2.86 页次3


; 157: 	FlagRec=0;
 157  0028  3400     R  CLR _FlagRec
 157  0029  2800     R  JMP L5
 157  002A              L4:

; 161: 		if (_pa0==0)
 161  002A  3C12        SZ [012H].0
 161  002B  2800     R  JMP L7

; 165: 			Delay(10);
 165  002C  0F0A        MOV A,0ah
 165  002D  0080     R  MOV Delay0,A
 165  002E  2000     R  CALL _Delay

; 166: 			if (_pa0==0)
 166  002F  3C12        SZ [012H].0
 166  0030  2800     R  JMP L9

; 168: 				keycnt=0;
 168  0031  1F00     R  CLR _keycnt
 168  0032  1F00     R  CLR _keycnt[1]
 168  0033  2800     R  JMP L12
 168  0034              L11:

; 172: 					if(keycnt<65000)
 172  0034  0700     R  MOV A,_keycnt[1]
 172  0035  0AFD        SUB A,0fdh
 172  0036  380A        SNZ [0ah].0
 172  0037  2800     R  JMP L47
 172  0038  390A        SNZ [0ah].2
 172  0039  2800     R  JMP L14
 172  003A  0700     R  MOV A,_keycnt
 172  003B  0AE8        SUB A,0e8h
 172  003C  3C0A        SZ [0ah].0
 172  003D  2800     R  JMP L14
 172  003E              L47:

; 173: 						keycnt++;
文件:MAIN.c       盛群编译器版本 2.86 页次4 

 173  003E  1480     R  INC _keycnt
 173  003F  3D0A        SZ [0AH].2
 173  0040  1480     R  INC _keycnt[1]
 173  0041              L14:
 173  0041              L12:

; 169: 				while(_pa0!=1)
 169  0041  3812        SNZ [012H].0
 169  0042  2800     R  JMP L11

; 176: 				if((keycnt>60000) && IsAlarm)
 176  0043  0FEA        MOV A,0eah
 176  0044  0200     R  SUB A,_keycnt[1]
 176  0045  380A        SNZ [0ah].0
 176  0046  2800     R  JMP L48
 176  0047  390A        SNZ [0ah].2
 176  0048  2800     R  JMP L16
 176  0049  0F60        MOV A,060h
 176  004A  0200     R  SUB A,_keycnt
 176  004B  3C0A        SZ [0ah].0
 176  004C  2800     R  JMP L16
 176  004D              L48:
 176  004D  3800     R  SNZ _IsAlarm
文件:MAIN.C       盛群编译器版本 2.86 页次4

 176  004E  2800     R  JMP L16

; 178: 					Scankey(0x02);
 178  004F  0F02        MOV A,02h
 178  0050  0080     R  MOV Scankey0,A
 178  0051  2000     R  CALL _Scankey

; 179: 					LCD_write_char(15,LINE1,'*');
 179  0052  0F0F        MOV A,0fh
 179  0053  0080     R  MOV LCD_write_char0,A
 179  0054  0F00        MOV A,00h
 179  0055  0080     R  MOV LCD_write_char1,A
 179  0056  0F2A        MOV A,02ah
 179  0057  0080     R  MOV LCD_write_char2,A
 179  0058  2000     R  CALL _LCD_write_char

; 180: 				}	
 180  0059  2800     R  JMP L17
 180  005A              L16:

; 182: 					Scankey(0x01);
 182  005A  0F01        MOV A,01h
 182  005B  0080     R  MOV Scankey0,A
 182  005C  2000     R  CALL _Scankey
 182  005D              L17:

; 183: 				signstar=1;	
 183  005D  3000     R  SET _signstar
 183  005E              L9:
 183  005E              L7:

; 186: 		if(_pa1==0)
 186  005E  3C92        SZ [012H].1
 186  005F  2800     R  JMP L18

; 189: 			_delay(4000);
文件:MAIN.c       盛群编译器版本 2.86 页次5 

 189  0060  0F03        MOV A,03H
 189  0061  0080     E  MOV RH,A
 189  0062  0FE5        MOV A,0e5H
 189  0063  2000     E  CALL __DELAYY1

; 191: 			if (_pa1==0)
 191  0064  3C92        SZ [012H].1
 191  0065  2800     R  JMP L20
 191  0066              L22:
 191  0066              L23:

; 193: 				while(_pa1==0);
 193  0066  3892        SNZ [012H].1
 193  0067  2800     R  JMP L22

; 194: 				CLEARSCREEN;
 194  0068  0F01        MOV A,01h
 194  0069  0080     R  MOV LCD_en_command0,A
 194  006A  2000     R  CALL _LCD_en_command

; 195: 				loopcnt=0;
 195  006B  1F00     R  CLR _loopcnt
 195  006C  1F00     R  CLR _loopcnt[1]

; 196: 				poscnt=0;
 196  006D  1F00     R  CLR _poscnt

; 197: 				FlagRec=0;
 197  006E  3400     R  CLR _FlagRec

; 198: 				IsAlarm=0;
 198  006F  3400     R  CLR _IsAlarm

; 199: 				signstar=0;
文件:MAIN.C       盛群编译器版本 2.86 页次5

 199  0070  3400     R  CLR _signstar

; 200: 				LCD_write_char(15,LINE1,' ');
 200  0071  0F0F        MOV A,0fh
 200  0072  0080     R  MOV LCD_write_char0,A
 200  0073  0F00        MOV A,00h
 200  0074  0080     R  MOV LCD_write_char1,A
 200  0075  0F20        MOV A,020h
 200  0076  0080     R  MOV LCD_write_char2,A
 200  0077  2000     R  CALL _LCD_write_char

; 201: 			  	_delay(1000);
 201  0078  0FF9        MOV A,0f9H
 201  0079  2000     E  CALL __DELAYX0

; 203: 	 			LCD_write_string(0,LINE1," Car Partner");
 203  007A  0F00        MOV A,00h
 203  007B  0080     R  MOV LCD_write_string0,A
 203  007C  0F00        MOV A,00h
 203  007D  0080     R  MOV LCD_write_string1,A
 203  007E  0F00     R  MOV A,OFFSET L25
 203  007F  0080     R  MOV LCD_write_string2,A
 203  0080  2000     R  CALL _LCD_write_string

; 204: 				_delay(1000);
文件:MAIN.c       盛群编译器版本 2.86 页次6 

 204  0081  0FF9        MOV A,0f9H
 204  0082  2000     E  CALL __DELAYX0
 204  0083              L20:
 204  0083              L18:

; 208: 		if(DR)
 208  0083  3992        SNZ [012H].3
 208  0084  2800     R  JMP L26

; 211: 		 	RxPacket();			// ... recive data
 211  0085  2000     R  CALL _RxPacket
 211  0086              L26:

; 221: 		if((FlagRec==0) && (loopcnt++>20000))
 221  0086  3C00     R  SZ _FlagRec
 221  0087  2800     R  JMP L28
 221  0088  0700     R  MOV A,_loopcnt
 221  0089  0080     R  MOV b0_1,A
 221  008A  0700     R  MOV A,_loopcnt[1]
 221  008B  0080     R  MOV b0_1[1],A
 221  008C  1480     R  INC _loopcnt
 221  008D  3D0A        SZ [0AH].2
 221  008E  1480     R  INC _loopcnt[1]
 221  008F  0F4E        MOV A,04eh
 221  0090  0200     R  SUB A,b0_1[1]
 221  0091  380A        SNZ [0ah].0
 221  0092  2800     R  JMP L49
 221  0093  390A        SNZ [0ah].2
 221  0094  2800     R  JMP L28
 221  0095  0F20        MOV A,020h
 221  0096  0200     R  SUB A,b0_1
 221  0097  3C0A        SZ [0ah].0
 221  0098  2800     R  JMP L28
 221  0099              L49:

; 223: 			loopcnt=0;
 223  0099  1F00     R  CLR _loopcnt
 223  009A  1F00     R  CLR _loopcnt[1]

; 224: 			for(j=0;j<16;j++)
文件:MAIN.C       盛群编译器版本 2.86 页次6

 224  009B  1F00     R  CLR CR1
 224  009C  2800     R  JMP L33
 224  009D              L30:

; 225: 				LCD_write_char(j,LINE2,' ');	
 225  009D  0700     R  MOV A,CR1
 225  009E  0080     R  MOV LCD_write_char0,A
 225  009F  0F01        MOV A,01h
 225  00A0  0080     R  MOV LCD_write_char1,A
 225  00A1  0F20        MOV A,020h
 225  00A2  0080     R  MOV LCD_write_char2,A
 225  00A3  2000     R  CALL _LCD_write_char
 225  00A4              L31:

; 224: 			for(j=0;j<16;j++)
 224  00A4  1480     R  INC CR1
 224  00A5              L33:
 224  00A5  0700     R  MOV A,CR1
文件:MAIN.c       盛群编译器版本 2.86 页次7 

 224  00A6  0A10        SUB A,010h
 224  00A7  380A        SNZ [0ah].0
 224  00A8  2800     R  JMP L30

; 226: 			if(!signstar)		
 226  00A9  3C00     R  SZ _signstar
 226  00AA  2800     R  JMP L34

; 227: 				LCD_write_char(poscnt,LINE2,'>');
 227  00AB  0700     R  MOV A,_poscnt
 227  00AC  0080     R  MOV LCD_write_char0,A
 227  00AD  0F01        MOV A,01h
 227  00AE  0080     R  MOV LCD_write_char1,A
 227  00AF  0F3E        MOV A,03eh
 227  00B0  0080     R  MOV LCD_write_char2,A
 227  00B1  2000     R  CALL _LCD_write_char
 227  00B2  2800     R  JMP L35
 227  00B3              L34:

; 229: 				LCD_write_char(poscnt,LINE2,'*');				
 229  00B3  0700     R  MOV A,_poscnt
 229  00B4  0080     R  MOV LCD_write_char0,A
 229  00B5  0F01        MOV A,01h
 229  00B6  0080     R  MOV LCD_write_char1,A
 229  00B7  0F2A        MOV A,02ah
 229  00B8  0080     R  MOV LCD_write_char2,A
 229  00B9  2000     R  CALL _LCD_write_char
 229  00BA              L35:

; 230: 			if(poscnt++>15)
 230  00BA  0700     R  MOV A,_poscnt
 230  00BB  0080     R  MOV b0_1,A
 230  00BC  1480     R  INC _poscnt
 230  00BD  0F0F        MOV A,0fh
 230  00BE  0200     R  SUB A,b0_1
 230  00BF  3C0A        SZ [0ah].0
 230  00C0  2800     R  JMP L36

; 231: 				poscnt=0;	
 231  00C1  1F00     R  CLR _poscnt
 231  00C2              L36:
 231  00C2              L28:

; 233: 		if((FlagRec==1)&&(alarmcnt++>10000))
 233  00C2  3800     R  SNZ _FlagRec
 233  00C3  2800     R  JMP L38
文件:MAIN.C       盛群编译器版本 2.86 页次7

 233  00C4  0700     R  MOV A,_alarmcnt
 233  00C5  0080     R  MOV b0_1,A
 233  00C6  0700     R  MOV A,_alarmcnt[1]
 233  00C7  0080     R  MOV b0_1[1],A
 233  00C8  1480     R  INC _alarmcnt
 233  00C9  3D0A        SZ [0AH].2
 233  00CA  1480     R  INC _alarmcnt[1]
 233  00CB  0F27        MOV A,027h
 233  00CC  0200     R  SUB A,b0_1[1]
 233  00CD  380A        SNZ [0ah].0
 233  00CE  2800     R  JMP L50
 233  00CF  390A        SNZ [0ah].2
文件:MAIN.c       盛群编译器版本 2.86 页次8 

 233  00D0  2800     R  JMP L38
 233  00D1  0F10        MOV A,010h
 233  00D2  0200     R  SUB A,b0_1
 233  00D3  3C0A        SZ [0ah].0
 233  00D4  2800     R  JMP L38
 233  00D5              L50:

; 235: 			if(FlagShowAlarm)
 235  00D5  3800     R  SNZ _FlagShowAlarm
 235  00D6  2800     R  JMP L40

; 237: 				if(IsAlarm)
 237  00D7  3800     R  SNZ _IsAlarm
 237  00D8  2800     R  JMP L42

; 238: 					LCD_write_string(7,LINE2,"Alarm");	

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -