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

📄 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
  63                     ; 13 void xwDelay(void)
  63                     ; 14 {
  65                     	switch	.text
  66  0000               _xwDelay:
  68  0000 5204          	subw	sp,#4
  69       00000004      OFST:	set	4
  72                     ; 15 	int i=2;
  74  0002 ae0002        	ldw	x,#2
  75  0005 1f01          	ldw	(OFST-3,sp),x
  76                     ; 16 	int j=200;
  78  0007 ae00c8        	ldw	x,#200
  79  000a 1f03          	ldw	(OFST-1,sp),x
  81  000c 200f          	jra	L73
  82  000e               L54:
  83                     ; 17 	while(i--)while(j--);
  85  000e 1e03          	ldw	x,(OFST-1,sp)
  86  0010 1d0001        	subw	x,#1
  87  0013 1f03          	ldw	(OFST-1,sp),x
  88  0015 1c0001        	addw	x,#1
  89  0018 a30000        	cpw	x,#0
  90  001b 26f1          	jrne	L54
  91  001d               L73:
  94  001d 1e01          	ldw	x,(OFST-3,sp)
  95  001f 1d0001        	subw	x,#1
  96  0022 1f01          	ldw	(OFST-3,sp),x
  97  0024 1c0001        	addw	x,#1
  98  0027 a30000        	cpw	x,#0
  99  002a 26e2          	jrne	L54
 100                     ; 18 }
 103  002c 5b04          	addw	sp,#4
 104  002e 81            	ret
 137                     ; 22 main()
 137                     ; 23 {
 138                     	switch	.text
 139  002f               _main:
 143                     ; 25 	UART2_DeInit();
 145  002f cd0000        	call	_UART2_DeInit
 147                     ; 27 	UART2_Init(38400,UART2_WORDLENGTH_8D,UART2_STOPBITS_1,UART2_PARITY_NO, 		  UART2_SYNCMODE_CLOCK_DISABLE, UART2_MODE_TX_ENABLE);
 149  0032 4b04          	push	#4
 150  0034 4b80          	push	#128
 151  0036 4b00          	push	#0
 152  0038 4b00          	push	#0
 153  003a 4b00          	push	#0
 154  003c ae9600        	ldw	x,#38400
 155  003f 89            	pushw	x
 156  0040 ae0000        	ldw	x,#0
 157  0043 89            	pushw	x
 158  0044 cd0000        	call	_UART2_Init
 160  0047 5b09          	addw	sp,#9
 161                     ; 29 	putStrLine("串口初始化完成.");
 163  0049 ae000b        	ldw	x,#L16
 164  004c cd0000        	call	_putStrLine
 166                     ; 31 	ADC1_DeInit();
 168  004f cd0000        	call	_ADC1_DeInit
 170                     ; 33 	ADC1_Init(ADC1_CONVERSIONMODE_CONTINUOUS,ADC1_CHANNEL_9,ADC1_PRESSEL_FCPU_D18,ADC1_EXTTRIG_TIM,DISABLE,ADC1_ALIGN_RIGHT, ADC1_SCHMITTTRIG_CHANNEL9, DISABLE);
 172  0052 4b00          	push	#0
 173  0054 4b09          	push	#9
 174  0056 4b08          	push	#8
 175  0058 4b00          	push	#0
 176  005a 4b00          	push	#0
 177  005c 4b70          	push	#112
 178  005e ae0109        	ldw	x,#265
 179  0061 cd0000        	call	_ADC1_Init
 181  0064 5b06          	addw	sp,#6
 182                     ; 35 	ADC1_StartConversion();
 184  0066 cd0000        	call	_ADC1_StartConversion
 186  0069               L36:
 187                     ; 39 		putStr("当前ADC值=");
 189  0069 ae0000        	ldw	x,#L76
 190  006c cd0000        	call	_putStr
 192                     ; 41 		putIntLine(ADC1_GetConversionValue());
 194  006f cd0000        	call	_ADC1_GetConversionValue
 196  0072 cd0000        	call	c_uitolx
 198  0075 be02          	ldw	x,c_lreg+2
 199  0077 89            	pushw	x
 200  0078 be00          	ldw	x,c_lreg
 201  007a 89            	pushw	x
 202  007b cd0000        	call	_putIntLine
 204  007e 5b04          	addw	sp,#4
 205                     ; 43 		xwDelay();
 207  0080 cd0000        	call	_xwDelay
 210  0083 20e4          	jra	L36
 223                     	xdef	_main
 224                     	xdef	_xwDelay
 225                     	xref	_ADC1_GetConversionValue
 226                     	xref	_ADC1_StartConversion
 227                     	xref	_ADC1_Init
 228                     	xref	_ADC1_DeInit
 229                     	xref	_putIntLine
 230                     	xref	_putStrLine
 231                     	xref	_putStr
 232                     	xref	_UART2_Init
 233                     	xref	_UART2_DeInit
 234                     .const:	section	.text
 235  0000               L76:
 236  0000 b5b1c7b04144  	dc.b	181,177,199,176,65,68
 237  0006 43d6          	dc.b	"C",214
 238  0008 b53d00        	dc.b	181,61,0
 239  000b               L16:
 240  000b b4aebfdab3f5  	dc.b	180,174,191,218,179,245
 241  0011 cabcbbafcdea  	dc.b	202,188,187,175,205,234
 242  0017 b3c92e00      	dc.b	179,201,46,0
 243                     	xref.b	c_lreg
 263                     	xref	c_uitolx
 264                     	end

⌨️ 快捷键说明

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