Path: utzoo!utgpu!utstat!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!ssc-vax!bcsaic!paula From: paula@bcsaic.UUCP (Paul Allen) Newsgroups: comp.os.minix Subject: Re: PC Minix/64KB limit Message-ID: <10171@bcsaic.UUCP> Date: 16 Feb 89 23:19:06 GMT References: <415@lzaz.ATT.COM> <2485@sun.soe.clarkson.edu> <417@lzaz.ATT.COM> Reply-To: paula@bcsaic.UUCP (Paul Allen) Organization: Boeing Computer Services AI Center, Seattle Lines: 57 In article <417@lzaz.ATT.COM> hcj@lzaz.ATT.COM (HC Johnson) writes: >In article <2485@sun.soe.clarkson.edu>, jk0@sun.soe!clutx.clarkson.edu (Jason Coughlin,221 Rey,,) writes: >> [a question about how hard it would be to convert Minix to large-model on PC's] > >Ok, for the non engineers, heres the low down. > >1. the 8088, 8086,80186, 80286 totally lack the ability to address beyond 64KB. > There simply is no such machine operation. Microsoft added the ability > to there C compiler output by adding 'far' pointers that basically pull > 2 16 bit addresses from memory (segment:offset) and access one byte/word > with the effective address. Slow, Clumsey, but the only way to do it. Sorry, this is misinformation. The 808{6,8} intrinsically have the ability to address any byte in a 1Mb address space. All memory addresses are formed by shifting a 16-bit segment number left 4 bytes and then adding a 16-bit offset. Typically, the segment is implicitly one of the four hardware segment registers. It is possible, however, to specify both the segment and offset explicitly in an address. This is what is called a 'far' pointer. As you say, far pointers are somewhat slower than near pointers (which are simple 16-bit offsets from an implied segment). Clumsy? You got that right! >2. the .exe format allows for text, data, or both to exceed 64K, by finishing > the relocation to physical address when the program is loaded. This is > the same idea as the ATARI ST uses when it loads. The .exe format allows for text, data, or both to be split between multiple segments, none of which can exceed 64K. The Atari's 68000 processor is not burdened with segments. >[stuff about expanded and extended memory] >The bottom line is that: >A. only the base 640K is readily useable. But it is available. >B. A program can exceed 64 K only by using the Microsoft extensions. > A MINIX would need to create Microsoft C 5.1 to have a CC command. Part of the problem is finding a compiler that knows about far pointers. Microsoft didn't invent far pointers! Apparently, a large-model ACK compiler for the 8086 exists, but for some reason will not fit in Minix. Too bad. Minix is rapidly evolving into a 'real' operating system, and it could use a large-model compiler. Of course, PC Minix is riddled with code that assumes small-model processes, so more than just the compiler is involved. >C. Beyound that, the port from the Atari ST base should be straight forward. > >Maybe someone with a PC and ATARI ST will buy both MINIX versions and do >the port before Easter as Penance. Good Luck. It would be ironic if the final version of PC Minix ends up being a port of the Atari version! Paul Allen -- ------------------------------------------------------------------------ Paul L. Allen | pallen@atc.boeing.com Boeing Advanced Technology Center | ...!uw-beaver!ssc-vax!bcsaic!pallen