🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.prolog
Article #2351

Re: NU Prolog and Stony Brook Prolog (MS-DOS porting really)

#2351
From: Diomidis Spinellis
Date: Thu, 20 Jun 1991 15:28
32 lines
2518 bytes
In article <1991Jun17.201214.19756@msuinfo.cl.msu.edu>
pierced@buster.cps.msu.edu (Douglas K Pierce) writes:

>I would like to know if anyone has succeeded in porting a PD prolog
>(especially SBProlog) to a DOS machine.  This seems like quite a task,
>especially if you have to deal with Unix code that goes 'way beyond
>DOS segment limits and has to be converted severely.

I have recently ported SBProlog to MS-DOS using the MS-DOS version of
the GNU C compiler available at various FTP sites.  The changes I made
were minimal, I rolled my own frexp(3m) function, provided a stub for
system(3) and a minimal implementation for syscall(2) that only implements
access(2)  (It is used by the compiler).  I also changed some filenames
to get over the 8 character limit of MS-DOS and hacked the place where
the files are opened to reflect those changes (The filenames were hard
wired into the compiler byte code executables and I could not bootstrap
the compiler).  The intepreter needed a very small change in the main loop
which seemed like an error to me.  Needless to say that the whole solution
only works for 386 and upwards compatible machines.

The simulator can run the compiler without a problem.  The benchmarks 
work, but due to a bug in the time() function the time was not
measured correctly.  The sytem has crashed some times with a segmentation violation while garbage collecting.  I `fixed' that by pumping up the
memory limit.  Other than that the system is quite stable.  I have not spent
a lot of time enhancing or fixing the MS-DOS related problems as they are minor
and I am happy to _use_ the system as it is.

Diomidis 
-- 
Diomidis Spinellis                  Internet:                 dds@doc.ic.ac.uk
Department of Computing             UUCP:                    ...!ukc!icdoc!dds
Imperial College, London SW7        #define O(b,f,u,s,c,a)b(){int o=f(); ...
Technical Details
Message-ID: <1473@theseas.ntua.gr>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!uunet!mcsun!ariadne!theseas!ntua.gr!dds
References: <748@esosun.UUCP> <1991Jun17.201214.19756@msuinfo.cl.msu.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!uunet!mcsun!ariadne!theseas!ntua.gr!dds
From: dds@theseas.ntua.gr (Diomidis Spinellis)
Newsgroups: comp.lang.prolog
Subject: Re: NU Prolog and Stony Brook Prolog (MS-DOS porting really)
Keywords: Prolog
Message-ID: <1473@theseas.ntua.gr>
Date: 20 Jun 91 15:28:40 GMT
References: <748@esosun.UUCP> <1991Jun17.201214.19756@msuinfo.cl.msu.edu>
Sender: news@theseas.ntua.gr
Reply-To: dds@theseas.ntua.gr (Diomidis Spinellis)
Organization: National Technical University of Athens, Greece
Lines: 32