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

📄 startup.lst

📁 一个瑞萨单片机的程序。。。供大家学习用。。。。。。。。。。。。。。。。。。
💻 LST
📖 第 1 页 / 共 3 页
字号:
   134                                  ; SFR section definition for M16C/60 series 
   135                                  ;==============================================================================
   136                                          .include	\work\startup\target.inc; for R8C/Tiny series
   137                           1      ;""FILE COMMENT""**************************************************************
   138                           1      ;  System Name : for eduction (NO TRANSFERRING)
   139                           1      ;  File Name   : targetiinc
   140                           1      ;  Contents    : SFR definition file(assembly language) for R8C/Tiny series
   141                           1      ;  Model       : for OAKS8-LCD Board
   142                           1      ;  CPU         : R8C/Tiny series
   143                           1      ;  Assembler   : as30(V.5.10.00)
   144                           1      ;  Linker      : ln30(V.5.10.01)
   145                           1      ;  Programer   : RENESAS Semiconductor Training Center
   146                           1      ;  Note        : for OAKS8-R5F21114FP(R8C/11 group,20MHz)
   147                           1      ;******************************************************************************
   148                           1      ; COPYRIGHT(C) 2004 RENESAS TECHNOLOGY CORPORATION
   149                           1      ; AND RENESAS SOLUTIONS CORPORATION ALL RIGHTS RESERVED
   150                           1      ;******************************************************************************
   151                           1      ; History      : ---
   152                           1      ;""FILE COMMENT END""**********************************************************
   153                           1      
   154                           1      ;******************************************************************************
   155                           1      ;               define SFR symbol
   156                           1      ;******************************************************************************
   157                           1      ;------------------------------------------------------------------------------
   158                           1      ;  processor mode register 0
   159                           1      ;------------------------------------------------------------------------------
   160  00000004h                1      pm0		.equ		0004h
   161                           1      ;------------------------------------------------------------------------------
   162                           1      ;  processor mode register 1
   163                           1      ;------------------------------------------------------------------------------
   164  00000005h                1      pm1		.equ		0005h
   165                           1      ;------------------------------------------------------------------------------
   166                           1      ;  system clock control register 0
   167                           1      ;------------------------------------------------------------------------------
   168  00000006h                1      cm0		.equ		0006h
   169                           1      ;------------------------------------------------------------------------------
   170                           1      ;  system clock control register 1
   171                           1      ;------------------------------------------------------------------------------
   172  00000007h                1      cm1		.equ		0007h
   173                           1      ;------------------------------------------------------------------------------
   174                           1      ;  protect register
   175                           1      ;------------------------------------------------------------------------------
   176  0000000Ah                1      prcr		.equ		000ah
   177                           1      ;
   178  0,0000000Ah              1      prc0		.btequ		0,prcr	; bit for permitting writing
   179                           1      					; system clock control register 0, 1 
   180                           1      					; oscillation stop detection register 
   181                           1      					; high speed ring control register 0, 1
   182  1,0000000Ah              1      prc1		.btequ		1,prcr	; bit for permitting writing
   183                           1                                      	; processor mode register 0, 1
   184  2,0000000Ah              1      prc2		.btequ		2,prcr	; bit for permitting writing 
   185                           1      					; port P0 direction register 
   186                           1      ;------------------------------------------------------------------------------
* R8C/Tiny SERIES ASSEMBLER *   SOURCE LIST       Thu Oct 14 17:30:55 2004  PAGE 004

  SEQ.  LOC.   OBJ.              0XMSDA ....*....SOURCE STATEMENT....7....*....8....*....9....*....0....*....1....*....2....*....3....*....4

   187                           1      ;   oscillation stop detection register
   188                           1      ;------------------------------------------------------------------------------
   189  0000000Ch                1      ocd		.equ		000ch
   190                           1      ;------------------------------------------------------------------------------
   191                           1      ;  port P1 register 
   192                           1      ;------------------------------------------------------------------------------
   193  000000E1h                1      p1      	.equ    	000E1H
   194                           1      
   195  6,000000E1h              1      p1_6    	.btequ  	6,000E1H; bit 6 of port P1
   196  7,000000E1h              1      p1_7    	.btequ  	7,000E1H; bit 7 of port P1
   197                           1      ;------------------------------------------------------------------------------
   198                           1      ;  port P1 direction register
   199                           1      ;------------------------------------------------------------------------------
   200  000000E3h                1      pd1     	.equ    	000E3H	; port P1 direction register
   201                           1      
   202                           1      ;------------------------------------------------------------------------------
   203                           1      ;  port P4 register
   204                           1      ;------------------------------------------------------------------------------
   205  000000E8h                1      p4		.equ    	000E8H
   206  5,000000E8h              1      p4_5		.btequ  	5,000E8H; bit 5 of port P4(SW20 return input)
   207                           1      
   208                           1      ;------------------------------------------------------------------------------
   209                           1      ;  INT0 interrupt control register
   210                           1      ;------------------------------------------------------------------------------
   211  0000005Dh                1      int0ic		.equ		0005DH	
   212  3,0000005Dh              1      ir_int0ic	.btequ		3,0005DH; INT0 interrupt request bit 
   213                           1      
   214                           1      ;******************************************************************************
   215                           1      ;       end of file
   216                           1      ;******************************************************************************
   217                                   											; SFR sectio
   218                                  ;==============================================================================
   219                                  ; define macro
   220                                  ;==============================================================================
   221                                  ;-------------------------------------------------------------------------------
   222                                  ; define macro to clear section for static variable without initial value with 0
   223                                  ;-------------------------------------------------------------------------------
   224                             D    N_BZERO	.macro	TOP_ ,SECT_
   225                             D    	mov.b	#00H, R0L
   226                             D    	mov.w	#(TOP_ & 0FFFFH), A1
   227                             D    	mov.w	#sizeof	SECT_ ,	R3
   228                             D    	sstr.b	
   229                                  	.endm
   230                                  ;-------------------------------------------------------------------------------
   231                                  ; define macro to transfer initial value to section for static variable with initial value
   232                                  ;-------------------------------------------------------------------------------
   233                             D    N_BCOPY	.macro	FROM_,TO_,SECT_
   234                             D    	mov.w	#(FROM_	& 0FFFFH),A0
   235                             D    	mov.b	#(FROM_	>>16),R1H
   236                             D    	mov.w	#TO_ ,A1
   237                             D    	mov.w	#sizeof	SECT_ ,	R3
   238                             D    	smovf.b
   239                                  	.endm
   240                                  ;==============================================================================
   241                                  ; start up program section
   242                                  ;==============================================================================
   243                                  	.section	startup			; start up program section
   244                                  ;
   245                                  	.glb		start
   246                                  	.glb		_main
   247                                  	.glb		_exit
   248                                  	.glb		$exit
* R8C/Tiny SERIES ASSEMBLER *   SOURCE LIST       Thu Oct 14 17:30:55 2004  PAGE 005

  SEQ.  LOC.   OBJ.              0XMSDA ....*....SOURCE STATEMENT....7....*....8....*....9....*....0....*....1....*....2....*....3....*....4

   249  00000                           start:							; start address of start up program
   250  00000  EB40FF06                 	ldc			#06FFH,ISP		; initialize interrupt stack pointer(ISP)
   251                                  ; -----	initialize processor mode register -----
   252  00004  7E9F5100                 	bset		prc1			; enable to write
   253                                  								; processor mode register 0,1
   254  00008  B70400                Z  	mov.b		#00000000B,pm0	; single chip mode
   255  0000B  B70500                Z  	mov.b		#00000000B,pm1	; no expand, no wait
   256  0000E  7E8F5100                 	bclr		prc1			; disable to write
   257                                  					       		; processor mode register 0,1
   258                                  ; -----	initialize system clock control register -----
   259  00012  7E9F5000                 	bset		prc0			; enable to write
   260                                  								; system clock control register 0, 1
   261  00016  C7080600              S  	mov.b		#00001000B,cm0	; oscillate main clock
   262  0001A  C7080700              S  	mov.b		#00001000B,cm1	; no main clock division
   263  0001E  B70C00                Z  	mov.b		#00H,ocd		; oscillation stop detection register:select main cl
   264  00021  7E8F5000                 	bclr		prc0			; disable to write
   265                                  								; system clock control register 0, 1
   266                                  ;===============================================================================
   267                                  
   268  00025  EB300000                 	ldc			#0H,FLG			; initialize FLG register
   269  00029  EB700000                 	ldc			#0H,FB			; initialize FB register
   270  0002D  EB600004                 	ldc			#data_NE_top,SB	; initialize SB register

⌨️ 快捷键说明

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