gtoal@tharr.UUCP (Graham Toal) (09/07/90)
Dear netland, I'm trying to do something which probably hasn't been done before, and I've hit a problem. If anyone has already tried anything similar, I'd appreciate if you could get in touch please: I'm trying to make a version of TeX for MSDOS which will run under a DOS Extender; this means that as far as the C program is concerned, you appear to have a real computer with a large flat address space. You can, for instance, have .exe files which are a megabyte large, and they still load and run correctly, or you can allocate vast areas off the heap - 3 Mb for instance, in one block. (I'm using Microsoft C and OS/286 dos extender) I've had quite a lot of success. I've got everything compiled, and it sort of runs, but I get strange TeX errors while TeX'ing the plain base file. The interesting thing is that I get very similar style of errors whether I'm running a version of CTeX that I've ported, *or* CommonTeX. The fact that these are two very different sources written by different people in different styles suggests that the problem is something pretty basic. My current theory is that it is because MSC's ints are 16 bits wide. I *have* #defined SIXTEENBITS, and typedef'd integer as long where appropriate, but the word size is the only difference I can see between this port and *the same source files* compiled on other (32 bit, non Intel) machines. I'm going to try a 32-bit 386 compiler next, and a 386 DOS extender (as soon as our purchasing folks can buy one :-() but it will be an awful waste if there is another reason causing the problems. The only other significant change I've made is that all TeX's large arrays are now taken off the heap, rather than being static, because very large static arrays weren't handled well by the dos extender. This also gives the advantage that the development cycle is vastly speeded, since I can generate a larger version of TeX by setting an environment variable or command line parameter -- instead of a 40 minute recompilation. The point of this exercise was originally to be that I would first port a straight TeX, with normal memory, and when that worked, I would go over to a huge TeX with double-sized memory (a la Unix). We have some particularly large tables which could have used this immediately -- it seemed the easier option over totally redesigning our table generator. Many thanks indeed if you have worked on anything similar and can offer advice. (Or even better, a working program ;-) ) Graham Toal <gtoal%uk.ac.ed@nsfnet-relay.ac.uk> (please use this address in preference to the From: line) PS - the sort of thing going wrong is that stuff like \newbox doesn't work, or other perfectly simple TeX commands go totally weird. CommonTeX got further that CTeX; I managed to build a base file, but it went wrong on trivial documents. (PPS I've just been told about emtex, which has a big 286 version; I'm looking in to that (although the server file list doesn't appear to include sources) - G.)
mcdonald@aries.scs.uiuc.edu (Doug McDonald) (09/09/90)
In article <959@tharr.UUCP> gtoal%uk.ac.ed@nsfnet-relay.ac.uk (Graham Toal) writes: >Dear netland, > >I'm trying to do something which probably hasn't been done before, and >I've hit a problem. If anyone has already tried anything similar, I'd >appreciate if you could get in touch please: > >I'm trying to make a version of TeX for MSDOS which will run under a >DOS Extender; this means that as far as the C program is concerned, >you appear to have a real computer with a large flat address space. I have made CommonTex work in 32 bit mode on a 386, in versions using 3.3 and 6 megabytes of memory. It was extremely easy, using the MicroWay C compiler and the Phar Lap extender. It passes the trip test except for one problem involving the name of one of the files it writes out; this is harmless, the file itself is correct. This is of course pre-3.0 TeX. Doug McDonald