Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!PENNDRLS.BITNET!DAVID From: DAVID@PENNDRLS.BITNET Newsgroups: comp.lang.forth Subject: (none) Message-ID: <8911270420.AA23566@jade.berkeley.edu> Date: 22 Nov 89 20:07:47 GMT Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: Forth Interest Group International List Organization: The Internet Lines: 52 Date: Wednesday, 22 November 1989 0838-EST From: DAVID@PENNDRLS Subject: Re: porting an MS-DOS FORTH to 386 Unix/Xenix To: FIGI-L@SCFVM I'm not sure exactly what you are hoping to get out of the net on this question. I've only played with F83 and I've only had a glancing brush with an older version of Xenix for the AT, so I'm not sure I have much to offer you, *but*....I'll stick my neck out a little and mumble about fundamentals..... If I were trying to get FORTH up native under Xenix on an AT, I'd start with F83. I'd hack around in Xenix until I thought I understood how the Xenix equivalent of a .EXE file was laid out in a disk file. Then I would modify the F83 save system command (I forget its exact name) to write its output in that format. Then I'd dummy up a simple 'hello world' program in F83 assembler and use a variation of the new save system to write it in Xenix format. Xenix has (last time I used it) some sort of program to import files from DOS. I presume once you have the file on the Xenix system you could then tell Xenix that it was an exacutable. If the hello world program works, you're about halfway done. The next step is to go to the F83 BDOS function and figure out what the equivalents for all the DOS function calls are in Xenix. First pass I'd probably rewrite BDOS as a humongoid monster with lots of internal logic so that the externals to the rest of F83 stayed the same. Metacompile, savesys, import to Xenix, and see if it runs. It will crash, of course. I hope Xenix has some good binary debugging tools (the equivalent of DOS DEBUG will probably be needed). Keep hacking at the DOS version until you get a working Xenix version. Now you can switch to Xenix and start reworking F83 from the ground up to fit better into the Xenix environment. Mostly that would probably mean rewriting the words that call BDOS, and adding stuff for making use of other Xenix features. I'm sure someone with a more extensive knowledge of Xenix will tell me why all this wouldn't work. But it's where I would start. Good luck, anyway. :-) And if you think my limited knowledge could be of further help, ask away. -- R. David Murray (DAVID@PENNDRLS.BITNET, DAVID@PENNDRLS.UPENN.EDU) P.S.: F-PC is a direct derivitive of F83, but has a very different internal structure. But, since it is designed for the 8086 instruction set, porting it to 386 Xenix ought to be possible as well. I'd start with F83 as the simpler case, though, before trying F-PC. Of course, this is said from only two hours acquaintence with F-PC (so far) ..... P.P.S: On the other hand, if I was planning to spend my next five years on Xenix, I might write the FORTH from scratch instead. Took me about 2 1/2 months when I did it for VM/CMS ..... not that I've been able to use it much (-sigh-).