From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 2002:a0c:94a4:: with SMTP id j33mr36244272qvj.135.1562231056351; Thu, 04 Jul 2019 02:04:16 -0700 (PDT) X-Received: by 2002:aca:4853:: with SMTP id v80mr1246944oia.78.1562231056144; Thu, 04 Jul 2019 02:04:16 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!news.gegeweb.eu!gegeweb.org!usenet-fr.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!m24no5293022qtm.0!news-out.google.com!g23ni121qtq.1!nntp.google.com!m24no5293012qtm.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 4 Jul 2019 02:04:15 -0700 (PDT) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=136.163.203.5; posting-account=HFCrOQoAAABZD_f-UUbYHm3lJDIrh-UX NNTP-Posting-Host: 136.163.203.5 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <1ddb4817-8bb0-4cc4-9653-de12f8a746d6@googlegroups.com> Subject: FreeDOS, Janus/Ada and GNAT From: joakimds@kth.se Injection-Date: Thu, 04 Jul 2019 09:04:16 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader01.eternal-september.org comp.lang.ada:56812 Date: 2019-07-04T02:04:15-07:00 List-Id: FreeDOS is an open source implementation of MS-DOS and in June 2019 celebra= ted 25 years in existence. In it there is an application called DIMPLES tha= t is the package manager for FreeDOS. DIMPLES is like pip for Python, apt (= aptitude) for Debian systems, and so on. To compile Ada applications in Fre= eDOS one can use the DJGPP compiler which is a port of gcc (GNAT) to FreeDO= S (and one can use DIMPLES to install it if it is not already installed). I= t works well except that it cannot create an executable from Ada code that = uses tasks. So if one wants to make Ada applications for FreeDOS there can = be no tasking. This has to do with how tasking in GNAT is implemented. On W= indows, Mac OS X and Linux the tasks are mapped in a one-to-one correspondance to OS-threads (at least my understand= ing). FreeDOS does not support or provide threads and is a single thread/task ope= rating system. It has therefore not been a trivial exercise to port the sta= ndard GNAT-Runtime support for tasks to FreeDOS. There is another Ada compiler called Janus/Ada where tasks are not mapped b= y the Ada-Runtime to OS-threads and an Ada application built with Janus/Ada= is effectively a single thread application no matter how many tasks are us= ed in the Ada code. Considering the task implementation by Janus/Ada, it so= unds like a perfect fit for FreeDOS. Of course Janus/Ada produces win32 app= lications and not DOS application but there is a DOS Extender called HX DOS= which can execute many win32 applicatins on FreeDOS. Trying it out reveals= that there are three win32 calls which HX DOS could not emulate: import not found: InitializeSListHead import not found: GetModuleHandleExW import not found: FindFirstFileExW If HX DOS could be extended to emulate these calls then Janus/Ada can *prob= ably* be used to build multi-task executables for FreeDOS. Jim Hall (creato= r of the FreeDOS project) wrote in April 2009 on the subject of multi-taski= ng in DOS: "People sometimes ask me what I'd love to see in a future version of DOS. I would like to see some level of running multiple applications at once. ... True multitasking would be ideal, but I'd be happy if we supported the simpler "task switching" - this would be a huge leap forward for FreeDO= S. ..." One area where FreeDOS can be used today is in embedded systems (and it has= been used there). The implementation of FreeDOS requires the CPU to be x86= and many embedded systems are nowadays ARM based (which rules out FreeDOS)= . Any known hard-ware vendors where it is known one can run FreeDOS? To summarize: It is possible today to use the DJGPP (GNAT) compiler to deve= lop single task applications on FreeDOS. It is *almost* possible to run mul= ti-task Ada applications on FreeDOS using the Janus/Ada compiler. AdaCore m= ay have an Ada-Runtime that can support tasking on FreeDOS, but outside the= scope of what I know. Best regards, Joakim