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

📄 main.ls

📁 STM8s
💻 LS
字号:
   1                     ; C Compiler for STM8 (COSMIC Software)
   2                     ; Parser V4.9.2 - 29 Jun 2010
   3                     ; Generator V4.3.5 - 02 Jul 2010
  75                     ; 13 main()
  75                     ; 14 {
  77                     	switch	.text
  78  0000               _main:
  80  0000 5204          	subw	sp,#4
  81       00000004      OFST:	set	4
  84                     ; 15 	unsigned int i=0,j=0;;
  88  0002 5f            	clrw	x
  89  0003 1f01          	ldw	(OFST-3,sp),x
  90                     ; 17 	UART2_DeInit();
  93  0005 cd0000        	call	_UART2_DeInit
  95                     ; 19 	UART2_Init(38400,UART2_WORDLENGTH_8D,UART2_STOPBITS_1,UART2_PARITY_NO, 		  UART2_SYNCMODE_CLOCK_DISABLE, UART2_MODE_TX_ENABLE);
  97  0008 4b04          	push	#4
  98  000a 4b80          	push	#128
  99  000c 4b00          	push	#0
 100  000e 4b00          	push	#0
 101  0010 4b00          	push	#0
 102  0012 ae9600        	ldw	x,#38400
 103  0015 89            	pushw	x
 104  0016 ae0000        	ldw	x,#0
 105  0019 89            	pushw	x
 106  001a cd0000        	call	_UART2_Init
 108  001d 5b09          	addw	sp,#9
 109                     ; 21 	putStrLine("串口初始化完成.");
 111  001f ae000c        	ldw	x,#L33
 112  0022 cd0000        	call	_putStrLine
 114                     ; 23 	GPIO_DeInit(GPIOD);
 116  0025 ae500f        	ldw	x,#20495
 117  0028 cd0000        	call	_GPIO_DeInit
 119                     ; 25 	GPIO_Init(GPIOD, GPIO_PIN_0|GPIO_PIN_2|GPIO_PIN_3, GPIO_MODE_OUT_PP_LOW_FAST);
 121  002b 4be0          	push	#224
 122  002d 4b0d          	push	#13
 123  002f ae500f        	ldw	x,#20495
 124  0032 cd0000        	call	_GPIO_Init
 126  0035 85            	popw	x
 127                     ; 28 	FLASH_DeInit();
 129  0036 cd0000        	call	_FLASH_DeInit
 131                     ; 30 	FLASH_Unlock(FLASH_MEMTYPE_DATA);
 133  0039 a601          	ld	a,#1
 134  003b cd0000        	call	_FLASH_Unlock
 136                     ; 32 	for(i=0;i<=20;i++)
 138  003e 5f            	clrw	x
 139  003f 1f03          	ldw	(OFST-1,sp),x
 140  0041               L54:
 141                     ; 35 		while(FLASH_GetFlagStatus(FLASH_FLAG_EOP));
 143  0041 a604          	ld	a,#4
 144  0043 cd0000        	call	_FLASH_GetFlagStatus
 146  0046 4d            	tnz	a
 147  0047 26f8          	jrne	L54
 148                     ; 37 		FLASH_ProgramByte(0x4000+i,i);
 150  0049 7b04          	ld	a,(OFST+0,sp)
 151  004b 88            	push	a
 152  004c 1e04          	ldw	x,(OFST+0,sp)
 153  004e 1c4000        	addw	x,#16384
 154  0051 cd0000        	call	c_uitolx
 156  0054 be02          	ldw	x,c_lreg+2
 157  0056 89            	pushw	x
 158  0057 be00          	ldw	x,c_lreg
 159  0059 89            	pushw	x
 160  005a cd0000        	call	_FLASH_ProgramByte
 162  005d 5b05          	addw	sp,#5
 163                     ; 39 		putStr("地址");
 165  005f ae0007        	ldw	x,#L15
 166  0062 cd0000        	call	_putStr
 168                     ; 40 		putInt(0x4000+i);
 170  0065 1e03          	ldw	x,(OFST-1,sp)
 171  0067 1c4000        	addw	x,#16384
 172  006a cd0000        	call	c_uitolx
 174  006d be02          	ldw	x,c_lreg+2
 175  006f 89            	pushw	x
 176  0070 be00          	ldw	x,c_lreg
 177  0072 89            	pushw	x
 178  0073 cd0000        	call	_putInt
 180  0076 5b04          	addw	sp,#4
 181                     ; 41 		putStrLine("已写完");
 183  0078 ae0000        	ldw	x,#L35
 184  007b cd0000        	call	_putStrLine
 186                     ; 43 		GPIO_WriteReverse(GPIOD, GPIO_PIN_0|GPIO_PIN_2|GPIO_PIN_3);
 188  007e 4b0d          	push	#13
 189  0080 ae500f        	ldw	x,#20495
 190  0083 cd0000        	call	_GPIO_WriteReverse
 192  0086 84            	pop	a
 194  0087               L75:
 195                     ; 45 		while(--j);
 197  0087 1e01          	ldw	x,(OFST-3,sp)
 198  0089 1d0001        	subw	x,#1
 199  008c 1f01          	ldw	(OFST-3,sp),x
 200  008e 26f7          	jrne	L75
 201                     ; 32 	for(i=0;i<=20;i++)
 203  0090 1e03          	ldw	x,(OFST-1,sp)
 204  0092 1c0001        	addw	x,#1
 205  0095 1f03          	ldw	(OFST-1,sp),x
 208  0097 1e03          	ldw	x,(OFST-1,sp)
 209  0099 a30015        	cpw	x,#21
 210  009c 25a3          	jrult	L54
 211  009e               L36:
 212                     ; 48 	while (1);
 214  009e 20fe          	jra	L36
 227                     	xdef	_main
 228                     	xref	_FLASH_GetFlagStatus
 229                     	xref	_FLASH_ProgramByte
 230                     	xref	_FLASH_DeInit
 231                     	xref	_FLASH_Unlock
 232                     	xref	_putInt
 233                     	xref	_putStrLine
 234                     	xref	_putStr
 235                     	xref	_UART2_Init
 236                     	xref	_UART2_DeInit
 237                     	xref	_GPIO_WriteReverse
 238                     	xref	_GPIO_Init
 239                     	xref	_GPIO_DeInit
 240                     .const:	section	.text
 241  0000               L35:
 242  0000 d2d1d0b4cdea  	dc.b	210,209,208,180,205,234,0
 243  0007               L15:
 244  0007 b5d8d6b700    	dc.b	181,216,214,183,0
 245  000c               L33:
 246  000c b4aebfdab3f5  	dc.b	180,174,191,218,179,245
 247  0012 cabcbbafcdea  	dc.b	202,188,187,175,205,234
 248  0018 b3c92e00      	dc.b	179,201,46,0
 249                     	xref.b	c_lreg
 269                     	xref	c_uitolx
 270                     	end

⌨️ 快捷键说明

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