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

📄 main.ls

📁 STM8s
💻 LS
字号:
   1                     ; C Compiler for STM8 (COSMIC Software)
   2                     ; Generator V4.2.8 - 03 Dec 2008
  62                     ; 13 main()
  62                     ; 14 {
  64                     	switch	.text
  65  0000               _main:
  67  0000 5204          	subw	sp,#4
  68       00000004      OFST:	set	4
  71                     ; 15 	unsigned int i=0,j=0;;
  73  0002 1e03          	ldw	x,(OFST-1,sp)
  76  0004 1e01          	ldw	x,(OFST-3,sp)
  77                     ; 17 	UART2_DeInit();
  80  0006 cd0000        	call	_UART2_DeInit
  82                     ; 19 	UART2_Init(38400,UART2_WORDLENGTH_8D,UART2_STOPBITS_1,UART2_PARITY_NO, 		  UART2_SYNCMODE_CLOCK_DISABLE, UART2_MODE_TX_ENABLE);
  84  0009 4b04          	push	#4
  85  000b 4b80          	push	#128
  86  000d 4b00          	push	#0
  87  000f 4b00          	push	#0
  88  0011 4b00          	push	#0
  89  0013 ae9600        	ldw	x,#38400
  90  0016 89            	pushw	x
  91  0017 ae0000        	ldw	x,#0
  92  001a 89            	pushw	x
  93  001b cd0000        	call	_UART2_Init
  95  001e 5b09          	addw	sp,#9
  96                     ; 21 	putStrLine("Yes,The serialsPort is already ok.");
  98  0020 ae0020        	ldw	x,#L33
  99  0023 cd0000        	call	_putStrLine
 101                     ; 23 	GPIO_DeInit(GPIOD);
 103  0026 ae500f        	ldw	x,#20495
 104  0029 cd0000        	call	_GPIO_DeInit
 106                     ; 25 	GPIO_Init(GPIOD, GPIO_PIN_0|GPIO_PIN_2|GPIO_PIN_3, GPIO_MODE_OUT_PP_LOW_FAST);
 108  002c 4be0          	push	#224
 109  002e 4b0d          	push	#13
 110  0030 ae500f        	ldw	x,#20495
 111  0033 cd0000        	call	_GPIO_Init
 113  0036 85            	popw	x
 114                     ; 26   CLK_DeInit();
 116  0037 cd0000        	call	_CLK_DeInit
 118                     ; 27  CLK_SYSCLKConfig(CLK_PRESCALER_CPUDIV4);;  //修改该参数     可改变主频
 120  003a a682          	ld	a,#130
 121  003c cd0000        	call	_CLK_SYSCLKConfig
 123                     ; 34 	for(i=0;i<=200;i++)
 126  003f 5f            	clrw	x
 127  0040 1f03          	ldw	(OFST-1,sp),x
 128  0042               L53:
 129                     ; 37      j=300000;
 131  0042 ae93e0        	ldw	x,#37856
 132  0045 1f01          	ldw	(OFST-3,sp),x
 133                     ; 39 		putStr("The Number  ");
 135  0047 ae0013        	ldw	x,#L34
 136  004a cd0000        	call	_putStr
 138                     ; 40 		putInt(i);
 140  004d 1e03          	ldw	x,(OFST-1,sp)
 141  004f cd0000        	call	c_uitolx
 143  0052 be02          	ldw	x,c_lreg+2
 144  0054 89            	pushw	x
 145  0055 be00          	ldw	x,c_lreg
 146  0057 89            	pushw	x
 147  0058 cd0000        	call	_putInt
 149  005b 5b04          	addw	sp,#4
 150                     ; 41 		putStrLine("is already put out");
 152  005d ae0000        	ldw	x,#L54
 153  0060 cd0000        	call	_putStrLine
 155                     ; 43 		GPIO_WriteReverse(GPIOD, GPIO_PIN_0|GPIO_PIN_2|GPIO_PIN_3);
 157  0063 4b0d          	push	#13
 158  0065 ae500f        	ldw	x,#20495
 159  0068 cd0000        	call	_GPIO_WriteReverse
 161  006b 84            	pop	a
 163  006c               L15:
 164                     ; 45 		while(--j);
 166  006c 1e01          	ldw	x,(OFST-3,sp)
 167  006e 1d0001        	subw	x,#1
 168  0071 1f01          	ldw	(OFST-3,sp),x
 169  0073 26f7          	jrne	L15
 170                     ; 34 	for(i=0;i<=200;i++)
 172  0075 1e03          	ldw	x,(OFST-1,sp)
 173  0077 1c0001        	addw	x,#1
 174  007a 1f03          	ldw	(OFST-1,sp),x
 177  007c 1e03          	ldw	x,(OFST-1,sp)
 178  007e a300c9        	cpw	x,#201
 179  0081 25bf          	jrult	L53
 180                     ; 49 }
 183  0083 5b04          	addw	sp,#4
 184  0085 81            	ret
 197                     	xdef	_main
 198                     	xref	_putInt
 199                     	xref	_putStrLine
 200                     	xref	_putStr
 201                     	xref	_UART2_Init
 202                     	xref	_UART2_DeInit
 203                     	xref	_GPIO_WriteReverse
 204                     	xref	_GPIO_Init
 205                     	xref	_GPIO_DeInit
 206                     	xref	_CLK_SYSCLKConfig
 207                     	xref	_CLK_DeInit
 208                     .const:	section	.text
 209  0000               L54:
 210  0000 697320616c72  	dc.b	"is already put out",0
 211  0013               L34:
 212  0013 546865204e75  	dc.b	"The Number  ",0
 213  0020               L33:
 214  0020 5965732c5468  	dc.b	"Yes,The serialsPor"
 215  0032 742069732061  	dc.b	"t is already ok.",0
 216                     	xref.b	c_lreg
 236                     	xref	c_uitolx
 237                     	end

⌨️ 快捷键说明

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