||||||||IIIHIIII O USOO544551A United States Patent (19) 11) Patent Number: 5,144,551 Cepulis (45) Date of Patent: Sep

Total Page:16

File Type:pdf, Size:1020Kb

||||||||IIIHIIII O USOO544551A United States Patent (19) 11) Patent Number: 5,144,551 Cepulis (45) Date of Patent: Sep ||||||||IIIHIIII o USOO544551A United States Patent (19) 11) Patent Number: 5,144,551 Cepulis (45) Date of Patent: Sep. 1, 1992 (54) COMPUTER MEMORY MANAGEMENT METHOD UTILIZING SEGMENTATION OTHER PUBLICATIONS AND PROTECTION TECHNIQUES Oct. 20, 1988 Intel Corporation letter and attachments from Ms. S. Roach regarding emulating 286 Loadall 75)75 InventorI : Darrenen J. Cepulis, Houston,s Tex instruction. Attachments include suggested code for (73) Assignee: Compaq Computer Corporation, emulation. Houston, Tex. Microprocessor and peripheral handbook, vol. I, Intel (21) Appl. No.: 714,552 Corp. 1988, pp. 4-121-4-127. e J. Crawford, P. Gelsinger, Programming the 80386, (22 Filed: Jun. 13, 1991 Sybex, 1987, pp. 54-59, 431-477, 488-489, 644-646. Related U.S. Application Data Primary Examiner-Kevin A. Kriess Attorney, Agent, or Firm-Pravel, Gambrell, Hewitt, 63) Continuation of Ser. No. 354,144, May 19, 1989, aban- Kimball & Krieger doned. ABST 5) Int. C. .............................................. G06F 12/00 (57)7 RAct 52) U.S. C. ............................. 395/425; 364/DIG. 1; A method for managing memory in a computer system 364/232.9, 364/246.6, 364/246.7:364/247; utilizing Intel Corporation's method of segmentation, 364/247.3; 364/247.2; 364/243; 364/243.4; memory management and protection techniques. The 364/243.41; 364/255.7; 364/255.1; 364/254.8; method is directed toward loading all computer regis 364/264; 364/264. 1; 364/DIG. 1; 395/650; ters and segment descriptor tables from a table of pre 395/700 stored values in memory while operating in real mode. 58) Field of Search ........................ 395/650, 700, 425 At least two of the registers addresses are in excess of the real mode boundary of 1 Mbyte. The method de (56) References Cited scribed permits these registers to be loaded, without the U.S. PATENT DOCUMENTS ... generation of illegal flag values or general protection 4,525,780 6/1985 Bratt et al. .......................... 364/200 violations. 4,580,217 4/1986 Celio ............... A. ... 364/200 4,761,737 8/1988 Duvall et al. ....................... 364200 3 Claims, 8 Drawing Sheets 14 1 O 16 ('-12 Ya NDEX P T RPL Ds 15 3 2 O U.S. Patent Sep. 1, 1992 Sheet 1 of 8 5,144,551 14 1 YaO INDEX 16? ( rp? 12 Ds 15 3 2 O F.G. 1A 24b N 26 18 240 22 BASE ATTRIBUTES BASELO LIMIT 63 56 55 4O 39 1615 O - - 7 - - - H - He 555453oxoavur 52 51 unpople,4847 45 4443 type40l 126 F.G. 1B VIRTUAL MEMORY | LINEAR ADDRESS SPACE IMT C 28 T Y 20 BASE B -- LIMIT B 16 44 DS INDEX DS DESCRIPTOR BASE B 18 BASE C - LIMIT C 42 LIMIT A BASE C SEGMENT A % BASE A -- LIMIT A 40 BASE A FG. 1 C U.S. Patent Sep. 1, 1992 Sheet 2 of 8 5,144,551 52 SI - O DATA SEG O SEGMENT2 FG. 2A FG. 2B LEVEL O U.S. Patent Sep. 1, 1992 Sheet 3 of 8 5,144,551 FG. 4 U.S. Patent Sep. 1, 1992 Sheet 4 of 8 5,144,551 80286 LOADALL memory format 80286 LOADALL memory format User Register Areo Segment Descriptor Area Offset Offset None MSW ES (BASE) None ES (AR) ES (LIMIT) TR CS (BASE) Flag Word CS (AR) SSCS (BASESSE SS (AR) SS (LIMIT) DS (BASE) DS (AR) DS (LIMIT) GOTR LDT DTR TSS F.G. 5B 5A 386 LOADALL BUFFER Field Type DS GDT LIMIT DS GDT BASE ES GDT LIMIT ES GDT BASE DS GDT 286 LIMIT DS GDT 286 BASELO DS GDT 286 BASEH DS GDT 286 ACCESS DS GOT 286 RESERVED WORD ES GDT 286 Li MIT ES GDT 286 BASELO ES GDT 286 BASEH ES GDT 286 ACCESS ES GDT 286 RESERVED WORD DS LDT 386 Li MIT LO DS LDT 386 BASELLO DS LDT 386 BASEMD DS LDT 386 ACCESS DS LDT 386 LIMIT. H F.G. 5C DS LDT 386 BASEH ES LDT 386 LIMITLO ES LDT 386 BASELLO ES LDT 386 BASEMD ES LDT 386 ACCESS ES LDT 386 LIMIT. H. ES LDT 386 BASEH U.S. Patent Sep. 1, 1992 Sheet 5 of 8 5,144,551 91 O START 7920 SAVE COMMAND STACK FRAME; FAULTING PROTECT INSTRUCTION REGISTERS 286 LOADALL 930 CAPTURE AND SAVE INTERRUPTED COMMAND FAULTING NSTRUCTION 940 386 LOADALL DETERMINE FAULTING WORD AND INSTRUCTION RESTORE STACK FRAME, REGISTERS; CHAN TO FAULTING WORD = LOCK INTERRUPT 6 PREFX 1 120 TERMINATE INCREMENT NSTRUCTION POINTER PAST 1130 LOCK PRINT ERROR MESSAGE AND 970 HANG MACHINE RESTORE COMMAND STACK FRAME AND REGISTERS 98O TERMINATE F.G. 6A U.S. Patent Sep. 1, 1992 Sheet 6 of 8 5,144,551 1150 ENABLE WRITE TO ROM 1220 1160 PONT DS:S TO SET ES REGISTER 28S CACHE TO CODE SEGMENT DESCRIPTOR 1170 1230 SET ES:D INCREMENT DI TO 386 LOADALL TO POINT TO 286 CACHE EMULATION BUFFER 1240 1 18O TRANSFER LIMIT, SET DS: O TO BASE FROM 286 286 LOADALL LOADALL BUFFER BUFFER TO DS GDTR 1250 1190. CLEAR DIRECTION SET DS DESCRIPTOR FLAGS; SET CACHE PRIVLEGE LEVEL = 3 N GNORE - INTERRUPT 386 LOADALL EMULATION BUFFER 12OO RETRIEVE DS SELECTOR FROM 286 LOADALL BUFFER 1270 RETRIEVE ES SELECTOR DESCRIPTOR = SPECIAL FLAG CACHE SELECTOR FROM 286 LOADALL BUFFER SELECTOR SPECIAL FLAG U.S. Patent Sep. 1, 1992 Sheet 7 of 8 5,144,551 POINT DS:S TO 286 ES CACHE DESCRIPTOR 14OO ES:D LOAD LOCAL DESCRIPTOR TABLE FROM LOADALL TRANSFER LIMIT EMULATION BUFFER AND BASE FROM ES 286 LOADAL 1410 BUFFER RETREVE ES SELECTOR FROM 286 SET ES DESCRIPTOR LOADALL BUFFER CACHE PRIV = 3 SELECTOR RETREVE FLAG 1 DS SELECTOR (INVALID) 1350 SELECTOR REPLACE WITH FLAG = 1 SPECIAL FLAG REPLACE WITH (INVALID)p (VALID SELECTOR) SEAL 1350 STORE SELECTOR N D 136O VALID LOAD KNOWN SELECTOR NVALID SELECTOR VALUE NTO VALUE D REGISTER 1380 RETRIEVE DS DESCRIPTOR, CALCUATE PHYS. ADDRESS AND DS DESC. BASE F.G. 6C U.S. Patent Sep. 1, 1992 Sheet 8 of 8 5,144,551 1530 LOAD DTR SAVE ES SELECTOR WITH NEW N S REGISTER ES SELECTOR - 1540 LOAD DS GLOBAL DESCRIPTOR TABLE VALID LOAD KNOWN SELECTOR REGISTERS FROM SELECTOR VALUE VALUE INTO S DS LOADALL EMULATION BUFFER 1550 CLEAR DS SELECTOR RETRIEVE ES DESCRIPTOR, REQUESTED CALCULATE PHYS. PRIVLEGE LEVEL ADDRESS AND DS DESC BASE 1560 LOAD LOTR WITH NEW LOAD LOCAL DS SELECTOR DESCRIPTOR TABLE FROM LOADALL 1570 EMULATION BUFFER RETURN TO REAL MODE SWITCH TO 158O PROTECTED MODE LOAD REMAINING REGISTERS FROM 286 LOADALL LOAD ES GLOBAL BUFFER DESCRIPTOR TABLE REGISTERS FROM 1590 ES 386 LOADALL EMULATION BUFFER CLEAR ES SELECTOR RECQUESTED PRIVILEGE LEVEL F.G. 6D 5,144,551 1 2 Realizing this limitation, Intel introduced with the COMPUTER MEMORY MANAGEMENT 80386 a mode known as 8086 virtual mode. The virtual METHOD UTILIZING SEGMENTATION AND mode supports the memory management and tech PROTECTION TECHNIOUES niques normally utilized by the 80386 and permits 8086 5 virtual tasks to operate as part of a multi-tasking system. This is a continuation of copending application Ser. Thus, the 80386 is capable of running multiple 8086 No. 07/354,144 filed on May 19, 1989 now abandoned. virtual tasks accessing memory addresses in excess of the 1 Mbyte real limit, as well as protected mode 80286 BACKGROUND OF THE INVENTION and 80386 tasks, 1. Field of the Invention 10 However, it will be appreciated that during this evo The present invention relates to memory manage lution of the Intel microprocessor family that a number ment of a computer system utilizing Intel Corporation of instructions written specifically for the 8086 and microprocessors. 80286 were necessarily supported in the 80386. The 2. Description of the Prior Art reason for supporting these machine specific instruc Many of the personal computers used today are based 15 tions is that operating systems or applications programs on the Intel Corporation's family of microprocessors, utilized these special commands as opposed to focusing including the 8088, 8088-2, 8086, 80186 (hereinafter on using the common core of commands. referred to collectively as the 8086), 80286 and 80386. It One of these commands is an undocumented instruc has been Intel's practice to maintain downward compat tion known as the LOADALL command. The LOA ibility throughout its line of microprocessors, such that 20 DALL command is designed to load all of the segment programs designed to run on the 8086 may generally selector registers and segment descriptor caches from run on the 80386 microprocessor. This is accomplished values stored in memory at physical address 800h by maintaining a consistent core of microprocessor (where the h suffix indicates hexadecimal notation). It instructions throughout the family. However, the was designed to be used primarily for Intel testing pur newer microprocessors, the 80286 and 80386, have ex 25 poses. However, its ability to rapidly load all registers panded sets of instructions. The 80286 instruction set is and descriptor caches with a single command resulted a superset of the 8086 instruction set. Similarly, the in its use by operating systems and several applications 80386 instruction set is a superset of the 80286 instruc programs. tion set. In 1988, Intel announced that it was discontinuing However, this compatibility is not without its price. 30 support for the 80386 LOADALL instruction and was The 8086 microprocessor has several limitations. First, going to remove it from the 80386 instruction set. This the 8086 does not support multi-tasking operations. 80386 instruction was used to emulate the 80286 LOA Multi-tasking refers to a computer's ability to run more DALL instruction. Like the 80286 LOADALL instruc than one application at a single time or to run back tion the 386 LOADALL was undocumented.
Recommended publications
  • Beyond MOV ADD XOR – the Unusual and Unexpected
    Beyond MOV ADD XOR the unusual and unexpected in x86 Mateusz "j00ru" Jurczyk, Gynvael Coldwind CONFidence 2013, Kraków Who • Mateusz Jurczyk o Information Security Engineer @ Google o http://j00ru.vexillium.org/ o @j00ru • Gynvael Coldwind o Information Security Engineer @ Google o http://gynvael.coldwind.pl/ o @gynvael Agenda • Getting you up to speed with new x86 research. • Highlighting interesting facts and tricks. • Both x86 and x86-64 discussed. Security relevance • Local vulnerabilities in CPU ↔ OS integration. • Subtle CPU-specific information disclosure. • Exploit mitigations on CPU level. • Loosely related considerations and quirks. x86 - introduction not required • Intel first ships 8086 in 1978 o 16-bit extension of the 8-bit 8085. • Only 80386 and later are used today. o first shipped in 1985 o fully 32-bit architecture o designed with security in mind . code and i/o privilege levels . memory protection . segmentation x86 - produced by... Intel, AMD, VIA - yeah, we all know these. • Chips and Technologies - left market after failed 386 compatible chip failed to boot the Windows operating system. • NEC - sold early Intel architecture compatibles such as NEC V20 and NEC V30; product line transitioned to NEC internal architecture http://www.cpu-collection.de/ x86 - other manufacturers Eastern Bloc KM1810BM86 (USSR) http://www.cpu-collection.de/ x86 - other manufacturers Transmeta, Rise Technology, IDT, National Semiconductor, Cyrix, NexGen, Chips and Technologies, IBM, UMC, DM&P Electronics, ZF Micro, Zet IA-32, RDC Semiconductors, Nvidia, ALi, SiS, GlobalFoundries, TSMC, Fujitsu, SGS-Thomson, Texas Instruments, ... (via Wikipedia) At first, a simple architecture... At first, a simple architecture... x86 bursted with new functions • No eXecute bit (W^X, DEP) o completely redefined exploit development, together with ASLR • Supervisor Mode Execution Prevention • RDRAND instruction o cryptographically secure prng • Related: TPM, VT-d, IOMMU Overall..
    [Show full text]
  • Computing :: Operatingsystems :: DOS Beyond 640K 2Nd
    DOS® Beyond 640K 2nd Edition DOS® Beyond 640K 2nd Edition James S. Forney Windcrest®/McGraw-Hill SECOND EDITION FIRST PRINTING © 1992 by James S. Forney. First Edition © 1989 by James S. Forney. Published by Windcrest Books, an imprint of TAB Books. TAB Books is a division of McGraw-Hill, Inc. The name "Windcrest" is a registered trademark of TAB Books. Printed in the United States of America. All rights reserved. The publisher takes no responsibility for the use of any of the materials or methods described in this book, nor for the products thereof. Library of Congress Cataloging-in-Publication Data Forney, James. DOS beyond 640K / by James S. Forney. - 2nd ed. p. cm. Rev. ed. of: MS-DOS beyond 640K. Includes index. ISBN 0-8306-9717-9 ISBN 0-8306-3744-3 (pbk.) 1. Operating systems (Computers) 2. MS-DOS (Computer file) 3. PC -DOS (Computer file) 4. Random access memory. I. Forney, James. MS-DOS beyond 640K. II. Title. QA76.76.063F644 1991 0058.4'3--dc20 91-24629 CIP TAB Books offers software for sale. For information and a catalog, please contact TAB Software Department, Blue Ridge Summit, PA 17294-0850. Acquisitions Editor: Stephen Moore Production: Katherine G. Brown Book Design: Jaclyn J. Boone Cover: Sandra Blair Design, Harrisburg, PA WTl To Sheila Contents Preface Xlll Acknowledgments xv Introduction xvii Chapter 1. The unexpanded system 1 Physical limits of the system 2 The physical machine 5 Life beyond 640K 7 The operating system 10 Evolution: a two-way street 12 What else is in there? 13 Out of hiding 13 Chapter 2.
    [Show full text]
  • NASM — the Netwide Assembler Version 2.09.04
    NASM — The Netwide Assembler version 2.09.04 -~~..~:#;L .-:#;L,.- .~:#:;.T -~~.~:;. .~:;. E8+U *T +U' *T# .97 *L E8+' *;T' *;, D97 `*L .97 '*L "T;E+:, D9 *L *L H7 I# T7 I# "*:. H7 I# I# U: :8 *#+ , :8 T, 79 U: :8 :8 ,#B. .IE, "T;E* .IE, J *+;#:T*" ,#B. .IE, .IE, © 1996−2010 The NASM Development Team — All Rights Reserved This document is redistributable under the license given in the file "LICENSE" distributed in the NASM archive. Contents Chapter 1: Introduction . .15 1.1 What Is NASM? . .15 1.1.1 Why Yet Another Assembler?. .15 1.1.2 License Conditions . .15 1.2 Contact Information . .16 1.3 Installation. .16 1.3.1 Installing NASM under MS−DOS or Windows . .16 1.3.2 Installing NASM under Unix . .17 Chapter 2: Running NASM . .18 2.1 NASM Command−Line Syntax . .18 2.1.1 The −o Option: Specifying the Output File Name . .18 2.1.2 The −f Option: Specifying the Output File Format . .19 2.1.3 The −l Option: Generating a Listing File . .19 2.1.4 The −M Option: Generate Makefile Dependencies . .19 2.1.5 The −MG Option: Generate Makefile Dependencies . .19 2.1.6 The −MF Option: Set Makefile Dependency File . .19 2.1.7 The −MD Option: Assemble and Generate Dependencies. .19 2.1.8 The −MT Option: Dependency Target Name. .20 2.1.9 The −MQ Option: Dependency Target Name (Quoted) . .20 2.1.10 The −MP Option: Emit phony targets. .20 2.1.11 The −F Option: Selecting a Debug Information Format .
    [Show full text]
  • User's Manual
    User’s Manual P/N 064673-004 ® JANUS 2.4 GHz Installation Utility (4MB) Intermec Technologies Corporation 6001 36th Avenue West P.O. Box 4280 Everett, WA 98203-9280 U.S. service and technical support: 1-800-755-5505 U.S. media supplies ordering information: 1-800-227-9947 Canadian service and technical support: 1-800-688-7043 Canadian media supplies ordering information: 1-800-268-6936 Outside U.S. and Canada: Contact your local Intermec service supplier. The information contained herein is proprietary and is provided solely for the purpose of allowing customers to operate and/or service Intermec manufactured equipment and is not to be released, reproduced, or used for any other purpose without written permission of Intermec. Information and specifications in this manual are subject to change without notice. 1998 by Intermec Technologies Corporation All Rights Reserved The word Intermec, the Intermec logo, JANUS, IRL, TRAKKER, Antares, Duratherm, Precision Print, PrintSet, Virtual Wedge, and CrossBar are either trademarks or registered trademarks of Intermec Corporation. Throughout this manual, trademarked names may be used. Rather than put a trademark () symbol in every occurrence of a trademarked name, we state that we are using the names only in an editorial fashion, and to the benefit of the trademark owner, with no intention of infringement. Manual Change Record This page records the changes to this manual, which was originally released as version 001. Version Date Description of Change 002 12/96 New information was added for the JG2050 and for UDP Plus terminal emulation. 003 9/97 New information was added to describe using the installation utility on a JG2010.
    [Show full text]
  • NASM — the Netwide Assembler
    NASM — The Netwide Assembler version 2.12.02 © 1996−2016 The NASM Development Team — All Rights Reserved This document is redistributable under the license given in the file "LICENSE" distributed in the NASM archive. Contents Chapter 1: Introduction . .16 1.1 What Is NASM? . .16 1.1.1 Why Yet Another Assembler?. .16 1.1.2 License Conditions . .16 1.2 Contact Information . .17 1.3 Installation. .17 1.3.1 Installing NASM under MS−DOS or Windows . .17 1.3.2 Installing NASM under Unix . .18 Chapter 2: Running NASM . .19 2.1 NASM Command−Line Syntax . .19 2.1.1 The −o Option: Specifying the Output File Name . .19 2.1.2 The −f Option: Specifying the Output File Format . .20 2.1.3 The −l Option: Generating a Listing File . .20 2.1.4 The −M Option: Generate Makefile Dependencies . .20 2.1.5 The −MG Option: Generate Makefile Dependencies . .20 2.1.6 The −MF Option: Set Makefile Dependency File . .20 2.1.7 The −MD Option: Assemble and Generate Dependencies. .21 2.1.8 The −MT Option: Dependency Target Name. .21 2.1.9 The −MQ Option: Dependency Target Name (Quoted) . .21 2.1.10 The −MP Option: Emit phony targets. .21 2.1.11 The −F Option: Selecting a Debug Information Format . .21 2.1.12 The −g Option: Enabling Debug Information. .21 2.1.13 The −X Option: Selecting an Error Reporting Format. .21 2.1.14 The −Z Option: Send Errors to a File. .22 2.1.15 The −s Option: Send Errors to stdout ............................22 2.1.16 The −i Option: Include File Search Directories .
    [Show full text]
  • On Improving Cybersecurity Through Memory Isolation Using Systems Management Mode
    On Improving Cybersecurity Through Memory Isolation Using Systems Management Mode A thesis submitted for the degree of Doctor of Philosophy James Andrew Sutherland School of Design and Informatics University of Abertay Dundee August 2018 i Abstract This thesis describes research into security mechanisms for protecting sensitive areas of memory from tampering or intrusion using the facilities of Systems Man- agement Mode. The essence and challenge of modern computer security is to isolate or contain data and applications in a variety of ways, while still allowing sharing where desir- able. If Alice and Bob share a computer, Alice should not be able to access Bob’s passwords or other data; Alice’s web browser should not be able to be tricked into sending email, and viewing a social networking web page in that browser should not allow that page to interact with her online banking service. The aim of this work is to explore techniques for such isolation and how they can be used usefully on standard PCs. This work focuses on the creation of a small dedicated area to perform cryp- tographic operations, isolated from the rest of the system. This is a sufficiently useful facility that many modern devices such as smartphones incorporate dedic- ated hardware for this purpose, but other approaches have advantages which are discussed. As a case study, this research included the creation of a secure web server whose encryption key is protected using this approach such that even an intruder with full Administrator level access cannot extract the key. A proof of concept backdoor which captures and exfiltrates encryption keys using a modified processor wasalso demonstrated.
    [Show full text]
  • NASM — the Netwide Assembler
    NASM — The Netwide Assembler version 2.10.09 © 1996−2012 The NASM Development Team — All Rights Reserved This document is redistributable under the license given in the file "LICENSE" distributed in the NASM archive. Contents Chapter 1: Introduction . .16 1.1 What Is NASM? . .16 1.1.1 Why Yet Another Assembler?. .16 1.1.2 License Conditions . .16 1.2 Contact Information . .17 1.3 Installation. .17 1.3.1 Installing NASM under MS−DOS or Windows . .17 1.3.2 Installing NASM under Unix . .18 Chapter 2: Running NASM . .19 2.1 NASM Command−Line Syntax . .19 2.1.1 The −o Option: Specifying the Output File Name . .19 2.1.2 The −f Option: Specifying the Output File Format . .20 2.1.3 The −l Option: Generating a Listing File . .20 2.1.4 The −M Option: Generate Makefile Dependencies . .20 2.1.5 The −MG Option: Generate Makefile Dependencies . .20 2.1.6 The −MF Option: Set Makefile Dependency File . .20 2.1.7 The −MD Option: Assemble and Generate Dependencies. .21 2.1.8 The −MT Option: Dependency Target Name. .21 2.1.9 The −MQ Option: Dependency Target Name (Quoted) . .21 2.1.10 The −MP Option: Emit phony targets. .21 2.1.11 The −F Option: Selecting a Debug Information Format . .21 2.1.12 The −g Option: Enabling Debug Information. .21 2.1.13 The −X Option: Selecting an Error Reporting Format. .21 2.1.14 The −Z Option: Send Errors to a File. .22 2.1.15 The −s Option: Send Errors to stdout ............................22 2.1.16 The −i Option: Include File Search Directories .
    [Show full text]
  • The Netwide Assembler
    NASM – The Netwide Assembler version 2.15.05rc1 © 1996-2020 The NASM Development Team — All Rights Reserved This document is redistributable under the license given in the section "License". Contents Chapter 1: Introduction . 17 1.1 What Is NASM?. 17 1.1.1 License . 17 Chapter 2: Running NASM . 19 2.1 NASM Command-Line Syntax . 19 2.1.1 The -o Option: Specifying the Output File Name . 19 2.1.2 The -f Option: Specifying the Output File Format . 20 2.1.3 The -l Option: Generating a Listing File . 20 2.1.4 The -L Option: Additional or Modified Listing Info . 20 2.1.5 The -M Option: Generate Makefile Dependencies . 21 2.1.6 The -MG Option: Generate Makefile Dependencies . 21 2.1.7 The -MF Option: Set Makefile Dependency File . 21 2.1.8 The -MD Option: Assemble and Generate Dependencies . 21 2.1.9 The -MT Option: Dependency Target Name . 21 2.1.10 The -MQ Option: Dependency Target Name (Quoted) . 21 2.1.11 The -MP Option: Emit phony targets . 21 2.1.12 The -MW Option: Watcom Make quoting style . 21 2.1.13 The -F Option: Selecting a Debug Information Format . 22 2.1.14 The -g Option: Enabling Debug Information. 22 2.1.15 The -X Option: Selecting an Error Reporting Format . 22 2.1.16 The -Z Option: Send Errors to a File . 22 2.1.17 The -s Option: Send Errors to stdout ...........................22 2.1.18 The -i Option: Include File Search Directories . 23 2.1.19 The -p Option: Pre-Include a File .
    [Show full text]
  • Writing OS/2 Warp Device Drivers in C Third Edition 2
    1 Tuesday, May 06, 1997 Writing OS/2 Warp Device Drivers in C Third Edition 2 Disclaimer This book and software are provided -as is.' The implied warranties of merchantability and fitness for a particular purpose are expressly disclaimed. This book and software may contain programs that are furnished as examples. These examples have not been thoroughly tested under all conditions. Therefore, the reliability, serviceability, or function of any program or program code herein is not guaranteed. The information presented in this book was valid at the time it was written and was conveyed as accurately as possible by the author. However, some information may be incorrect or may have changed prior to publication. The author makes no claims that the material contained in this book is entirely correct, and assumes no liability for use of the material contained herein. 3 Trademarks and Copyrights IBM, AT, OS/2, Personal System/2, PS/2, and Micro Channel are registered trademarks of the International Business Machines Corporation. C/2, XT, and Presentation Manager are trademarks of International Business Machines Corporation. Intel is a registered trademark of the Intel Corporation. Lotus 1-2-3 is a registered trademark of Lotus Development Corporation. MS-DOS, CodeView and Microsoft are registered trademarks of Microsoft Corporation. Microsoft and Microsoft Windows are registered trademarks of Microsoft Corporation. UNIX is a registered trademark of AT&T Bell Laboratories. Copyright 1993 by Van Nostrand Reinhold Library of Congress Catalog Card Number 93-2264 ISBN 0-442-01729-4 All rights reserved. No part of this work covered by the copyright hereon may be reproduced or used in any form or by any means-graphic, electronic, or mechanical, including photocopying, recording, taping, or information storage and retrieval systems-without written permission of the publisher.
    [Show full text]
  • EXTENDING DOS a Programmers's Guide to Protected-Mode DOS Second Edition
    EXTENDING DOS A Programmers's Guide to Protected-Mode DOS Second Edition Edited by Ray Duncan Ray Duncan Charles Petzold Andrew Schulman M. Steven Baker Ross P. Nelson Stephen R. Davis Robert Moote Addison-Wesley Publishing Company, Inc. Reading, Massachusetts Menlo Park, California New York Don Mills, Ontario Wokingham, England Amsterdam Bonn Sydney Singapore Tokyo Madrid San Juan Paris Seoul Milan Mexico City Taipei Chapter 1—Programming the IBM PC j By Ross P. Nelson DOS Lives -i The Quest for RAM 2 The IBM PC Architecture 5 A New Family Member 7 Solving Real Problems IQ Using Protected Mode 25 DOS Extenders 23 Intel's 32-bit Microprocessors 24 Operating Environments 3Q What About OS/2? 31 Choosing Your Market 32 Chapter 2—Expanded Memory and the EMS 35 By Ray Duncan Components of Expanded Memory 37 Obtaining Access to Expanded Memory 40 Using Expanded Memory 44 EMS Pitfalls for Drivers and TSRs 49 EMS Emulators 52 EMS Example Program 54 Chapter 3—Extended Memory and the XMS 75 By Ray Duncan Reaching Extended Memory in Real Mode 78 The ROM BIOS Extended Memory Functions 79 Primitive Extended Memory Management 85 The eXtended Memory Specification (XMS) EXTENDING DOS, Second Edition Programming Example: The XMSDISK.SYS Driver 96 XMS Example Program 97 LOADALL: The Back Door to Extended Memory 116 Chapter 4—16-bit Protected-Mode DOS Extenders 121 By Andrew Schulman 123 Isn't the 286 Outdated? 124 DOS: The Outer Limits Protected-Mode MS-DOS ^7 No More Overlays BigMalloc Protected-Mode C++ Creating the Illusion 143 INT 21h Isn't Enough 146 The RUN286 Loader 150 Compatibility 153 Debugging with CVP and TDW under DOS 159 Isn't There Any Work Involved? 162 Bugs! 164 Real-Mode Practices 173 Limits to Transparency 188 New Features 191 Benefits and Limitations 295 Chapter 5—32-bit Protected-Mode DOS Extenders By M.
    [Show full text]
  • Protected Mode Registers As Universal Registers, Avoiding Any Interrupts, Employing the Wait-State for Other Than Its Intended Purpose, and So On
    PROTE CTE D he air-to-surface battle of 1991 demonstrated once again that among postmodern strategies of appearance, none is as effective as the simulation that there really is software. Until the proof to the contrary on the field of combat—where computers unambiguously revealed themselves as hardware for the destruction of Iraqi hardware (as durable goods are still called in everyday English)—advertising brochures and media conferences spread the fairytale of a development of software that would become increas- ingly more innocuous and user-friendly, more spiritual and intelli- gent, until one day in the not so distant future it would effectively lead to German idealism—that is, it would become human. And that is why software, the billion-dollar enterprise out of one of the cheapest elements on Earth, makes every attempt to prevent the aforenamed humans from ever even coming into contact with the corresponding hardware. With Word 5.0 on a no-name AT 386 and (as one so nicely says) under the operating system Microsoft DOS 3.3, one can write entire essays on precisely these three entities without even suspecting the strategy of appearance. For one writes—the 'under' says it already—as a subject or underling of the Microsoft Corporation. This worm's-eye view did not always prevail. In the good old days when microprocessor pins were still big enough for simple sol- dering irons, even literary critics could do whatever they wished with Intel's 8086 Processor. Even standard chips, which at that time still required one hundred thirty-three cycles for the multiplication of a single whole number, could be raised to the processing speed of primitive signal processors through a variety of strategies: not dif- ferentiating between RAM and ROM, misusing both of the stack 156 Protected Mode registers as universal registers, avoiding any interrupts, employing the wait-state for other than its intended purpose, and so on.
    [Show full text]
  • Dynamic Re-Compilation of Binary RISC Code for CISC Architectures
    d d d d d d d d d d d d d d d d d d d d Technische Universitat¨ Munchen¨ Institut fur¨ Informatik Diplomarbeit Dynamic Re-compilation of Binary RISC Code for CISC Architectures Verfasser: Michael Steil Betreuer: Dr. Georg Acher Aufgabensteller: Prof. Dr. A.Bode Abgabetermin: 15. September 2004 Ich versichere, daß ich diese Diplomarbeit selbstandig¨ verfaßt und keine anderen als die angegebenen Quellen und Hilfsmittel verwendet habe. Munchen,¨ den 15.09.2004 Abstract This thesis describes a dynamic binary translation system that has the following features: • RISC (PowerPC) machine code is translated into CISC (i386) code. Special prob- lems caused by this combination, such as register allocation and condition code con- version, are addressed. • A modified hotspot method is used to do recompilation in two translation passes in order to gain speed. • The first translation pass is optimized for maximum translation speed and designed to be only slightly slower than one interpretive run. • The system optimizes common cases found in compiled user mode code, such as certain stack operations. The idea of this system is not to develop a high-level decompiler/compiler combination, but to do translation on a very low level and on an instruction basis. The recompiler that has been developed contains • recompiler technology that only needs about 25% more time per instruction for trans- lation compared to a single interpretation, and produces code that is only 3 to 4 times slower than native code. • recompiler technology that only needs about double the time per instruction for trans- lation compared to a single interpretation, and produces code that only takes twice as long for execution as native code.
    [Show full text]