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

📄 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_PROG);
 133  0039 4f            	clr	a
 134  003a cd0000        	call	_FLASH_Unlock
 136                     ; 32 	for(i=0;i<=20;i++)
 138  003d 5f            	clrw	x
 139  003e 1f03          	ldw	(OFST-1,sp),x
 140  0040               L54:
 141                     ; 34 		while(FLASH_GetFlagStatus(FLASH_FLAG_EOP));
 143  0040 a604          	ld	a,#4
 144  0042 cd0000        	call	_FLASH_GetFlagStatus
 146  0045 4d            	tnz	a
 147  0046 26f8          	jrne	L54
 148                     ; 35 		FLASH_ProgramByte(0xB000+i,i);
 150  0048 7b04          	ld	a,(OFST+0,sp)
 151  004a 88            	push	a
 152  004b 1e04          	ldw	x,(OFST+0,sp)
 153  004d 1cb000        	addw	x,#45056
 154  0050 cd0000        	call	c_uitolx
 156  0053 be02          	ldw	x,c_lreg+2
 157  0055 89            	pushw	x
 158  0056 be00          	ldw	x,c_lreg
 159  0058 89            	pushw	x
 160  0059 cd0000        	call	_FLASH_ProgramByte
 162  005c 5b05          	addw	sp,#5
 163                     ; 36 		putStr("地址");
 165  005e ae0007        	ldw	x,#L15
 166  0061 cd0000        	call	_putStr
 168                     ; 37 		putInt(0xB000+i);
 170  0064 1e03          	ldw	x,(OFST-1,sp)
 171  0066 1cb000        	addw	x,#45056
 172  0069 cd0000        	call	c_uitolx
 174  006c be02          	ldw	x,c_lreg+2
 175  006e 89            	pushw	x
 176  006f be00          	ldw	x,c_lreg
 177  0071 89            	pushw	x
 178  0072 cd0000        	call	_putInt
 180  0075 5b04          	addw	sp,#4
 181                     ; 38 		putStrLine("已写完");
 183  0077 ae0000        	ldw	x,#L35
 184  007a cd0000        	call	_putStrLine
 186                     ; 40 		GPIO_WriteReverse(GPIOD, GPIO_PIN_0|GPIO_PIN_2|GPIO_PIN_3);
 188  007d 4b0d          	push	#13
 189  007f ae500f        	ldw	x,#20495
 190  0082 cd0000        	call	_GPIO_WriteReverse
 192  0085 84            	pop	a
 194  0086               L75:
 195                     ; 41 		while(--j);
 197  0086 1e01          	ldw	x,(OFST-3,sp)
 198  0088 1d0001        	subw	x,#1
 199  008b 1f01          	ldw	(OFST-3,sp),x
 200  008d 26f7          	jrne	L75
 201                     ; 32 	for(i=0;i<=20;i++)
 203  008f 1e03          	ldw	x,(OFST-1,sp)
 204  0091 1c0001        	addw	x,#1
 205  0094 1f03          	ldw	(OFST-1,sp),x
 208  0096 1e03          	ldw	x,(OFST-1,sp)
 209  0098 a30015        	cpw	x,#21
 210  009b 25a3          	jrult	L54
 211  009d               L36:
 212                     ; 44 	while (1);
 214  009d 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 + -