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

📄 affiche.asm

📁 一个秒表的程序
💻 ASM
字号:

$include (c8051f000.inc)					; Include regsiter definition file.
$include (TP.inc)							; Include TP definition file.	
PROG  segment  CODE
PUBLIC   affiche
					RSEG		PROG
;----------------------------------------------------------
affiche:  PUSH 0
					PUSH PSW
					PUSH 1
					MOV R1,#2
					CLR C
					MOV C,ACC.7
          JC FON
          SETB RS_af
					SJMP PRO
    FON:  CLR  C
		      MOV C,ACC.5
					JC	PRO
					CLR RS_af
					sjmp PRO
						 
		PRO:	
		      MOV C,ACC.7
					MOV	P2.7,C
					MOV C,ACC.6
					MOV	P2.6,C
					MOV C,ACC.5
					MOV	P2.5,C
					MOV C,ACC.4
					MOV	P2.4,C
			  	SETB	EN_af
					LCALL	wait_5
					CLR		EN_af
					LCALL	wait_40
					DJNZ R1,tt
					
		  FIN:POP PSW
				  POP 0
					POP 1
				  RET
			tt: SWAP  A
          SJMP PRO
;------attente de 5 micro secondes pour la pulse EN_af------------
wait_5:	 	MOV R0,#20
			
					DJNZ R0,$	
					  					
					RET
 ;-------attente de 40 micro secondes pour s閜arer deux 閏ritures-        
wait_40: 		MOV R0,#159
			
					  DJNZ R0,$	
    									 	  					
						RET         
;-----------------------------------------------------------------
; End of file.
END

⌨️ 快捷键说明

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