Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!rutgers!ames!ucbcad!ucbvax!cartan!brahms.Berkeley.EDU!ballou From: ballou@brahms.Berkeley.EDU.UUCP Newsgroups: comp.sys.ibm.pc Subject: Re: 286 protected virtual address mode Message-ID: <829@cartan.Berkeley.EDU> Date: Mon, 26-Jan-87 17:25:24 EST Article-I.D.: cartan.829 Posted: Mon Jan 26 17:25:24 1987 Date-Received: Wed, 28-Jan-87 07:09:34 EST References: <4207@utah-cs.UUCP> <1606@cit-vax.Caltech.Edu> Sender: daemon@cartan.Berkeley.EDU Reply-To: ballou@brahms.Berkeley.EDU (Kenneth R. Ballou) Organization: Math Dept. UC Berkeley Lines: 44 Keywords: 80286 assembler >The assembler will, of course, only support the mode that it can access. DOS >can not (as of ver 3.x) access the proteced mode, so having the assembler >support it would be foolish. 1) Why would it be foolish? Allow me to clarify your usage of the expression 'access the protected mode.' It is true that DOS does not run in protected mode. However, it is still quite possible to put the 80286 into protected mode from DOS; you (simply?) have had to set up your own operating system while in real mode to deal with the fact that you make a clean break once you set the protected mode bit in the MSW. Why would it be foolish to have an assembler assemble protected mode instructions? Let me also point out that there are programs which start out running under DOS but which use protected mode of the 80286, e.g., Gold Hill Common Lisp Development System. 2) Please note also that the latest version of the Microsoft Macro Assembler accepts 80286 protected mode instructions. > Xenix, which works in protected mode, supports >the protected mode commands, but not the real mode. You don't get both in >either, because of the way the chip is designed. Excuse me, but this is a crock. The protected mode instruction set is a superset of the real mode instruction set. The main difference between protected mode operation and real mode operation is that segment registers have a different meaning. Instead of containing a paragraph index which refers to an absolute location of memory, they contain segment selectors, which are indices into either the GDT (Global Descriptor Table) or the LDT (Local Descriptor Table). These table entries contain information the processor uses in handling segments, notably the type of the segment, read/write permission, access permission, and whether the segment is present in memory. Note that this is one of the big obstacles to simply setting up table entries to DOS and using DOS routines in protected mode. In order to preserve user registers, DOS accesses data using a CS segment override prefix. This works fine in real mode, but since code segments are not writable in protected mode, the 80286 responds to this with a protection exception. -------- Kenneth R. Ballou ARPA: ballou@brahms.berkeley.edu Department of Mathematics UUCP: ...!ucbvax!brahms!ballou University of California Berkeley, California 94720