SEMAPHOR.ASM
资源名称:ertos.rar [点击查看]
上传用户:sunrenlu
上传日期:2022-06-13
资源大小:1419k
文件大小:1k
源码类别:
操作系统开发
开发平台:
DOS
- PAGE 66,132
- ;
- ;
- ;
- ;
- ;
- ;
- ;
- ;
- ; semaphor
- ;
- ; perform semaphor stuff
- ;
- ; (c) 1990 Erick Engelke
- ;
- ;
- ;
- include masmdefs.hsm
- include model.hsm
- codedef semaphor
- datadef
- ;*************************************************************************
- ; USAGE: int sem_up( UINT far * p)
- ; 1 on failure
- ; 0 on success
- ;*************************************************************************
- cstart semaphor
- cpublic sem_up
- mov AX, 1
- les DI, +@AB [BP] ; get pointer
- xchg AX, word ptr ES:[DI] ; perform swap
- creturn sem_up
- cend semaphor
- end