Skip to content

Commit 3ef6d61

Browse files
ecm-pushbxPerditionC
authored andcommitted
main: fix, only init env once in PSPInit, do not set cmdline tail
1 parent ab3cac6 commit 3ef6d61

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

kernel/main.c

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,6 @@ VOID ASMCFUNC FreeDOSmain(void)
106106
drv = 3; /* C: */
107107
LoL->BootDrive = drv;
108108

109-
/* init master environment start */
110-
*master_env = 0;
111-
master_env[1] = 0;
112-
master_env[2] = 0;
113-
master_env[3] = 0;
114-
115109
/* install DOS API and other interrupt service routines, basic kernel functionality works */
116110
setup_int_vectors();
117111

@@ -178,6 +172,7 @@ STATIC void PSPInit(void)
178172

179173
/* Clear out new psp first */
180174
fmemset(p, 0, sizeof(psp));
175+
/* high half is used as environment */
181176

182177
/* initialize all entries and exits */
183178
/* CP/M-like exit point */
@@ -230,9 +225,7 @@ STATIC void PSPInit(void)
230225
/* p->ps_fcb2.fcb_drive = 0; already set */
231226
fmemset(p->ps_fcb2.fcb_fname, ' ', FNAME_SIZE + FEXT_SIZE);
232227

233-
/* local command line */
234-
/* p->ps_cmd.ctCount = 0; command tail, already set */
235-
p->ps_cmd.ctBuffer[0] = 0xd; /* command tail */
228+
/* do not modify command line tail, used as environment */
236229
}
237230

238231
#ifndef __WATCOMC__

0 commit comments

Comments
 (0)