keep.gml
来自「开放源码的编译器open watcom 1.6.0版的源代码」· GML 代码 · 共 54 行
GML
54 行
.func _dos_keep
#include <&doshdr>
void _dos_keep( unsigned retcode, unsigned memsize );
.ixfunc2 '&TSR' &func
.funcend
.desc begin
The &func function is used to install terminate-and-stay-resident
programs ("TSR's") in memory.
The amount of memory kept for the program is
.arg memsize
paragraphs (a paragraph is 16 bytes) from the Program Segment Prefix
which is stored in the variable
.kw _psp.
The value of
.arg retcode
is returned to the parent process.
.desc end
.return begin
The &func function does not return.
.return end
.see begin
.seelist _dos_keep _chain_intr _dos_getvect _dos_setvect
.see end
.exmp begin
#include <&doshdr>
void permanent()
{
/* . */
/* . */
/* . */
}
void transient()
{
/* . */
/* . */
/* . */
}
void main()
{
/* initialize our TSR */
transient();
/*
now terminate and keep resident
the non-transient portion
*/
_dos_keep( 0, (FP_OFF( transient ) + 15) >> 4 );
}
.exmp end
.class DOS
.system
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?