Skip to content

Commit

Permalink
main: fix, only init env once in PSPInit, do not set cmdline tail
Browse files Browse the repository at this point in the history
  • Loading branch information
ecm-pushbx authored and PerditionC committed Feb 4, 2024
1 parent ab3cac6 commit 3ef6d61
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions kernel/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,6 @@ VOID ASMCFUNC FreeDOSmain(void)
drv = 3; /* C: */
LoL->BootDrive = drv;

/* init master environment start */
*master_env = 0;
master_env[1] = 0;
master_env[2] = 0;
master_env[3] = 0;

/* install DOS API and other interrupt service routines, basic kernel functionality works */
setup_int_vectors();

Expand Down Expand Up @@ -178,6 +172,7 @@ STATIC void PSPInit(void)

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

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

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

#ifndef __WATCOMC__
Expand Down

0 comments on commit 3ef6d61

Please sign in to comment.