Newsgroup: comp.lang.prolog


Path: 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
Content-Length: 1910
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(); ...



Newsgroup comp.lang.prolog contents
Newsgroup list
Diomidis Spinellis home page

Creative Commons License Unless otherwise expressly stated, all original material on this page created by Diomidis Spinellis is licensed under a Creative Commons Attribution-Share Alike 3.0 Greece License.