dhlp008.asm

来自「嵌入式RMON,RMON为Remote monitor的缩写,基于SNMP为网络」· 汇编 代码 · 共 76 行

ASM
76
字号
;************************************************************************
;* MODULE INFORMATION*
;**********************
;*     FILE     NAME:       dhlp008.asm
;*     SYSTEM   NAME:       
;*     ORIGINAL AUTHOR(S):  Paul Lemmers
;*     VERSION  NUMBER:     
;*     CREATION DATE:       1990/8/14
;*
;* DESCRIPTION: 
;*              Contains SemHandle DevHelp function.
;************************************************************************
;* CHANGES INFORMATION **
;************************
;* REVISION:    $Revision:   1.1  $
;* WORKFILE:    $Workfile:   dhlp008.asm  $
;* LOGINFO:     $Log:   D:/CPROG/MYDEV/DEVLIB/VCS/DHLP008.ASV  $
;*              
;*                 Rev 1.1   17 Dec 1990 14:30:52   PAUL
;*              included devhlp.inc and os2def.h types
;*              
;*                 Rev 1.0   14 Aug 1990 14:33:50   PAUL
;*              Initial revision.
;************************************************************************/
;
	INCLUDE	cdev.inc
	INCLUDE	devhlp.inc


_DATA	SEGMENT
	EXTRN	_DevHelp:DWORD
_DATA	ENDS

_TEXT	SEGMENT
	PUBLIC	_dev_SemHandle
;************************************************************************
;* NAME:        dev_SemHandle
;* SYNOPSIS:    USHORT dev_SemHandle(void far *phsem, int action);
;*              void far *hsem;     pointer to semaphore handle, it is
;*                                  both source and destination.
;*              int  action;        Low byte will be dh register.
;* DESCRIPTION: See DevHelp SemHandle function.
;* UNMODIFIED REGISTERS:
;*              ds bp si di
;* RETURNS:     ax = 0 -->   no error
;*              else    error code
;************************************************************************
	phsem  = 4
	action = 8
_dev_SemHandle	PROC	NEAR
	PUSH	BP
	MOV	BP,SP

	les	bx,[bp+phsem]	; get pointer to hsem
	mov	ax,es:[bx+2]	; get selector
	mov	bx,es:[bx]	; get offset
	mov	dh,[bp+action]
	mov	dl,DevHlp_SemHandle
	call	[_DevHelp]
	jc	$L000		; jump if access not allowed
	mov	dx,bx		; move the offset
	les	bx,[bp+phsem]	; get pointer to hsem
	mov	es:[bx],dx	; store hsem offset
	mov	es:[bx+2],ax	; store hsem selector
	xor	ax,ax
	jmp	short $L001
$L000:	mov	ax,0ffffh

$L001:	POP	BP
	RET
_dev_SemHandle	ENDP

_TEXT	ENDS

	END

⌨️ 快捷键说明

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