[Freedos-user] Problem w/ CONFIG.SYS INSTALL
I am writing a TSR, and having trouble getting it to work with FreeDOS. It installs just fine in MSDOS, also also installs just fine from a FreeDOS command prompt. But, when I try to install it using an INSTALL= or INSTALLHIGH= from CONFIG.SYS, the machine hangs. The hang occurs right after the program exits (INT 21.4Ch or INT 21.31h). If it helps in troubleshooting, the TSR does allocate and leave in place some extra memory segments that the TSR needs. I can install some of my other TSR's just fine from CONFIG.SYS. If I load JEMMEX, when the problem program exits, JEMM displays an Error 0D at CS:EIP X:Y, where X is always the CS of the previous TSR that was installed, and Y is always either or 0001. If I don't use JEMM, the machine just hangs with no error messages at all. I've been looking at some of the source code for FreeDOS, but nothing has revealed itself yet. I'm just wondering if someone could explain, at least in general terms, what is not there or is different (other than the shell program) when INSTALL is being used as opposed to an installation from the command-line? -- View this message in context: http://old.nabble.com/Problem-w--CONFIG.SYS-INSTALL-tp30076203p30076203.html Sent from the FreeDOS - User mailing list archive at Nabble.com. -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev ___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user
Re: [Freedos-user] Problem w/ CONFIG.SYS INSTALL
Hi Bret, I am writing a TSR, and having trouble getting it to work with FreeDOS. It installs just fine in MSDOS, also also installs just fine from a FreeDOS command prompt. But, when I try to install it using an INSTALL= or INSTALLHIGH= from CONFIG.SYS, the machine hangs. The hang occurs right after the program exits (INT 21.4Ch or INT 21.31h). If it helps in troubleshooting, the TSR does allocate and leave in place some extra memory segments that the TSR needs. That could be related. How do you allocate the extra memory and where? I can install some of my other TSR's just fine from CONFIG.SYS. If I load JEMMEX, when the problem program exits, JEMM displays an Error 0D at CS:EIP X:Y, where X is always the CS of the previous TSR that was installed, and Y is always either or 0001. If I don't use JEMM, the machine just hangs with no error messages at all. Maybe JEMMEX has problems with fragmented memory, did you try JEMM386? The error itself does not tell much - GPF at a 64k segment boundary... Could mean that code jumped into an empty segment and fell of its end. I've been looking at some of the source code for FreeDOS, but nothing has revealed itself yet. I'm just wondering if someone could explain, at least in general terms, what is not there or is different (other than the shell program) when INSTALL is being used as opposed to an installation from the command-line? While INSTALL differs from normal running of apps (as child tasks of SHELL) it should do so in the same way for different versions of DOS. In FreeDOS, you get - apart from a not complete PSP which is probably normal for all INSTALL situations anyway...: STATIC VOID InstallExec(struct instCmds *icmd) ... exb.exec.env_seg = 0; exb.exec.cmd_line = (CommandTail FAR *) args; exb.exec.fcb_1 = exb.exec.fcb_2 = (fcb FAR *) 0xul; ... init_DosExec(icmd-mode, exb, filename) ... ... ...where AL = mode is either 0 or 0x80 for low / high install which is a non-standard use of the high bit of AL. A possible bug in FreeDOS could be: COUNT DosExec(COUNT mode, exec_blk FAR * ep, BYTE FAR * lp) ... if (mode == LOAD rc == SUCCESS) fmemcpy(ep, TempExeBlock, sizeof(exec_blk)); ... This should probably use if mode and 0x7f is load instead? However, INSTALL does not use LOAD mode, it uses LOADNGO... And value LOAD_HIGH which is 0x80 is defined but never used. Other functions: DosExeLoader, DosComLoader, load_transfer... It might be possible that DosComLoader tries to give the COM all available memory and unless you specify otherwise when going TSR none is left for others, but thats just guessing. Is your TSR a COM or is it EXE? Does it keep handles open? Does it use environment variables or other PSP related data? Does it make a difference whether to INSTALL or INSTALLHIGH? Regards, Eric -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev ___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user
Re: [Freedos-user] Problem w/ CONFIG.SYS INSTALL
Maybe JEMMEX has problems with fragmented memory, did you try JEMM386? Maybe not..? The issue does not appear to be related to JEMM (as usual). The error itself does not tell much - GPF at a 64k segment boundary... Could mean that code jumped into an empty segment and fell of its end. It would appear so. It might be possible that DosComLoader tries to give the COM all available memory and unless you specify otherwise when going TSR none is left for others, but thats just guessing. Bret allocates other memory blocks, so he does resize the process first as necessary. (As an aside, such a situation should not make the kernel crash like that.) Is your TSR a COM or is it EXE? Does it keep handles open? Does it use environment variables or other PSP related data? Does it make a difference whether to INSTALL or INSTALLHIGH? Educated guess: COM, no (shouldn't matter though), no (except as allowed, before the TSR is resident), no (Bret said so). Regards, Christian -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev ___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user
Re: [Freedos-user] Problem w/ CONFIG.SYS INSTALL
Hi Bret, I checked the system's state with INSTALL=DEBUG.COM on a boot disk (Rugxulo's bare DOS disk, with a 2008-03-08 kernel, build 2038) and it appears fine to me. Memory that belongs to the configuration/initialization program is allocated to a PSP at segment 60h (!) which is properly set up except there's no MCB in front of it. (This means programs that display a process's name display garbage instead.) Some simple tests, including resident installation of a TSR that uses process relocation and the new Int21.4C method, passed. Tell us the programs that are used and their versions, that might help. The TSR I'm working on can't be published just yet, so that's not an option right now. It's also _really_ complicated, so I'm not sure anyone would want to mess with it anyway. I'm using an older version of the kernel -- I'm not sure exactly which one right now, but it's one from right after FreeDOS version 1 was released. I'm working with some other programmers who are using the latest versions of the kernel. I can find out exact details if it might help. Can you reproduce the crash with a minimal (dummy) TSR? Could you make a TSR available that causes this crash? I don't know -- I'll see if I can create a simple TSR that still has the problem. -- Bret -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev ___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user
Re: [Freedos-user] Problem w/ CONFIG.SYS INSTALL
The TSR I'm working on can't be published just yet, so that's not an option right now. I thought so. It's also _really_ complicated, so I'm not sure anyone would want to mess with it anyway. You know me. I'm using an older version of the kernel -- I'm not sure exactly which one right now, but it's one from right after FreeDOS version 1 was released. I'm working with some other programmers who are using the latest versions of the kernel. I can find out exact details if it might help. Yes, details would help. I would strongly recommend you to update your kernel, that might fix the problem. Regards, Christian -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev ___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user
Re: [Freedos-user] Problem w/ CONFIG.SYS INSTALL
I was using kernel 2036. Just tried 2038 -- no effective difference. The JEMM error is different now (Error 06 at a seemingly random CS:EIP, near the top of conventional memory but where there is no associated PSP). -- Bret -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev ___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user