intr.inc

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

INC
62
字号
;********************************************************************************
; 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.														*
;********************************************************************************

	.extern	_KE_DisableInts
	.extern	_KE_EnableInts
	.extern	_KE_EnterCritical
	.extern	_KE_ExitCritical

_KE_DisableMI: MACRO
	DI
ENDMAC _KE_DisableMI

_KE_EnableMI: MACRO
	EI
ENDMAC _KE_EnableMI

_KE_CriticalBegin: MACRO
	ld		a, i											; 2
	push	af												; 4
	di														; 1
ENDMAC _KE_CriticalBegin

_KE_CriticalEnd: MACRO
	pop	bc												; 4
	ld		a, 4											; 2
	and	a, c											; 1
	jr		z, $$no_ei									; 2/3
	ei														; 1
$$no_ei:
ENDMAC _KE_CriticalEnd


EnterISR: MACRO										; 26
	push	af												; 4
	push	bc												; 4
	push	de												; 4
	push	hl												; 4
	push	ix												; 5
	push	iy												; 5
ENDMAC EnterISR

ExitISR: MACRO											; 34
	pop	iy												; 5
	pop	ix												; 5
	pop	hl												; 4
	pop	de												; 4
	pop	bc												; 4
	pop	af												; 4
	ei														; 1
	reti													; 7
ENDMAC ExitISR

⌨️ 快捷键说明

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