Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!uoregon!lth From: lth@uoregon.uoregon.edu (Lars Thomas Hansen) Newsgroups: comp.os.minix Subject: Re: PC Minix/64KB limit Summary: Microsoft got nothing to do with it! Keywords: large data/code under minix/PC Message-ID: <3882@uoregon.uoregon.edu> Date: 18 Feb 89 08:04:26 GMT References: <415@lzaz.ATT.COM> <2485@sun.soe.clarkson.edu> <417@lzaz.ATT.COM> Reply-To: lth@drizzle.UUCP (Lars Thomas Hansen) Organization: University of Oregon, Computer Science, Eugene OR Lines: 49 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: >> I'm no engineer, but can't the PC address 1 meg? Would it be >> difficult to change Minix to use this much space? Since it isn't Messy-Dos, >> could it address 1 meg without those funny little LIM boards? > >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. > [...] >The bottom line is that: >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. Firstly: The 640K limit is real under MINIX, too --- it's not MS-DOS that's at fault, but the PC architecture that uses everything above 640K for its own purposes. Live with it. Learn to love it. Secondly: I believe that Mr. Johnson's claims are somewhat inaccurate: The 8086 (and of course the 8088) have built-in support for large (potentially up to 1M) code and data spaces via far jumps/calls/returns and the lds/les instructions. I don't think it is correct to claim that Microsoft has a monopoly here, evidenced by the large number of MS-DOS C compilers that support these larger code/data spaces... So, to assert this completely: the 8086/186 family can indeed address beyond 64K; perhaps not with infinite grace, but they manage. What *is* true, though, is that in order for anything larger than 64K to run under MINIX, the compiler would indeed have to be rewritten to generate far pointers to code and/or data; this would slow down the code a bit and enlarge the size of both code and data. In addition, the MINIX loader and the object file format would probably have to change, since segment addresses would have to be patched into the loaded image *at load time*, another (potentially quite a bit) slowing factor... In my humble (very much so) opinion, it is best to leave PC-MINIX alone (with its 64K limitation) and rather worry about resolving this problem to everybody's benefit when MINIX is ported to a 80386 and can run in protected mode with a 4 Gb limit. --lars