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

📄 main.lst

📁 基本完成迷控制算法
💻 LST
📖 第 1 页 / 共 4 页
字号:
   549  000064             ;************************************************
   550  000064             @@Intface5ms:      
   551  000064   C06F              call    @@SysTimer    
   552  000065   C11A              call	@@deckeychat    
   553  000066             //	.................
   554  000066             //	.................  	
   555  000066             @@Intface5ms99:
   556  000066   6013      	b0bclr  @Sys5msIRQ  
   557  000067   0E00              ret
   558  000068             
   559  000068             
   560  000068             ;************************************************
   561  000068             ;*          Interrupt 50ms Interface            *
   562  000068             ;************************************************
   563  000068             @@Intface50ms:
   564  000068   590C      	bts1	have_key
   565  000069   806D      	jmp	@f
   566  00006A   4807      	bset	RF_remotestart_f
   567  00006B             	mov_	RF_remotedata_val+0,remote_rambuf
   568  00006B   1E00      	mov	a, remote_rambuf
   569  00006C   1F03      	mov	RF_remotedata_val+0, a
   570  00006D             	
   571  00006D             @@:
   572  00006D             	
   573  00006D             @@Intface50ms99:
   574  00006D   6113              b0bclr  @Sys50msIRQ   
   575  00006E   0E00              ret
   576  00006F             
   577  00006F             
   578  00006F             
   579  00006F             
   580  00006F             
   581  00006F             
   582  00006F             
   583  00006F             
   584  00006F             
   585  00006F             
   586  00006F             
   587  00006F             
   588  00006F             
   589  00006F             
   590  00006F             
   591  00006F             
   592  00006F             ;************************************************
   593  00006F             ;*           System Timer Routine               *
   594  00006F             ;************************************************
   595  00006F             @@SysTimer:
   596  00006F             ;	b0bts1	@Sys5msIRQ
   597  00006F             ;	jmp	@@SysTimer99
   598  00006F             	
   599  00006F             
   600  00006F   2614              decms   @Sys50msC		;count down steps to zero
   601  000070   8074              jmp     @f
   602  000071                     mov_	@Sys50msC,@Sys50msStep	;reset the steps of 10msC
   603  000071   2D0A      	mov	a, @Sys50msStep
   604  000072   1F14      	mov	@Sys50msC, a
   605  000073   6913              b0bset  @Sys50msIRQ 		;set @Sys50msIRQ=1
   606  000074                     @@:
   607  000074             
   608  000074             
   609  000074             
   610  000074             
   611  000074             
   612  000074             
   613  000074             
   614  000074             
   615  000074             
   616  000074             
   617  000074             
   618  000074             
   619  000074             
   620  000074             
   621  000074             
   622  000074             @@SysTimer99:
   623  000074   0E00          	ret
   624  000075             ;	include		bios.asm	; BIOS 
   625  000075             ;	include		sys.asm		; System Routine
   626  000075             	include		sub.asm		; Sub Routine
   627  000075             ;================================
   628  000075             ;	User's subroutine	|
   629  000075             ;================================
   630  000075             const_set:
   631  000075   2D14      	mov	a,#20
   632  000076   1F12      	mov	intwk00,a
   633  000077   0E00      	ret
   634  000078             
   635  000078             
   636  000078             
   637  000078             
   638  000078             
   639  000078             ;===========================================
   640  000078             ;	System subroutine(user select)	   |
   641  000078             ;===========================================
   642  000078             ;System Error
   643  000078             @@System_Err:
   644  000078   8078             	jmp	@@System_Err	; wait for watchdog reset the system       	
   645  000079             ;=====================================================
   646  000079             ;=====================================================
   647  000079             ;=====================================================
   648  000079             
   649  000079             ;	include		table.asm	; Data Table
   650  000079             	include		rfremote.asm	; Remote data information
   651  000079             ;================================================================
   652  000079             ;编码波形输出
   653  000079             ;Note: Encoding waveform output
   654  000079             ;Wave format:
   655  000079             ;  |<---Pilot-->|<-bit0->|<-bit1->|        |<-stop->|
   656  000079             ;    H      L    H    L     H   L              H 
   657  000079             ;  |----|       |--|     |-----|  |        |--------|
   658  000079             ;  |    |       |  |     |     |  |        |        |
   659  000079             ;  |    |       |  |     |     |  |........|        |
   660  000079             ;__|    |_______|  |_____|     |__|        |        |______
   661  000079             ;
   662  000079             ;说明:根据波形宽度设定合理的中断时间,在中断中发送波形。起始、
   663  000079             ;数字、停止位的宽度均需自行设定。宽度=中断时间×(相应设定数值+1)。
   664  000079             ;数据先传送低位再传送高位。
   665  000079             ;使用步骤如下:
   666  000079             ; 1. 设定波形输出脚位、波形脉宽
   667  000079             ; 2. 要传送的数据由低到高依次存入
   668  000079             ;    RF_remotedata_val+0、RF_remotedata_val+1.....
   669  000079             ; 3. 设定RF_remotestart_f为1
   670  000079             ; 4. call RF_remote_init 	;at @@main
   671  000079             ;    call RF_remote_process	;at @@int_rs
   672  000079             ; 5. 发送结束,RF_remotefinish_f为1
   673  000079             ;
   674  000079             ; Ram use: 4+发送字节数
   675  000079             ; stack layer: 1
   676  000079             ; Version 1.0, 02/03/2004   Author: Recal Chao	
   677  000079             ;================================================================
   678  000079             ;.data
   679  000079             ;	O_RFremote	equ	px.x	;设定波形输出脚位
   680  000079             ;	Om_RFremote	equ	pxm.x
   681  000079             
   682  000079             ;RF_pilot_Lval	equ	#	;
   683  000079             ;RF_pilot_Hval	equ	#	;
   684  000079             ;RF_bit0_Lval	equ	#	;
   685  000079             ;RF_bit0_Hval	equ	#	;
   686  000079             ;RF_bit1_Lval	equ	#	;
   687  000079             ;RF_bit1_Hval	equ	#	;
   688  000079             ;RF_stop_Lval	equ	#	;
   689  000079             ;RF_stop_Hval	equ	#	;
   690  000079             ;RF_databit_val	equ	#	;
   691  000079             
   692  000079             ;RF_remotecountH	ds	1
   693  000079             ;RF_remotecountL	ds	1
   694  000079             ;RF_remotedata_val	ds	2
   695  000079             ;RF_databit_count	ds	1
   696  000079             ;RF_remote_mode		ds	1
   697  000079             ;	1 = remote pilot, 2 = remote data, 3 = remote stop bit
   698  000079             ;RF_flag	ds	1
   699  000079             ;	RF_remotestart_f	equ	RF_flag.0	;1==satart remote
   700  000079             ;	RF_remoteover_f		equ	RF_flag.1	;1==remote temp over
   701  000079             ;	RF_remotefinish_f	equ	RF_flag.2	;1==remote finish
   702  000079             ;	RF_remotelevel_f	equ	RF_flag.3	;control output 0/1
   703  000079             ;.code
   704  000079             RF_remote_init:			;Note: call at @@main
   705  000079   5807      	bts1	RF_remotestart_f
   706  00007A   8086      	jmp	RF_remote_init90
   707  00007B   4007      	bclr	RF_remotestart_f
   708  00007C             	mov_	RF_databit_count,RF_databit_val
   709  00007C   2D08      	mov	a, RF_databit_val
   710  00007D   1F05      	mov	RF_databit_count, a
   711  00007E             	mov_	RF_remotecountH,RF_pilot_Hval
   712  00007E   2D10      	mov	a, RF_pilot_Hval
   713  00007F   1F01      	mov	RF_remotecountH, a
   714  000080             	mov_	RF_remotecountL,RF_pilot_Lval
   715  000080   2D01      	mov	a, RF_pilot_Lval
   716  000081   1F02      	mov	RF_remotecountL, a
   717  000082   2D01      	mov	a,#1
   718  000083   1F06      	mov	RF_remote_mode,a
   719  000084   4307      	bclr	RF_remotelevel_f
   720  000085   4207      	bclr	RF_remotefinish_f
   721  000086             RF_remote_init90:
   722  000086   0E00      	ret
   723  000087             ;--------------------------------
   724  000087             RF_remote_process:		;Note: call at @@int_rs
   725  000087   1E06      	mov	a,RF_remote_mode
   726  000088             	@jmp_a	4
   727  000088   13CE      	add	pcl, a
   728  000089   80B0      	jmp	RF_remote_process90
   729  00008A   808E      	jmp	RF_remote_pilot
   730  00008B   8097      	jmp	RF_remote_data
   731  00008C   80A6      	jmp	RF_remote_stop
   732  00008D   80B0      	jmp	RF_remote_process90	
   733  00008E             RF_remote_pilot:
   734  00008E   5107      	bts0	RF_remoteover_f
   735  00008F   8092      	jmp	@f
   736  000090   C0B1      	call	RF_remote
   737  000091   80B0      	jmp	RF_remote_process90
   738  000092               @@:
   739  000092   4107        	bclr	RF_remoteover_f
   740  000093   C0C6        	call	RF_remotedata_setting
   741  000094   2D02        	mov	a,#2
   742  000095   1F06        	mov	RF_remote_mode,a
   743  000096   8097        	jmp	RF_remote_data		
   744  000097             RF_remote_data:
   745  000097   5107      	bts0	RF_remoteover_f
   746  000098   809B      	jmp	@f
   747  000099   C0B1      	call	RF_remote
   748  00009A   80B0      	jmp	RF_remote_process90		
   749  00009B               @@:
   750  00009B   4107        	bclr	RF_remoteover_f
   751  00009C   C0C6      	call	RF_remotedata_setting
   752  00009D   2605      	decms	RF_databit_count
   753  00009E   8097      	jmp	RF_remote_data
   754  00009F   2D03      	mov	a,#3
   755  0000A0   1F06      	mov	RF_remote_mode,a
   756  0000A1             	mov_	RF_remotecountL,RF_stop_Lval
   757  0000A1   2D00      	mov	a, RF_stop_Lval
   758  0000A2   1F02      	mov	RF_remotecountL, a
   759  0000A3             	mov_	RF_remotecountH,RF_stop_Hval	
   760  0000A3   2D00      	mov	a, RF_stop_Hval
   761  0000A4   1F01      	mov	RF_remotecountH, a
   762  0000A5   80A6      	jmp	RF_remote_stop
   763  0000A6             RF_remote_stop:
   764  0000A6   5107      	bts0	RF_remoteover_f
   765  0000A7   80AA      	jmp	@f
   766  0000A8   C0B1      	call	RF_remote
   767  0000A9   80B0      	jmp	RF_remote_process90
   768  0000AA             @@:	
   769  0000AA   4107      	bclr	RF_remoteover_f
   770  0000AB   4A07      	bset	RF_remotefinish_f
   771  0000AC   2D00      	mov	a,#0
   772  0000AD   1F06      	mov	RF_remote_mode,a
   773  0000AE   40D1      	bclr	O_RFremote
   774  0000AF   48C1      	bset	Om_RFremote
   775  0000B0             RF_remote_process90:
   776  0000B0             ;	ret	
   777  0000B0   804F      	jmp	RF_remote_process_ret
   778  0000B1             ;--------------------------------
   779  0000B1             RF_remote:	
   780  0000B1   5B07      	bts1	RF_remotelevel_f
   781  0000B2   80BD      	jmp	RF_remoteL_level
   782  0000B3             RF_remoteH_level:
   783  0000B3   2601      	decms	RF_remotecountH
   784  0000B4   80BA      	jmp	@f
   785  0000B5   48D1      	bset	O_RFremote
   786  0000B6   48C1      	bset	Om_RFremote
   787  0000B7             		
   788  0000B7   4307      	bclr	RF_remotelevel_f
   789  0000B8   4907      	bset	RF_remoteover_f
   790  0000B9   80C5      	jmp	RF_remote90
   791  0000BA             @@:
   792  0000BA   48D1      	bset	O_RFremote
   793  0000BB   48C1      	bset	Om_RFremote
   794  0000BC   80C5      	jmp	RF_remote90
   795  0000BD             RF_remoteL_level:
   796  0000BD   2602      	decms	RF_remotecountL
   797  0000BE   80C3      	jmp	@f
   798  0000BF   40D1      	bclr	O_RFremote
   799  0000C0   48C1      	bset	Om_RFremote
   800  0000C1             	
   801  0000C1   4B07      	bset	RF_remotelevel_f
   802  0000C2   80C5      	jmp	RF_remote90
   803  0000C3             @@:	
   804  0000C3   40D1      	bclr	O_RFremote
   805  0000C4   48C1      	bset	Om_RFremote
   806  0000C5             RF_remote90:
   807  0000C5   0E00      	ret
   808  0000C6             ;--------------------------------
   809  0000C6             RF_remotedata_setting:
   810  0000C6   0904      	rrcm	RF_remotedata_val+1
   811  0000C7   0903      	rrcm	RF_remotedata_val+0
   812  0000C8             	jc	RF_remotedata_set1
   813  0000C8   7286      	b0bts0	FC
   814  0000C9   80CF      		jmp	RF_remotedata_set1
   815  0000CA             RF_remotedata_set0:
   816  0000CA             	mov_	RF_remotecountH,RF_bit0_Hval
   817  0000CA   2D02      	mov	a, RF_bit0_Hval
   818  0000CB   1F01      	mov	RF_remotecountH, a
   819  0000CC             	mov_	RF_remotecountL,RF_bit0_Lval
   820  0000CC   2D02      	mov	a, RF_bit0_Lval
   821  0000CD   1F02      	mov	RF_remotecountL, a
   822  0000CE   80D3      	jmp	RF_remotedata_setting90

⌨️ 快捷键说明

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