;       SCCSID = @(#)timer.inc	6.1 90/11/17
;      SCCSID = @(#)timer.inc	13.2 89/09/22
SUBTTL	Macros and definitions for system profiling

;***	TimerOn - turn on a timer for an event
;
;	ENTRY	handle - identifier of timer channel to be used.
;
;	USES	NONE

TimerOn MACRO	handle
IFDEF	SYSTIMER
	push	ax
	mov	ax,0000h + handle
	int	INT_SYSTIMER
	pop	ax
ENDIF
ENDM


;***	TimerOff - turn off a timer
;
;	ENTRY	handle - identifier of timer channel to be used.
;
;	USES	NONE

TimerOff MACRO	handle
IFDEF	SYSTIMER
	push	ax
	mov	ax,0100h + handle
	int	INT_SYSTIMER
	pop	ax
ENDIF
ENDM


IFDEF	SYSTIMER

INT_SYSTIMER		equ	060H
ADDR_INT_SYSTIMER	equ	4 * INT_SYSTIMER

TIM_FS_TRANSPATH	equ	0B0h	; TransPath
TIM_FS_OPEN		equ	0B1h	; OpenCreate
TIM_FS_SEEK		equ	0B2h	; ChgFilePtr
TIM_FS_DEVIOCTL 	equ	0B3h	; DevIOCtl
TIM_FS_FILEMODE 	equ	0B4h	; FileMode
TIM_FS_CLOSE		equ	0B5h	; Close
TIM_FS_CHARDD		equ	0B6h	; Character device support
TIM_FS_PROCESSNAME	equ	0B7H	; FSD_Processname
TIM_FS_TRANSFILE	equ	0B8H	; TransFile
TIM_FS_TRANSDEV 	equ	0B9H	; TransDev
TIM_FS_CANPATH		equ	0BAH	; CanPath
TIM_FS_VALIDATECDS	equ	0BBH	; ValidateCDS
TIM_FS_FSCFROMCDS	equ	0BCH	; FSCFromCDS
TIM_FS_TRUNC8DOT3	equ	0BDH	; Trunc8Dot3
TIM_FS_DOSOPENCREATE	equ	0BEH	; DOS_OpenCreate


TIM_FREE_TASK		equ	0c0h	; freetask

TIM_ENTER_KMODE		equ	0d0h	; Enter_Kmode
TIM_SCI_ENTRY		equ	0d1h	; SCI entry
TIM_DEVIOCALL_ENTRY	equ	0d2h	; DevIOCall2 entry
TIM_DEVIOCALL_EXIT	equ	0d3h	; DevIOCall2 exit
TIM_SCI_EXIT		equ	0d4h	; SCI exit
TIM_EXIT_KMODE		equ	0d5h	; Exit_Kmode

TIM_BUF_LOCK		equ	0e0h	; LockBuf
TIM_BUF_UNLOCK		equ	0e1h	; UnLockBuf
TIM_BUF_GET		equ	0e2h	; GetBuffr
TIM_BUF_FREE		equ	0e3h	; GetFreeBuffr
TIM_BUF_RLSE		equ	0e4h	; RlseBuffr
TIM_BUF_PLACE		equ	0e5h	; PlaceBuf
TIM_BUF_PHEAD		equ	0e6h	; PlaceHead

ENDIF

SUBTTL
