delorie.com/archives/browse.cgi | search |
X-Authentication-Warning: | delorie.com: mail set sender to djgpp-bounces using -f |
X-Recipient: | djgpp AT delorie DOT com |
X-Original-DKIM-Signature: | v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; |
s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: | |
mime-version; bh=sPPg4mOn4QyPTPqCFM7RBKnd8SGsyYvYYfaSv09RnXE=; b=ozlViV8aT96o | |
JxJUq861Qo2zOKEnbn8NBzeLRf5wKD2uo4k7620QXWOYcbWBTaQucFh3JMbmH05Hc2BD6uJgHxCjs | |
adlNCoECyQ5mI73inTD37w+9K92eC+4pvxlJ1yJdrd+9WU4472VCtIBM4K/zka/ZPImo1yaQJgea0 | |
M6PI+BTz2oLRBw74YYv2GLE5qImxO+K5So64FSNAya8YKApz4x4q1Rd9FW7Hh9pXojLdqGshNZgNQ | |
r/k/HUlZ9Ye+mDi/AtR1GTWPhQu2K7+83A4EwFbFvkKuptGfTpEhfcyy82iJ7zK6SKMOGJTpH1PoM | |
W/SOr/lyZ7cBNRY7Lu29HQ==; | |
Date: | Wed, 26 Jan 2022 15:08:22 +0200 |
Message-Id: | <83h79qhcft.fsf@gnu.org> |
From: | "Eli Zaretskii (eliz AT gnu DOT org) [via djgpp AT delorie DOT com]" <djgpp AT delorie DOT com> |
To: | "Jay K (jayk123 AT hotmail DOT com) [via djgpp AT delorie DOT com]" |
<djgpp AT delorie DOT com> | |
In-Reply-To: | |
<MWHPR1401MB1951CCC95276E44447921D28E6209 AT MWHPR1401MB1951 DOT namprd14 DOT prod DOT outlook DOT com> | |
(djgpp AT delorie DOT com) | |
Subject: | Re: command line lenght problems? |
References: | |
<MWHPR1401MB1951CCC95276E44447921D28E6209 AT MWHPR1401MB1951 DOT namprd14 DOT prod DOT outlook DOT com> | |
Reply-To: | djgpp AT delorie DOT com |
> From: "Jay K (jayk123 AT hotmail DOT com) [via djgpp AT delorie DOT com]" <djgpp AT delorie DOT com> > Date: Wed, 26 Jan 2022 09:53:31 +0000 > suggested_attachment_session_id: 69785034-0787-e0af-85a1-df4fb0b67acf > > I am trying to port my program to MS-DOS. For fun, granted. > I figured DJGPP would help. > Esp. because it seems to have a useful "sigalarm" functionality, > I might use to implement preemptive threads. > I have a prototype that suggests that will work: > > https://github.com/modula3/cm3/blob/3be819ed8e2fa60885aff0cb6278934a17b30702/m3-libs/m3core/src/thread/POSIX/test_dos_threads.cpp > > > The rest of the Posix support helps also. > I'm not sure about network/sockets, maybe give up. > > I have experimented with a few "DOS"s. > FreeDOS, DosBos-X, 32bit Windows 10 VM. > > They all have advantages and disadvantages. > > Granted I could spend more time configuring each and none is "really" MS-DOS. > > My program is a compiler, that produces .cpp files and would run g++ or gxx, etc. > (I might experiment with e.g. OpenWatcom, might, like if it can link the djpp libraries.) > > I am seeing, I guess, command line length limitations. > > gcc and collect2 crash, but if I run them manually with shorter equivalent-enough commands, they work. > > Advise? > [...] > bash: > --------------------------- > 16 bit MS-DOS Subsystem > --------------------------- > Administrator: C:\Windows\system32\cmd.exe > NTVDM has encountered a System Error > NTVDM has encountered a System Error 4001h Choose 'Close' to terminate the application. > --------------------------- > Close Ignore > --------------------------- On what version of Windows is that? > Exiting due to signal SIGSEGV > Stack Fault at eip=00000a11 This is stack fault, not necessarily related to the command-line length. What does go32-v2 report there if run without arguments? > eax=00010001 ebx=01ad0080 ecx=01549400 edx=004207bf esi=00001223 edi=00001213 > ebp=0042773a esp=0042773a program=C:\DOS\BIN\GCC.EXE > cs: sel=00cf base=000d3a50 limit=00000db0 > ds: sel=00b7 base=000cc160 limit=0000ffff > es: sel=0040 invalid > fs: sel=0000 > gs: sel=0000 > ss: sel=00b7 base=000cc160 limit=0000ffff > App stack: [00423b78..00223b7c] Exceptn stack: [00223ac8..00221b88] Something is very wrong in the run environment: the SS segment has very small limit, ES is invalid...
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |