uart0isr.s

来自「zilog的实时操作系统RZK,可以移植到多种处理器上」· S 代码 · 共 65 行

S
65
字号
;********************************************************************************
; Copyright 2004, ZiLOG Inc.													*
; All Rights Reserved															*
;																				*
; This is UNPUBLISHED PROPRIETARY SOURCE CODE of ZiLOG Inc., and might			*
; contain proprietary, confidential and trade secret information of				*
; ZiLOG, our partners and parties from which this code has been licensed.		*
;																				*
; The contents of this file may not be disclosed to third parties, copied or	*
; duplicated in any form, in whole or in part, without the prior written		*
; permission of ZiLOG Inc.														*
;********************************************************************************

	.include "ez80F91.inc"
	.sect "CODE"
	.extern _RZKISRProlog
	.extern _RZKISREpilog
	.extern _SerIntTasks
	.extern _RZKResumeInterruptThread
	.assume	adl=1

	.def _uart0isr
_uart0isr:
	PUSH	AF
	PUSH	BC
	PUSH	DE
	PUSH	HL		
	PUSH	IX
	PUSH	IY
	
	ld	bc, UART0_IIR
	in	a, (bc)
	rla
	rla
	rla
	rla
	and	a, 0F0h
	ld	d, a

	ld	bc, UART0_IER
	in	a, (bc)
	or	a, d
	ld	d, a
	xor	a, a
	out	(bc), a
	ld	c, UART0_SPR
	ld	a, d
	out	(bc), a
	
	CALL	_RZKISRProlog
	ld      DE, (_SerIntTasks)
	PUSH	DE
	CALL    _RZKResumeInterruptThread
	POP		DE
	CALL	_RZKISREpilog
	
	POP	IY
	POP IX
	POP	HL
	POP	DE
	POP	BC
	POP	AF
	EI
	RETI

⌨️ 快捷键说明

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