GAWK: Effective AWK Programming a User’S Guide for GNU Awk Edition 3 October, 2007

Total Page:16

File Type:pdf, Size:1020Kb

GAWK: Effective AWK Programming a User’S Guide for GNU Awk Edition 3 October, 2007 GAWK: Effective AWK Programming A User's Guide for GNU Awk Edition 3 October, 2007 Arnold D. Robbins \To boldly go where no man has gone before" is a Registered Trademark of Paramount Pictures Corporation. Published by: Free Software Foundation 51 Franklin Street, Fifth Floor Boston, MA 02110-1301 USA Phone: +1-617-542-5942 Fax: +1-617-542-2652 Email: [email protected] URL: http://www.gnu.org/ ISBN 1-882114-28-0 Copyright c 1989, 1991, 1992, 1993, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007 Free Software Foundation, Inc. This is Edition 3 of GAWK: Effective AWK Programming: A User's Guide for GNUAwk, for the 3.1.6 (or later) version of the GNU implementation of AWK. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with the Invariant Sections being \GNU General Public License", the Front-Cover texts being (a) (see below), and with the Back-Cover Texts being (b) (see below). A copy of the license is included in the section entitled \GNU Free Documentation License". a. \A GNU Manual" b. \You have freedom to copy and modify this GNU Manual, like GNU software. Copies published by the Free Software Foundation raise funds for GNU development." Cover art by Etienne Suvasa. i Short Contents Foreword::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 1 Preface :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 3 1 Getting Started with awk ::::::::::::::::::::::::::::::::::::::::::::: 10 2 Regular Expressions ::::::::::::::::::::::::::::::::::::::::::::::::: 21 3 Reading Input Files ::::::::::::::::::::::::::::::::::::::::::::::::: 32 4 Printing Output :::::::::::::::::::::::::::::::::::::::::::::::::::: 51 5 Expressions :::::::::::::::::::::::::::::::::::::::::::::::::::::::: 65 6 Patterns, Actions, and Variables ::::::::::::::::::::::::::::::::::::::: 84 7 Arrays in awk ::::::::::::::::::::::::::::::::::::::::::::::::::::: 104 8 Functions::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 113 9 Internationalization with gawk :::::::::::::::::::::::::::::::::::::::: 139 10 Advanced Features of gawk :::::::::::::::::::::::::::::::::::::::::: 147 11 Running awk and gawk :::::::::::::::::::::::::::::::::::::::::::::: 154 12 A Library of awk Functions :::::::::::::::::::::::::::::::::::::::::: 161 13 Practical awk Programs ::::::::::::::::::::::::::::::::::::::::::::: 187 A The Evolution of the awk Language ::::::::::::::::::::::::::::::::::: 224 B Installing gawk :::::::::::::::::::::::::::::::::::::::::::::::::::: 231 C Implementation Notes :::::::::::::::::::::::::::::::::::::::::::::: 248 D Basic Programming Concepts :::::::::::::::::::::::::::::::::::::::: 262 Glossary ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 267 GNU General Public License ::::::::::::::::::::::::::::::::::::::::::::: 275 GNU Free Documentation License :::::::::::::::::::::::::::::::::::::::: 285 Index :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 291 ii Table of Contents Foreword ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 1 Preface ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 3 History of awk and gawk :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 3 A Rose by Any Other Name :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 4 Using This Book:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 4 Typographical Conventions ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 6 The GNU Project and This Book ::::::::::::::::::::::::::::::::::::::::::::::::::::::: 6 How to Contribute:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 8 Acknowledgments::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 8 1 Getting Started with awk :::::::::::::::::::::::::::::::::::: 10 1.1 How to Run awk Programs ::::::::::::::::::::::::::::::::::::::::::::::::::::::: 10 1.1.1 One-Shot Throwaway awk Programs ::::::::::::::::::::::::::::::::::::::::: 10 1.1.2 Running awk Without Input Files:::::::::::::::::::::::::::::::::::::::::::: 11 1.1.3 Running Long Programs ::::::::::::::::::::::::::::::::::::::::::::::::::::: 11 1.1.4 Executable awk Programs:::::::::::::::::::::::::::::::::::::::::::::::::::: 12 1.1.5 Comments in awk Programs ::::::::::::::::::::::::::::::::::::::::::::::::: 12 1.1.6 Shell-Quoting Issues ::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 13 1.2 Data Files for the Examples :::::::::::::::::::::::::::::::::::::::::::::::::::::: 14 1.3 Some Simple Examples ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 15 1.4 An Example with Two Rules ::::::::::::::::::::::::::::::::::::::::::::::::::::: 17 1.5 A More Complex Example:::::::::::::::::::::::::::::::::::::::::::::::::::::::: 17 1.6 awk Statements Versus Lines:::::::::::::::::::::::::::::::::::::::::::::::::::::: 18 1.7 Other Features of awk :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 20 1.8 When to Use awk::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 20 2 Regular Expressions:::::::::::::::::::::::::::::::::::::::::: 21 2.1 How to Use Regular Expressions:::::::::::::::::::::::::::::::::::::::::::::::::: 21 2.2 Escape Sequences :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 22 2.3 Regular Expression Operators :::::::::::::::::::::::::::::::::::::::::::::::::::: 23 2.4 Using Character Lists :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 25 2.5 gawk-Specific Regexp Operators :::::::::::::::::::::::::::::::::::::::::::::::::: 27 2.6 Case Sensitivity in Matching ::::::::::::::::::::::::::::::::::::::::::::::::::::: 28 2.7 How Much Text Matches? :::::::::::::::::::::::::::::::::::::::::::::::::::::::: 29 2.8 Using Dynamic Regexps :::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 29 2.9 Where You Are Makes A Difference::::::::::::::::::::::::::::::::::::::::::::::: 30 3 Reading Input Files :::::::::::::::::::::::::::::::::::::::::: 32 3.1 How Input Is Split into Records :::::::::::::::::::::::::::::::::::::::::::::::::: 32 3.2 Examining Fields::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 35 3.3 Nonconstant Field Numbers :::::::::::::::::::::::::::::::::::::::::::::::::::::: 35 3.4 Changing the Contents of a Field ::::::::::::::::::::::::::::::::::::::::::::::::: 36 3.5 Specifying How Fields Are Separated ::::::::::::::::::::::::::::::::::::::::::::: 38 3.5.1 Using Regular Expressions to Separate Fields :::::::::::::::::::::::::::::::: 39 3.5.2 Making Each Character a Separate Field::::::::::::::::::::::::::::::::::::: 39 3.5.3 Setting FS from the Command Line :::::::::::::::::::::::::::::::::::::::::: 40 iii 3.5.4 Field-Splitting Summary::::::::::::::::::::::::::::::::::::::::::::::::::::: 41 3.6 Reading Fixed-Width Data ::::::::::::::::::::::::::::::::::::::::::::::::::::::: 42 3.7 Multiple-Line Records :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 43 3.8 Explicit Input with getline :::::::::::::::::::::::::::::::::::::::::::::::::::::: 45 3.8.1 Using getline with No Arguments :::::::::::::::::::::::::::::::::::::::::: 46 3.8.2 Using getline into a Variable ::::::::::::::::::::::::::::::::::::::::::::::: 46 3.8.3 Using getline from a File ::::::::::::::::::::::::::::::::::::::::::::::::::: 47 3.8.4 Using getline into a Variable from a File ::::::::::::::::::::::::::::::::::: 47 3.8.5 Using getline from a Pipe :::::::::::::::::::::::::::::::::::::::::::::::::: 48 3.8.6 Using getline into a Variable from a Pipe::::::::::::::::::::::::::::::::::: 49 3.8.7 Using getline from a Coprocess::::::::::::::::::::::::::::::::::::::::::::: 49 3.8.8 Using getline into a Variable from a Coprocess ::::::::::::::::::::::::::::: 49 3.8.9 Points to Remember About getline ::::::::::::::::::::::::::::::::::::::::: 50 3.8.10 Summary of getline Variants :::::::::::::::::::::::::::::::::::::::::::::: 50 4 Printing Output :::::::::::::::::::::::::::::::::::::::::::::: 51 4.1 The print Statement :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 51 4.2 Examples of print Statements ::::::::::::::::::::::::::::::::::::::::::::::::::: 51 4.3 Output Separators ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 52 4.4 Controlling Numeric Output with print :::::::::::::::::::::::::::::::::::::::::: 53 4.5 Using printf Statements for Fancier Printing::::::::::::::::::::::::::::::::::::: 53 4.5.1 Introduction to the printf Statement ::::::::::::::::::::::::::::::::::::::: 53 4.5.2 Format-Control Letters :::::::::::::::::::::::::::::::::::::::::::::::::::::: 54 4.5.3 Modifiers for printf Formats :::::::::::::::::::::::::::::::::::::::::::::::: 55 4.5.4 Examples Using printf ::::::::::::::::::::::::::::::::::::::::::::::::::::: 57 4.6 Redirecting Output of print and printf ::::::::::::::::::::::::::::::::::::::::: 58 4.7 Special File Names in gawk ::::::::::::::::::::::::::::::::::::::::::::::::::::::: 60 4.7.1 Special Files for Standard Descriptors:::::::::::::::::::::::::::::::::::::::: 60 4.7.2 Special Files for Process-Related Information :::::::::::::::::::::::::::::::: 61 4.7.3 Special Files for Network Communications ::::::::::::::::::::::::::::::::::: 62 4.7.4 Special File Name Caveats ::::::::::::::::::::::::::::::::::::::::::::::::::: 62 4.8 Closing Input and Output Redirections ::::::::::::::::::::::::::::::::::::::::::: 62 5 Expressions ::::::::::::::::::::::::::::::::::::::::::::::::::: 65 5.1 Constant Expressions:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Recommended publications
  • Asmc Macro Assembler Reference Asmc Macro Assembler Reference
    Asmc Macro Assembler Reference Asmc Macro Assembler Reference This document lists some of the differences between Asmc, JWasm, and Masm. In This Section Asmc Command-Line Option Describes the Asmc command-line option. Asmc Error Messages Describes Asmc fatal and nonfatal error messages and warnings. Asmc Extensions Provides links to topics discussing Masm versus Asmc. Directives Reference Provides links to topics discussing the use of directives in Asmc. Symbols Reference Provides links to topics discussing the use of symbols in Asmc. Change Log | Forum Asmc Macro Assembler Reference Asmc Command-Line Reference Assembles and links one or more assembly-language source files. The command-line options are case sensitive. ASMC [[options]] filename [[ [[options]] filename]] options The options listed in the following table. Set CPU: 0=8086 (default), 1=80186, 2=80286, 3=80386, 4=80486, /[0|1|..|10][p] 5=Pentium,6=PPro,7=P2,8=P3,9=P4,10=x86-64. [p] allows privileged instructions. /assert Generate .assert(code). Same as .assert:on. /bin Generate plain binary file. Push user registers before stack-frame is created in a /Cs proc. /coff Generate COFF format object file. /Cp Preserves case of all user identifiers. /Cu Maps all identifiers to upper case (default). Link switch used with /pe -- subsystem:console /cui (default). /Cx Preserves case in public and extern symbols. Defines a text macro with the given name. If value is /Dsymbol[[=value]] missing, it is blank. Multiple tokens separated by spaces must be enclosed in quotation marks. /enumber Set error limit number. /elf Generate 32-bit ELF object file. /elf64 Generate 64-bit ELF object file.
    [Show full text]
  • EZ-USB® FX3™ Technical Reference Manual
    EZ-USB® FX3™ Technical Reference Manual Spec No.: 001-76074 Rev. *E May 31, 2017 Cypress Semiconductor 198 Champion Court San Jose, CA 95134-1709 www.cypress.com Copyrights Copyrights © Cypress Semiconductor Corporation, 2012-2017. This document is the property of Cypress Semiconductor Corporation and its subsidiaries, including Spansion LLC ("Cypress"). This document, including any software or firmware included or refer- enced in this document ("Software"), is owned by Cypress under the intellectual property laws and treaties of the United States and other countries worldwide. Cypress reserves all rights under such laws and treaties and does not, except as spe- cifically stated in this paragraph, grant any license under its patents, copyrights, trademarks, or other intellectual property rights. If the Software is not accompanied by a license agreement and you do not otherwise have a written agreement with Cypress governing the use of the Software, then Cypress hereby grants you a personal, non-exclusive, nontransferable license (without the right to sublicense) (1) under its copyright rights in the Software (a) for Software provided in source code form, to modify and reproduce the Software solely for use with Cypress hardware products, only internally within your organi- zation, and (b) to distribute the Software in binary code form externally to end users (either directly or indirectly through resell- ers and distributors), solely for use on Cypress hardware product units, and (2) under those claims of Cypress's patents that are infringed by the Software (as provided by Cypress, unmodified) to make, use, distribute, and import the Software solely for use with Cypress hardware products.
    [Show full text]
  • Epi Info, Version 6
    Epi Info, Version 6 A Word-Processing, Database, and Statistics Program for Public Health on IBM-compatible Microcomputers Program design by Andrew G. Dean, Jeffrey A. Dean, Denis Coulombier, Anthony H. Burton, Karl A. Brendel, Donald C. Smith, Richard C. Dicker, Kevin M. Sullivan, Robert F. Fagan, Programming by Jeffrey A. Dean, Denis Coulombier, Donald C. Smith, Karl A. Brendel, Thomas G. Arner, and Andrew G. Dean Manual by Andrew G. Dean Revised for Version 6.03, January 1996 Produced by: The Division of Surveillance and Epidemiology Epidemiology Program Office Centers for Disease Control and Prevention (CDC) Atlanta, Georgia 30333 in collaboration with The Global Programme on AIDS World Health Organization (WHO) Geneva, Switzerland This manual and the programs are in the public domain and may be freely copied, translated, and distributed without restriction. They are available on the Internet at ftp.cdc.gov Suggested citation: Dean AG, Dean JA, Coulombier D, Brendel KA, SmithDC, Burton AH, Dicker RC, Sullivan K, Fagan RF, Arner, TG. Epi Info, Version 6: a word processing, database, and statistics program for public health on IBM- compatible microcomputers. Centers for Disease Control and Prevention, Atlanta, Georgia, U.S.A., 1996. Epi Info Hotline for Technical Assistance (404) 728-0545 FAX (404) 315-6440 [email protected] Acknowledgements Dr. David Martin, Brookline, Mass, and A. Ray Simons, Atlanta, Georgia, provided Turbo Pascal procedures for exact confidence limits. Ruth A. Etzel, M.D., and Daniel C. Rodrigue, M.D., of the Centers for Disease Control and Prevention provided the materials for Chapter 12. S. Kathleen Egan of the Epidemiology Program Office produced portions of the EPED tutorials.
    [Show full text]
  • Interphase V/FDDI 5211 Manual
    Full-service, independent repair center -~ ARTISAN® with experienced engineers and technicians on staff. TECHNOLOGY GROUP ~I We buy your excess, underutilized, and idle equipment along with credit for buybacks and trade-ins. Custom engineering Your definitive source so your equipment works exactly as you specify. for quality pre-owned • Critical and expedited services • Leasing / Rentals/ Demos equipment. • In stock/ Ready-to-ship • !TAR-certified secure asset solutions Expert team I Trust guarantee I 100% satisfaction Artisan Technology Group (217) 352-9330 | [email protected] | artisantg.com All trademarks, brand names, and brands appearing herein are the property o f their respective owners. Find the Interphase V/FDDI 5211 at our website: Click HERE V/FDDI 5211 Adapter Installation and Software Developers Guide Document No. UG05211-000-E Print Date: January 2000 Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com NOTE See Appendix E for Regulatory Statements/Conditions that affect the operation of this product. The CE Declaration of Conformity can be found at www.iphase.com. Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com Copyright Notice © 2000 by Interphase Corporation. All rights reserved. Printed in the United States of America, 2000. This manual is licensed by Interphase to the user for internal use only and is protected by copyright. The user is authorized to download and print a copy of this manual if the user has purchased one or more of the Interphase adapters described herein. All copies of this manual shall include the copyright notice contained herein. No part of this manual, whether modified or not, may be incorporated into user’s documentation without prior written approval of Interphase Corporation 13800 Senlac Dallas, Texas 75234 Phone: (214) 654-5000 Fax: (214) 654-5500 Disclaimer Information in this manual supersedes any preliminary specifications, preliminary data sheets, and prior versions of this manual.
    [Show full text]
  • IBM Thinkpad 365X/365XD User's Guide
    IBM ThinkPad 365X/365XD S76H-7579-00 User's Guide IBM ThinkPad 365X/365XD S76H-7579-00 IBM User's Guide Note Before using this information and the product it supports, be sure to read the general information in Appendix E, Product Warranties and Notices. You should also read the safety guidelines on page xii. First Edition, April 1996 The following paragraph does not apply to the United Kingdom or any country where such provisions are inconsistent with local law: INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES THIS PUBLICATION “AS IS” WITHOUT ANY WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE LIMITED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some states do not allow disclaimer, or express or implied warranties in certain transactions; therefore, this statement may not apply to you. This publication could include technical inaccuracies or typographical errors. Changes are periodically made to the information herein; these changes will be incorporated in new editions of the publication. IBM may make improvements or changes in the products or the programs described in this publication at any time. It is possible that this publication may contain reference to, or information about, IBM products (machines and programs), programming, or services that are not announced in your country. Such references or information must not be construed to mean that IBM intends to announce such IBM products, programming, or services in your country. Requests for technical information about IBM products should be made to your IBM Authorized Dealer or your IBM Marketing Representative. IBM may have patents or pending patent applications covering the subject matter in this document.
    [Show full text]
  • Automated Malware Analysis Report For
    ID: 39901 Sample Name: GUf5eGGUpw.000 Cookbook: default.jbs Time: 00:06:11 Date: 13/12/2017 Version: 20.0.0 Table of Contents Table of Contents 2 Analysis Report 4 Overview 4 General Information 4 Detection 4 Confidence 4 Classification 5 Analysis Advice 5 Signature Overview 6 Key, Mouse, Clipboard, Microphone and Screen Capturing: 6 Software Vulnerabilities: 6 Networking: 6 Boot Survival: 6 Persistence and Installation Behavior: 6 Data Obfuscation: 6 Spreading: 7 System Summary: 7 HIPS / PFW / Operating System Protection Evasion: 7 Anti Debugging: 7 Malware Analysis System Evasion: 7 Hooking and other Techniques for Hiding and Protection: 8 Language, Device and Operating System Detection: 8 Behavior Graph 8 Simulations 8 Behavior and APIs 8 Antivirus Detection 9 Initial Sample 9 Dropped Files 9 Domains 9 Yara Overview 9 Initial Sample 9 PCAP (Network Traffic) 9 Dropped Files 9 Memory Dumps 9 Unpacked PEs 9 Joe Sandbox View / Context 9 IPs 9 Domains 9 ASN 10 Dropped Files 10 Screenshot 11 Startup 11 Created / dropped Files 11 Contacted Domains/Contacted IPs 14 Contacted Domains 14 Contacted IPs 15 Static File Info 15 General 15 File Icon 15 Static PE Info 16 General 16 Entrypoint Preview 16 Data Directories 17 Sections 17 Resources 18 Copyright Joe Security LLC 2017 Page 2 of 34 Imports 18 Possible Origin 19 Network Behavior 19 Network Port Distribution 19 TCP Packets 19 UDP Packets 19 DNS Queries 20 DNS Answers 20 HTTP Request Dependency Graph 20 HTTP Packets 20 Code Manipulations 20 Statistics 20 Behavior 20 System Behavior 20 Analysis
    [Show full text]
  • Attacks on Virtual Machine Emulators
    SYMANTEC ADVANCED THREAT RESEARCH 1 Attacks on Virtual Machine Emulators Peter Ferrie, Senior Principal Researcher, Symantec Advanced Threat Research [email protected] Abstract As virtual machine emulators have become machine emulators, it is clearly difficult to develop a virtual commonplace in the analysis of malicious code, malicious code machine emulator that cannot be detected. Some descriptions has started to fight back. This paper describes known attacks and samples of how to detect Hydra are included in this paper. against the most widely used virtual machine emulators (VMware and VirtualPC). This paper also demonstrates newly discovered The interest in detecting virtual machine emulators is also attacks on other virtual machine emulators (Bochs, Hydra, not limited to the authors of malicious code. If malicious code QEMU, and Xen), and describes how to defend against them. is released that makes use of its own virtual machine emulator, Index Terms Hardware-assisted, Hypervisor, Para- then it will become necessary for anti-malware researchers to virtualization, Virtual Machine find ways to detect the virtual machine emulator, too. Sample detection code is presented in the appendix. For I. INTRODUCTION simplicity and to prohibit trivial copying, only 16-bit real mode assembler code for .COM-format files is supplied. irtual machine emulators have many uses. For anti- V malware researchers, the most common use is to place Virtual machine emulators come in two forms: "hardware- unknown code inside a virtual environment, and watch bound" (also known as para-virtualization) and "pure how it behaves. Once the analysis is complete, the software" (via CPU emulation). The "hardware-bound" environment can be destroyed, essentially without risk to the category can be split into two subcategories: "hardware- real environment that hosts it.
    [Show full text]
  • Peter Ferrie. Attacks on More Virtual Machine Emulators
    SYMANTEC ADVANCED THREAT RESEARCH 1 Attacks on More Virtual Machine Emulators Peter Ferrie, Senior Principal Researcher, Symantec Advanced Threat Research [email protected] Abstract As virtual machine emulators have become knowledge of what has been used to detect existing virtual commonplace in the analysis of malicious code, malicious code machine emulators, it is clearly difficult to develop a virtual has started to fight back. This paper describes known attacks machine emulator that cannot be detected. Some descriptions against the most widely used virtual machine emulators (VMware and samples of how to detect Hydra are included in this paper. and VirtualPC). This paper also demonstrates newly discovered attacks on other virtual machine emulators (Bochs, Hydra, The interest in detecting virtual machine emulators is also QEMU, Sandbox, VirtualBox, and CWSandbox), and describes how to defend against them. not limited to the authors of malicious code. If malicious code is released that makes use of its own virtual machine emulator, Index Terms Hardware-assisted, Hypervisor, Para- then it will become necessary for anti-malware researchers to virtualization, Virtual Machine find ways to detect the virtual machine emulator, too. Sample detection code is presented in Appendix A. For I. INTRODUCTION simplicity and to prohibit trivial copying, only 16-bit real mode assembler code for .COM-format files is supplied. irtual machine emulators have many uses. For anti- malware researchers, the most common use is to place V Virtual machine emulators come in two forms: "hardware- unknown code inside a virtual environment, and watch bound" (also known as para-virtualization) and "pure how it behaves.
    [Show full text]
  • Ÿþe S S B a S E a P I R E F E R E N C E R E L E a S E 1 2 . 2 . 1 . 0
    Oracle® Essbase API Reference Release 12.2.1.0.0 Essbase API Reference, 12.2.1.0.0 Copyright © 1996, 2015, Oracle and/or its affiliates. All rights reserved. Authors: EPM Information Development Team This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited. The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing. If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, then the following notice is applicable: U.S. GOVERNMENT END USERS: Oracle programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, delivered to U.S. Government end users are "commercial computer software" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, shall be subject to license terms and license restrictions applicable to the programs. No other rights are granted to the U.S.
    [Show full text]
  • Memory Management Algorithms and Implementation in C/C++
    Everything about Internet Technology! Chose your section ● Auctions ● Network Marketing ● Business ● Online Promotion ● Computers ● Search Engines ● Domain Names ● Site Promotion ● Downloads ● Software ● eBay ● Technology ● Ebooks ● Video Conferencing ● Ecommerce ● VOIP ● Email Marketing ● Web Design ● Internet Marketing ● Web Development ● HTML ● Web Hosting ● JavaScript ● WIFI ● MP3 Memory Management Algorithms and Implementation in C/C++ by Bill Blunden Wordware Publishing, Inc. Library of Congress Cataloging-in-Publication Data Blunden, Bill, 1969- Memory management: algorithms and implementation in C/C++ / by Bill Blunden. p. cm. Includes bibliographical references and index. ISBN 1-55622-347-1 1. Memory management (Computer science) 2. Computer algorithms. 3. C (Computer program language) 4. C++ (Computer program language) I. Title. QA76.9.M45 .B558 2002 005.4'35--dc21 2002012447 CIP © 2003, Wordware Publishing, Inc. All Rights Reserved 2320 Los Rios Boulevard Plano, Texas 75074 No part of this book may be reproduced in any form or by any means without permission in writing from Wordware Publishing, Inc. Printed in the United States of America ISBN 1-55622-347-1 10987654321 0208 Product names mentioned are used for identification purposes only and may be trademarks of their respective companies. All inquiries for volume purchases of this book should be addressed to Wordware Publishing, Inc., at the above address. Telephone inquiries may be made by calling: (972) 423-0090 This book is dedicated to Rob, Julie, and Theo. And also to David M. Lee “I came to learn physics, and I got Jimmy Stewart” iii Table of Contents Acknowledgments......................xi Introduction.........................xiii Chapter 1 Memory Management Mechanisms. 1 MechanismVersusPolicy..................1 MemoryHierarchy......................3 AddressLinesandBuses...................9 Intel Pentium Architecture .
    [Show full text]
  • Intel® X86/X64 Debugger
    Intel® x86/x64 Debugger TRACE32 Online Help TRACE32 Directory TRACE32 Index TRACE32 Documents ...................................................................................................................... ICD In-Circuit Debugger ................................................................................................................ Processor Architecture Manuals .............................................................................................. x86 ............................................................................................................................................ Intel® x86/x64 Debugger ...................................................................................................... 1 History ................................................................................................................................ 6 Brief Overview of Documents for New Users ................................................................. 7 Welcome Dialog 7 Help Menu 8 Further Documents 9 Warning .............................................................................................................................. 11 Quick Start ......................................................................................................................... 12 Troubleshooting ................................................................................................................ 15 FAQ ....................................................................................................................................
    [Show full text]
  • Graphics in Pmode Video Timing VGA Super VGA (SVGA)
    Graphics in pmode 'How do I enable graphics from protected mode?' 1. You don't. Graphics programming is fun, but graphics are hardly essential for an OS. Don't get side-tracked. 2. Call the BIOS mode-set interrupt in the 16-bit boot code, before the pmode kernel starts. 3. Use protected-mode code to program the VGA directly, without using the BIOS. This works only with VGA- compatible video boards and VGA-compatible video modes. 4. Add a virtual 8086 mode monitor (VMM) to your OS. Call the BIOS mode-set interrupt in virtual 8086 mode. 5. Switch from pmode to real mode, call the BIOS mode-set interrupt in real mode, then return to pmode. 6. Write a protected-mode driver specifically for the SVGA chip used in your video board. Someone else who wants to use your OS must have the same video board (or they must write a new driver for their own video board). 7. Call VBE 3.x BIOS functions in 16-bit protected mode. Few video cards support VBE 3.x. Video timing Dot clock (pixel clock) Character clock = dot clock divided by 8 or 9 Horizontal sync (retrace) frequency = character clock / horizontal total Horizontal total / horizontal displayed ~ 1.2 (20% overscan) Vertical sync (retrace) frequency = horizontal sync frequency / vertical total Vertical total / vertical displayed ~ 1.1 (10% overscan) VGA INT 10h VGA BIOS interrupts which work in real or virtual-8086 mode only, to set mode, change font, etc. Dot clock is one of: 28.35, 25.2, 14.175, or 12.6 MHz Character clock is dot clock divided by 8 or 9 Horizontal sync frequency for very old VGA monitors is always 31.5 kHz.
    [Show full text]