utildrv.asm
资源名称:DOS系统的源代码.rar [点击查看]
上传用户:xiaoan1112
上传日期:2013-04-11
资源大小:19621k
文件大小:1k
源码类别:
操作系统开发
开发平台:
Visual C++
- ;*
- ;* CW : Character Windows
- ;*
- ;* utildrv.asm : installable driver utility routines
- include kernel.inc
- include kmem.inc
- include indrv.inc
- include inscr.inc
- include inkbd.inc
- include insyd.inc
- include _loaddrv.inc
- ;*****************************************************************************
- ;* App call backs for memory management
- externFP <LpwAllocDriverMem,FreeDriverMem>
- ;*****************************************************************************
- sBegin KERNEL
- assumes CS,KERNEL
- assumes DS,DGROUP
- assumes SS,DGROUP
- ;********** FreeIndv ***************
- ;* entry: pindv => indv of the service to be freed
- ;* * Frees memory allocated to for the given service
- ;* * NOTE: any routine pointers into this service will be invalid
- ;* * and are not fixed up, a new service must be loaded before
- ;* * any calls
- cProc FreeIndv, <PUBLIC,FAR>
- parmW pindv
- cBegin FreeIndv
- mov bx,pindv
- mov es,[bx].psLoadedIndv
- mov ax,es:LO_lpwdataInsh
- mov dx,es:HI_lpwdataInsh
- Save <es>
- cCall <far ptr FreeDriverMem>,<dx,ax>
- xor ax,ax
- cCall <far ptr FreeDriverMem>,<es,ax>
- cEnd FreeIndv
- sEnd KERNEL
- ;*****************************************************************************
- END