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

📄 testio.s

📁 通过AT90S2313控制可控硅实现对机电系统的控制
💻 S
字号:
	.module testio.c
	.area text(rom, con, rel)
	.dbfile D:\mydesign\TESTio\testio.c
	.dbfunc s port_init _port_init fI
	.even
_port_init::
	.dbline -1
	.dbline 9
; //ICC-AVR application builder : 02-8-3 11:31:04
;      // Target : 2313
;      // Crystal: 8.0000Mhz
;      
;      #include <io2313.h>
;      #include <macros.h>
;      
;      void  port_init(void)
;      {
	.dbline 10
; 	 DDRB =0xFF;//out
	ldi R24,255
	out 0x17,R24
	.dbline 11
;      DDRD =0x00;//in
	clr R2
	out 0x11,R2
	.dbline 12
;      PORTD=0x00;
	out 0x12,R2
	.dbline -2
	.dbline 17
;      /* PORTB = 0x00;//set as input
;       DDRB  = 0x00; 
;       PORTD = 0x7F;//set as output
;       DDRD  = 0x7F;*/ 
;      }
L1:
	.dbline 0 ; func end
	ret
	.dbfunc s circul _circul fI
	.even
_circul::
	.dbline -1
	.dbline 19
	.dbline 21
	in R24,0x10
	andi R24,1
	cpi R24,1
	brne L3
	.dbline 22
	ldi R24,16
	in R2,0x18
	eor R2,R24
	out 0x18,R2
L3:
	.dbline -2
	.dbline 23
; 	 void circul(void)
; 	 {
; 	 
; 	 if ((PIND&0x01) ==1)
; 	 PORTB^=0x10;
; 	 }
L2:
	.dbline 0 ; func end
	ret
	.dbfunc s main _main fI
	.even
_main::
	.dbline -1
	.dbline 25
; 	 void main(void)
; 	 {
	.dbline 26
; 	 port_init();
	rcall _port_init
	rjmp L7
L6:
	.dbline 28
	rcall _circul
L7:
	.dbline 27
	rjmp L6
X0:
	.dbline -2
	.dbline 30
; 	 while(1)
; 	 circul();
; 	 
; 	 }
L5:
	.dbline 0 ; func end
	ret

⌨️ 快捷键说明

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