📄 dhlp008.asm
字号:
;************************************************************************
;* 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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -