sertest.a51

来自「用于51系列单片机的串口程序源码」· A51 代码 · 共 52 行

A51
52
字号
$nomod51
$symbols
$debug
$nolist
$include(\i\rg51fb.pdf)
$list
;***********************************************
;
;
;
;***********************************************
;
$include(charname.a51)
;
EXTRN	CODE	(S_init,C_IN,C_OUT,STROUT)
;
;data_seg	segment	data
code_seg	segment	code
?stack		segment idata
;
rseg	?stack	; This will allow RL51 to automatically place the stack
stack:	ds	1
;
;
cseg at reset
	ljmp	start
;reserve interrupt vectors
;
cseg at exti0
;
cseg at timer0
;
cseg at exti1
;
cseg at timer1
;
rseg	code_seg
;
;
Start:	mov	sp,#stack
	call	s_init
	nop
	CALL	STROUT
        DB      CRet,'This is a test of the 8051 Serial port.'
	db	CRet,(LF OR 80H)
ECHO:
	call	C_IN
	call	C_OUT
	jmp	ECHO
;
	end

⌨️ 快捷键说明

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