Subversion Repositories SvarDOS

Rev

Rev 963 | Rev 983 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 963 Rev 975
Line 193... Line 193...
193
  return(res);
193
  return(res);
194
}
194
}
195
 
195
 
196
 
196
 
197
/* look up my parent: if it's rmod then return a ptr to its props struct,
197
/* look up my parent: if it's rmod then return a ptr to its props struct,
198
 * otherwise return NULL */
198
 * otherwise return NULL
-
 
199
 * since RMOD sets itself as the CTRL+BREAK handler, I look at the int23
-
 
200
 * field of the PSP to locate it. Previously I was looking at PSP[Ch] (ie.
-
 
201
 * "terminate address" but this was failing when using the LINK/LN TSR that
-
 
202
 * intercepts DOS EXEC calls and sets itself as the parent of all launched
-
 
203
 * applications */
199
struct rmod_props far *rmod_find(unsigned short rmodcore_len) {
204
struct rmod_props far *rmod_find(unsigned short rmodcore_len) {
200
  unsigned short *parent = (void *)0x0C; /* parent's seg in PSP[Ch] ("prev. int22 handler") */
205
  unsigned short *parent = (void *)0x10; /* look in PSP[10h] ("prev. int23 handler") */
201
  unsigned short far *ptr;
206
  unsigned short far *ptr;
202
  const unsigned short sig[] = {0x1983, 0x1985, 0x2017, 0x2019};
207
  const unsigned short sig[] = {0x1983, 0x1985, 0x2017, 0x2019};
203
  unsigned char *cmdtail = (void *)0x80;
208
  unsigned char *cmdtail = (void *)0x80;
204
  unsigned char i;
209
  unsigned char i;
205
  /* is it rmod? */
210
  /* is it rmod? */