Reference Section
_bioskey_add void far help_func (bkspec * const struc)
{
}
BIOSKEY_DEF (bioskey_popup,help_func,A_F1,_Con,100,-1,1);
...
{
_bioskey_add (&bioskey_popup);
}
#include <inline.h>
void far help_func (bkspec * const struc)
{
}
BIOSKEY_DEF (bioskey_popup,help_func,A_F1,_Con,100,-1,1);
...
{
mov si,offset bioskey_popup
bioskey_add ();
}
Source file _TDBKA.ASM ASM equiv BIOSKEY_ADD
...
void far display_window (bkspec * const);
void far popup_fail (bkspec * const, char causefail,
char entryfail);
BIOSKEY_DEF (bk_popup1,display_window,A_F11,_Con_Dos,100,
popup_fail,1);
BIOSKEY_DEF (bk_popup2,display_window,A_TAB,_Con_Dos,100,-1,1);
(Not Applicable)
Source file TSR.H
ASM equivâ
_bioskey_off ();
bioskey_off ();
Source file TDBKF.ASM ASM equiv BIOSKEY_OFF
_bioskey_on ();
bioskey_on ();
Source file TDBKN.ASM ASM equiv BIOSKEY_ON
void far help_func (bkspec * const struc)
{
}
BIOSKEY_DEF (bioskey_popup,help_func,A_F1,_Con,100,-1,1);
...
{
_bioskey_rmv (&bioskey_popup);
}
#include <inline.h>
void far help_func (bkspec * const struc)
{
}
BIOSKEY_DEF (bioskey_popup,help_func,A_F1,_Con,100,-1,1);
...
{
mov si,offset bioskey_popup
bioskey_rmv ();
}
Source file _TDBKR.ASM ASM equiv BIOSKEY_RMV
{
/* initialize a 2000 byte near heap, a 2k far heap,
and leave a 500 byte resident stack */
_device_resident (2000, 0x80, 500);/* does not return */
}
#include <inline.h>
{
/* initialize a 2000 byte near heap, a 2k far heap,
and leave a 500 byte resident stack */
mov ax,2000 /* 2000 byte near heap */
mov bx,80/* 2k far heap */
mov cx,500/* 500 byte resident stack */
device_resident ();/* does not return */
}
Source file _TDDRES.ASM ASM equiv DEVICE_RESIDENT
void far help_func (dkspec * const struc)
{
}
DIRECTKEY_DEF (directkey_popup,help_func,M_NUMLOCK,DK_RALT,_Con,
100,-1,1);
...
{
_directkey_add (&directkey_popup);
}
#include <inline.h>
void far help_func (dkspec * const struc)
{
}
...
DIRECTKEY_DEF (directkey_popup,dkhelp_func,M_LSHIFT,
DK_RALT,_Con,100,-1,1);
{
mov si,offset directkey_popup
directkey_add ();
}
Source file _TDDKA.ASM ASM equiv DIRECTKEY_ADD
#include <tsr.h>
#include <keys.h>
...
void far display_window (dkspec * const);
void far popup_fail (dkspec * const, char causefail,
char entryfail);
DIRECTKEY_DEF (dk_popup1,display_window,M_F11,DK_LSHIFT,_Con_Dos,
100,popup_fail,1);
DIRECTKEY_DEF (dk_popup2,display_window,M_TAB,DK_RALT,_Con_Dos,
100,-1,1);
(Not Applicable)
Source file TSR.H
ASM equivâ
_directkey_off ();
directkey_off ();
Source file TDDKF.ASM ASM equiv DIRECTKEY_OFF
_directkey_on ();
directkey_on ();
Source file TDDKN.ASM ASM equiv DIRECTKEY_ON
void far help_func (dkspec * const struc)
{
}
DIRECTKEY_DEF (directkey_popup,help_func,M_NUMLOCK,DK_RALT,_Con,
100,-1,1);
...
{
_directkey_rmv (&directkey_popup);
}
#include <inline.h>
void far help_func (dkspec * const struc)
{
}
DIRECTKEY_DEF (directkey_popup,dkhelp_func,M_LSHIFT,
DK_RALT,_Con,100,-1,1);
...
{
mov si,offset directkey_popup
directkey_rmv ();
}
Source file _TDDKR.ASM ASM equiv DIRECTKEY_RMV
void far print_file(idlespec * const struc)
{
}
IDLE_DEF (idle_popup,print_file,_Con,100,-1,1);
erqspec entry = {(erqspec near*)-2,{0,0,},{0,0,},\
ERQ_8+ERQ_16,10,10,&idle_po};
{
_erq_8on ();
_erq_16on ();
_erq_21on ();
_erq_28on ();
_erq_add (&entry);
...
_erq_addrel (&entry);
...
_erq_off ();
...
_erq_on ();
...
_erq_rmv (&entry);
_erq_8off ();
_erq_16off ();
_erq_21off ();
_erq_28off ();
}
#include <inline.h>
void far print_file(idlespec * const struc)
{
}
IDLE_DEF (idle_popup,print_file,_Con,100,-1,1);
erqspec entry = {(erqspec near*)-2,{0,0,1,0},\
{0,0,2,0},ERQ_8+ERQ_16,10,10,&idle_popup};
{
erq_8on ();
erq_16on ();
erq_21on ();
erq_28on ();
mov si,offset entry
erq_add ();
...
mov si,offset entry
erq_addrel ();
...
erq_off ();
...
erq_on ();
...
mov si,offset entry
erq_rmv ();
erq_8off ();
erq_16off ();
erq_21off ();
erq_28off ();
}
Source file TDEQ16N.ASM ASM equiv ERQ_16ON
void far print_file(idlespec * const struc)
{
}
IDLE_DEF (idle_popup,print_file,_Con,100,-1,1);
erqspec entry = {(erqspec near*)-2,{0,0,},\
{0,0,},ERQ_8+ERQ_16,10,10,&idle_po};
{
_erq_add (&entry);
}
#include <inline.h>
void far print_file(idlespec * const struc)
{
}
IDLE_DEF (idle_popup,print_file,_Con,100,-1,1);
erqspec entry = {(erqspec near*)-2,{0,0,1,0},\
{0,0,2,0},ERQ_8+ERQ_16,10,10,&idle_popup};
{
mov si,offset entry
erq_add ();
}
Source file _TDEQA.ASM ASM equiv ERQ_ADD
void far print_file (idlespec * const struc)
{
}
IDLE_DEF (idle_popup,print_file,_Con,100,-1,1);
erqspec entry = {(erqspec near*)-2,{0,0,},\
{0,0,},ERQ_8+ERQ_16,10,10,&idle_po};
{
_erq_addrel (&entry);
}
#include <inline.h>
void far print_file (idlespec * const struc)
{
}
IDLE_DEF (idle_popup,print_file,_Con,100,-1,1);
erqspec entry = {(erqspec near*)-2,{0,0,1,0},\
{0,0,2,0},ERQ_8+ERQ_16,10,10,&idle_popup};
{
mov si,offset entry
erq_addrel ();
}
Source file _TDEQAR.ASM ASM equiv ERQ_ADDREL
{
_erq_off ();
}
#include <inline.h>
...
erq_off ();
Source file TDEQF.ASM ASM equiv ERQ_OFF
{
_erq_on ();
}
#include <inline.h>
...
erq_on ();
Source file TDEQN.ASM ASM equiv ERQ_ON
void far print_file (idlespec * const struc)
{
}
IDLE_DEF (idle_popup,print_file,_Con,100,-1,1);
erqspec entry = {(erqspec near*)-2,{0,0,},\
{0,0,},ERQ_8+ERQ_16,10,10,&idle_po};
{
...
_erq_rmv (&entry);
}
#include <inline.h>
void far print_file(idlespec * const struc)
{
}
IDLE_DEF (idle_popup,print_file,_Con,100,-1,1);
erqspec entry = {(erqspec near*)-2,{0,0,1,0},\
{0,0,2,0},ERQ_8+ERQ_16,10,10,&idle_popup};
...
movsi,offset entry
erq_rmv ();
Source file _TDEQR.ASM ASM equiv ERQ_RMV
void far print_file(idlespec * const struc)
{
}
IDLE_DEF (idle_popup,print_file,_Con,100,-1,1);
...
{
_idle_add (&idle_popup);
}
#include <inline.h>
void far print_file(idlespec * const struc)
{
}
IDLE_DEF (idle_popup,print_file,_Con,100,-1,1);
...
{
mov si,offset idle_popup
idle_add ();
}
Source file _TDIDLEA.ASM ASM equiv IDLE_ADD
#include <tsr.h>
...
void far print_continue(idlespec * const);
void far print_fail(idlespec const *, char causefail,
char entryfail);
IDLE_DEF (idle_popup1,print_continue,_Con_Dos,100,print_fail,1);
IDLE_DEF (idle_popup2,print_continue,_Con_Dos,100,-1,1);
(Not Applicable)
Source file TSR.H
ASM equivâ
_idle_off ();
idle_off ();
Source file TDIDLEF.ASM ASM equiv IDLE_OFF
_idle_on ();
idle_on ();
Source file TDIDLEN.ASM ASM equiv IDLE_ON
void far print_file(idlespec * const struc)
{
}
IDLE_DEF (idle_popup,print_file,_Con,100,-1,1);
...
{
_idle_rmv (&idle_popup);
}
#include <inline.h>
void far print_file(idlespec * const struc)
{
}
IDLE_DEF (idle_popup,print_file,_Con,100,-1,1);
...
{
mov si,offset idle_popup
idle_rmv ();
}
Source file _TDIDLER.ASM ASM equiv IDLE_RMV
extern intaddr print_screen;
isrctrl int5_handler = {(isrctrl *)-2,NULL,
(intaddr)print_screen,5);
{
_isr_install (&int5_handler);
...
if (!_isr_getstat (&int5_handler))
_isr_remove (&int5_handler);
else
{
/* handle the error */
_isr_hremove (&int5_handler);
}
}
#include <inline.h>
extern intaddr print_screen;
isrctrl int5_handler = {(isrctrl *)-2,NULL,
(intaddr)print_screen,5);
{
#if __TINY__
pushcs
popes
#else
movax,seg int5_handler
moves,ax
#endif
movdi,offset int5_handler
isr_install ();
...
#if __TINY__
pushcs
popes
#else
movax,seg int5_handler
moves,ax
#endif
movdi,offset int5_handler
isr_getstat (); /* is ISRCTRL installed? */
jbisr_100 /* n: don't uninstall */
jaisr_050 /* y: do a hard remove */
isr_remove ();
jmpshort isr_100
isr_050:
isr_hremove ();
isr_100:
}
Source file _TDIGSTT.ASM ASM equiv ISR_GETSTAT
extern intaddr print_screen;
isrctrl int5_handler = {(isrctrl far *)-2,NULL,
(intaddr)print_screen,5);
{
_isr_install (&int5_handler);
...
if (!_isr_getstat (&int5_handler))
_isr_remove (&int5_handler);
else
{
/* handle the error */
_isr_hremove (&int5_handler);
}
}
#include <inline.h>
extern intaddr print_screen;
isrctrl int5_handler = {(isrctrl far *)-2,NULL,
(intaddr)print_screen,5);
{
#if __TINY__
pushcs
pop es
#else
mov ax,seg int5_handler
mov es,ax
#endif
mov di,offset int5_handler
isr_install ();
...
#if __TINY__
pushcs
pop es
#else
mov ax,seg int5_handler
moves,ax
#endif
mov di,offset int5_handler
isr_getstat (); /* is ISRCTRL installed? */
jb isr_100 /* n: don't uninstall */
ja isr_050 /* y: do a hard remove */
isr_remove ();
jmp short isr_100
isr_050:
isr_hremove ();
isr_100:
}
Source file _TDIHRMV.ASM ASM equiv ISR_HREMOVE
extern intaddr print_screen;
isrctrl int5_handler = {(isrctrl *)-2,NULL,
(intaddr)print_screen,5);
{
_isr_install (&int5_handler);
...
if (!_isr_getstat (&int5_handler))
_isr_remove (&int5_handler);
else
{
/* handle the error */
_isr_hremove (&int5_handler);
}
}
#include <inline.h>
extern intaddr print_screen;
isrctrl int5_handler = {(isrctrl *)-2,NULL,
(intaddr)print_screen,5);
{
#if __TINY__
pushcs
pop es
#else
mov ax,seg int5_handler
moves,ax
#endif
mov di,offset int5_handler
isr_install ();
...
#if __TINY__
pushcs
pop es
#else
mov ax,seg int5_handler
moves,ax
#endif
mov di,offset int5_handler
isr_getstat (); /* is ISRCTRL installed? */
jb isr_100 /* n: don't uninstall */
ja isr_050 /* y: do a hard remove */
isr_remove ();
jmp short isr_100
isr_050:
isr_hremove ();
isr_100:
}
Source file _TDIINST.ASM ASM equiv ISR_INSTALL
extern intaddr print_screen;
isrctrl int5_handler = {(isrctrl *)-2,NULL,
(intaddr)print_screen,5);
{
_isr_install (&int5_handler);
...
if (!_isr_getstat (&int5_handler))
_isr_remove (&int5_handler);
else
{
/* handle the error */
_isr_hremove (&int5_handler);
}
}
#include <inline.h>
extern intaddr print_screen;
isrctrl int5_handler = {(isrctrl *)-2,NULL,
(intaddr)print_screen,5);
{
#if __TINY__
pushcs
pop es
#else
mov ax,seg int5_handler
moves,ax
#endif
mov di,offset int5_handler
isr_install ();
...
#if __TINY__
pushcs
pop es
#else
mov ax,seg int5_handler
moves,ax
#endif
mov di,offset int5_handler
isr_getstat (); /* is ISRCTRL installed? */
jb isr_100 /* n: don't uninstall */
ja isr_050 /* y: do a hard remove */
isr_remove ();
jmp short isr_100
isr_050:
isr_hremove ();
isr_100:
}
Source file _TDIRMV.ASM ASM equiv ISR_REMOVE
{
isrctrl far * isr_addr;
isr_addr = _isr_removeall ();
while (isr_addr != NULL)
{
/* interrupts have changed */
_isr_hremove (isr_addr); /* unconditionally remove ISR */
isr_addr = _isr_removeall ();
}
}
#include <inline.h>
{
isr_removeall (); /* was function successful? */
jnc hremove_100 /* y: continue */
/* m: interrupts have changed */
hremove_050:
isr_hremove (); /* unconditionally remove ISR */
isr_removeall (); /* was function successful? */
jc hremove_050 /* n: unconditionally remove ISR */
hremove_100:
}
Source file _TDIRMVA.ASM ASM equiv ISR_REMOVEALL
int far keyf_get(keyf * const kf_struct, int key_code)
{
}
int feed_buffer[15];
keyf hello = {(void near *)-2,feed_buffer,
(void near *)-1,0,1,3,3,keyf_get,
#if __TINY__
(int (near *)(keyf * const, int)};
#else
(int (far *)(keyf * const, int)};
#endif
{
char * string = "hello, world"___ENTER;
_keyfeed_convert (string, feed_buffer);
_keyfeed_insert (&hello);
...
_keyfeed_rmv (&hello);
...
_keyfeed_append (&hello);
...
_keyfeed_on ();
...
_keyfeed_off ();
}
#include <inline.h>
int far keyf_get (keyf * const kf_struct, int key_code)
{
}
int feed_buffer[15];
keyf hello = {(void near *)-2,feed_buffer,
(void near *)-1,0,1,3,3,keyf_get,
#if __TINY__
(int (near *)(keyf *const, int))-1};
#else
(int (far *)(keyf * const, int))-1};
#endif
{
char * string = "hello, world"___ENTER;
pushss
pop es
mov si,string/* DS:SI -> string (source) */
lea di,feed_buffer/* ES:DI -> feed_buffer (dest)*/
keyfeed_convert ();
mov si,offset hello/* DS:SI -> KEYF struct */
keyfeed_insert ();
...
mov si,offset hello/* DS:SI -> KEYF struct */
keyfeed_rmv ();
...
mov si,offset hello/* DS:SI -> KEYF struct */
keyfeed_append ();
...
keyfeed_on ();
...
keyfeed_off ();
}
Source file _TDKFA.ASM ASM equiv KEYFEED_APPEND
int far keyf_get(keyf * const kf_struct, int key_code)
{
}
int feed_buffer[15];
keyf hello = {(void near *)-2,feed_buffer,
(void near *)-1,0,1,3,3,keyf_get,
#if __TINY__
(int (near *)(keyf * const, int)};
#else
(int (far *)(keyf * const, int)};
#endif
{
char * string = "hello, world"___ENTER;
_keyfeed_convert (string, feed_buffer);
_keyfeed_insert (&hello);
...
_keyfeed_rmv (&hello);
...
_keyfeed_append (&hello);
...
_keyfeed_on ();
...
_keyfeed_off ();
}
#include <inline.h>
int far keyf_get(keyf * const kf_struct, int key_code)
{
}
int feed_buffer[15];
keyf hello = {(void near *)-2,feed_buffer,
(void near *)-1,0,1,3,3,keyf_get,
#if __TINY__
(int (near *)(keyf * const, int))-1};
#else
(int (far *)(keyf * const, int))-1};
#endif
{
char * string = "hello, world"___ENTER;
pushss
pop es
mov si,string/* DS:SI -> string (source) */
lea di,feed_buffer/* ES:DI -> feed_buffer (dest) */
keyfeed_convert ();
mov si,offset hello/* DS:SI -> KEYF struct */
keyfeed_insert ();
...
mov si,offset hello/* DS:SI -> KEYF struct */
keyfeed_rmv ();
...
mov si,offset hello/* DS:SI -> KEYF struct */
keyfeed_append ();
...
keyfeed_on ();
...
keyfeed_off ();
}
Source file _TDKFI.ASM ASM equiv KEYFEED_INSERT
{
char *idstring = "TSR program, Copyright (c) Your company, INC";
void far * pub_data;
/* point PUB_DATA to the public data area */
if (!_progid_check (idstring))
_progid_install (idstring, pub_data);
else
_put_str ("TSR is already installed");
}
#include <inline.h>
{
char *idstring = "TSR program, Copyright (c)\
Your company, INC";
void far * pub_data;
/* point PUB_DATA to the public data area */
pushds
pop es
mov di,idstring/* ES:DI -> ID string */
progid_check (); /* is ID string installed? */
jneinstall_050/* n: install ID string */
_put_str ("TSR is already installed");
/* y: print message */
jmp short install_100
install_050:
mov ax,word ptr pub_data
mov dx,word ptr pub_data+2
/* DX:AX -> public data area */
progid_install ();
install_100:
}
Source file _TDIDCHK.ASM ASM equiv PROGID_CHECK
{
char * idstring = "TSR program, Copyright (c)\
Your company, INC";
char err_code;
err_code = _progid_remtsr (idstring);
if (err_code && err_code != -1)
{
/* handle the error */
_progid_hremtsr (idstring);
}
_put_str ("TSR uninstalled");
}
#include <inline.h>
{
char * idstring = "TSR program, Copyright (c)\
Your company, INC";
pushds
pop es
mov di,idstring/* ES:DI -> ID string */
progid_remtsr (); /* was the TSR removed? */
jncremtsr_100/* y: continue */
cmp al,-1 /* is TSR installed? */
je remtsr_100/* n: skip hard remove */
progid_hremtsr (); /* y: do a hard remove */
remtsr_100:
_put_str ("TSR uninstalled");
}
Source file _TDIDHRT.ASM ASM equiv PROGID_HREMTSR
{
char * idstring = "TSR program, Copyright (c)\
Your company, INC";
void far * pub_data;
/* point PUB_DATA to the public data area */
if (!_progid_check (idstring))
_progid_install (idstring, pub_data);
else
_put_str ("TSR is already installed");
}
#include <inline.h>
{
char * idstring = "TSR program, Copyright (c)\
Your company, INC";
void far * pub_data;
/* point PUB_DATA to the public data area */
pushds
pop es
mov di,idstring/* ES:DI -> ID string */
progid_check (); /* is ID string installed? */
jneinstall_050/* n: install ID string */
_put_str ("TSR is already installed");
/* y: print message */
jmp short install_100
install_050:
mov ax,word ptr pub_data
mov dx,word ptr pub_data+2
/* DX:AX -> public data area */
progid_install ();
install_100:
}
Source file _TDIDINS.ASM ASM equiv PROGID_INSTALL
{
char * idstring = "TSR program, Copyright (c)\
Your company, INC";
char err_code;
err_code = _progid_remtsr (idstring);
if (err_code && err_code != -4)
{
/* handle the error */
_progid_hremtsr (idstring);
}
_put_str ("TSR uninstalled");
}
#include <inline.h>
{
char * idstring = "TSR program, Copyright (c)\
Your company, INC";
pushds
pop es
mov di,idstring/* ES:DI -> ID string */
progid_remtsr (); /* was the TSR removed? */
jncremtsr_100/* y: continue */
cmp al,-4 /* is TSR installed? */
je remtsr_100/* n: skip hard remove */
progid_hremtsr (); /* y: do a hard remove */
remtsr_100:
_put_str ("TSR uninstalled");
}
Source file _TDIDRT.ASM ASM equiv PROGID_REMTSR
void far display_win(stmrspec * const struc)
{
}
STIMER_DEF(stimer_popup,display_win,200,200,20,_Con,100,-1,1);
...
{
_stimer_add (&stimer_popup);
}
#include <inline.h>
void far display_win(stmrspec * const struc)
{
}
STIMER_DEF(stimer_popup,display_win,200,200,20,
_Con,100,-1,1);
...
{
mov si,offset stimer_popup
stimer_add ();
}
Source file _TDTMRA.ASM ASM equiv STIMER_ADD
#include <tsr.h>
...
void far display_window(stmrspec * const);
void far popup_fail(stmrspec * const, char causefail,
char entryfail);
STIMER_DEF (stmr_popup1,display_window,10,10,0,_Con_Dos,100,
popup_fail,1);
STIMER_DEF (stmr_popup2,display_window,18,18,0,_Con_Dos,100,-1,1);
(Not Applicable)
Source file TSR.H
ASM equivâ
_stimer_off ();
stimer_off ();
Source file TDTMRF.ASM ASM equiv STIMER_OFF
_stimer_on ();
stimer_on ();
Source file TDTMRN.ASM ASM equiv STIMER_ON
void far display_win(stmrspec * const struc)
{
}
STIMER_DEF(stimer_popup,display_win,200,200,20,_Con,100,-1,1);
...
{
_stimer_rmv (&stimer_popup);
}
#include <inline.h>
void far display_win(stmrspec * const struc)
{
}
STIMER_DEF(stimer_popup,display_win,200,200,20,_Con,
100,-1,1);
{
mov si,offset stimer_popup
stimer_rmv ();
}
Source file _TDTMRR.ASM ASM equiv STIMER_RMV
{
_tsr_emsinit ();
}
#include <inline.h>
{
tsr_emsinit ();
}
Source file TDEINIT.ASM ASM equiv TSR_EMSINIT
{
/* initialize leaving 500 bytes for regular program
execution, the rest
for entry through intercept types */
_tsr_enable (500);
}
#include <inline.h>
{
/* initialize leaving 500 bytes for regular program
execution, the rest
for entry through intercept types */
mov cx,500 /* leave 500 bytes */
tsr_enable ();
}
Source file _TDENABL.ASM ASM equiv TSR_ENABLE
{
_tsr_hremove (); /* error if returns */
}
#include <inline.h>
{
tsr_hremove (); /* error if returns */
}
Source file _TDHREM.ASM ASM equiv TSR_HREMOVE
{
_tsr_init ();
}
#include <inline.h>
{
tsr_init ();
}
Source file _TDINIT.ASM ASM equiv TSR_INIT
extern char ce_manager(char error, char func_num, char err_inf,
char drive,
void far * far * device);
extern void divide_handler (void);
{
_tsr_initc (ce_manager, divide_handler);
}
#include <inline.h>
extern char ce_manager (char error, char func_num, char err_inf,
char drive,
void far * far * device);
extern void divide_handler (void);
{
#if !__SMALL_CODE__
mov dx,seg ce_manager
mov ax,seg divide_handler
mov es,ax
#endif
mov ax,offset ce_manager
/* DX:AX -> critical err mngr */
mov di,offset divide_handler
/* ES:DI -> div by 0 manager */
tsr_initc ();
}
Source file _TDINITC.ASM ASM equiv TSR_INITC
{
unsigned int nheap = 2000, fheap = 0x80, stack = 500,
ems, progsize;
unsigned int prog_size;
if (prog_size = _tsr_memusage (&progsize, &nheap,
&fheap, &stack, &ems))
{
/* requested not available */
}
}
#include <inline.h>
...
mov ax,2000 /* 2000 byte near heap */
mov bx,80 /* 2k far heap */
mov cx,500 /* 500 byte resident stack */
tsr_memusage (); /* determine memory usage */
/* AX = actual near heap size */
/* BX = actual far heap size */
/* CX = actual stack size */
/* DX = total memory usage */
/* SI = bytes relocated to EMS */
jncmem_100 /* if requested was available */
/* if requested was NOT available
mem_100:
...
Source file _TDMEM.ASM ASM equiv TSR_MEMUSAGE
{
int error_code = _tsr_remove ();
/* handle error if function returned */
}
#include <inline.h>
{
int error_code = tsr_remove ();
/* handle error if function returned */
}
Source file _TDREM.ASM ASM equiv TSR_REMOVE
{
/* initialize a 2000 byte near heap, a 2k far heap,
and leave a 500 byte resident stack */
_tsr_resident (2000, 0x80, 500); /* does not return */
}
#include <inline.h>
...
/* initialize a 2000 byte near heap, a 2k far heap,
and leave a 500 byte resident stack */
mov ax,2000 /* 2000 byte near heap */
mov bx,80 /* 2k far heap */
mov cx,500 /* 500 byte resident stack */
tsr_resident (); /* does not return */
...
Source file _TDRES.ASM ASM equiv TSR_RESIDENT