Reference Manual
Total Page:16
File Type:pdf, Size:1020Kb
010 Editor - Reference Manual v3.2 Reference Manual www.sweetscape.com Copyright © 2003-2011 SweetScape Software 1 Copyright © 2003 - 2011 © 2003-2011 SweetScape Software Charlottetown, PEI, Canada No part of this book may be used or reproduced in any form or by any means, electronic or otherwise, without the prior written permission of SweetScape Software. While every precaution has been taken in the preparation of this book, the publisher and the author assume no responsibility for errors or omissions. Neither is any liability assumed for damages resulting from the use of the information or instructions contained herein. It is further stated that the publisher and author are not responsible for any damage or loss to your data or your equipment that results directly or indirectly from your use of this book. 010 Editor - Reference Manual Table of Contents . What is 010 Editor? 6 . Getting Started with 010 Editor . Introduction to Number Systems 8 . Introduction to Byte Ordering 10 . Introduction to the Data Engine 11 . What's New in Version 3.2? 12 . Notes for Users of 010 Editor v2.1 14 . Using 010 Editor - Basic Editing . Introduction to Editing 17 . Opening Files 18 . Using File Tabs 19 . Using the Text Editor 21 . Using the Hex Editor 24 . Working with Interfaces 27 . Selecting Bytes 29 . Using the Clipboard 30 . Status Bar 32 . Saving Files 34 . Using the Startup Page 35 . Using 010 Editor - Advanced Editing . Editing Drives 37 . Editing Processes 40 . Using the Workspace 43 . Using the Inspector 45 . Using Bookmarks 48 . Using Find 50 . Using Replace 53 . Using Find in Files 55 . Using Replace in Files 57 . Using Goto 59 . Using Paste Special 61 . Selecting a Range 62 . Inserting or Overwriting Bytes 63 . Inserting or Overwriting Files 65 . Setting the File Size 66 . File Properties 67 . Importing/Exporting Files 70 . Command Line Parameters 73 . Using Tool Bars 78 . Printing Documents . Printing 79 . Print Preview 80 . Page Setup 81 . Using 010 Editor - Tools . Calculator 83 . Comparing Files 85 . Hex Operations 88 Copyright © 2003-2011 SweetScape Software 3 010 Editor - Reference Manual . Converting Files 90 . Histograms 92 . Check Sum/Hash Algorithms 94 . Base Converter 97 . Using 010 Editor - Templates and Scripts . Introduction to Templates and Scripts 98 . Running Templates and Scripts 100 . Working with Template Results 102 . Writing Scripts . Script Basics 104 . Expressions 105 . Declaring Script Variables 107 . Data Types, Typedefs, and Enums 108 . Arrays and Strings 110 . Control Statements 112 . Functions 115 . Special Keywords 117 . Preprocessor 120 . Includes 123 . Script Limitations 124 . Writing Templates . Template Basics 125 . Declaring Template Variables 127 . Structs and Unions 131 . Arrays, Duplicates, and Optimizing 134 . Bitfields 136 . Editing with Scripts 138 . Custom Variables 139 . On-Demand Structures 141 . Template Limitations 143 . Function Reference . Interface Functions 144 . I/O Functions 157 . String Functions 163 . Math Functions 170 . Tool Functions 172 . Menu Reference . File Menu 180 . Edit Menu 182 . Search Menu 184 . View Menu 186 . Scripts Menu 189 . Templates Menu 190 . Tools Menu 191 . Window Menu 192 . Help Menu 193 . Options Reference . General Options 194 . Editor Options 196 . Text Editor Options 198 . Hex Editor Options 200 . File Interface Options 202 . Color Options 204 . Font Options 207 . Backup Options 209 . Memory Options 210 4 Copyright © 2003-2011 SweetScape Software 010 Editor - Reference Manual . Keyboard Options 211 . Program Options 212 . Highlight Options 214 . Compiling Options 216 . Script Options 218 . Template Options 220 . Importing Options 222 . How to Buy 010 Editor 223 . How to Get Support 226 . License Agreement 227 . Release Notes 229 Copyright © 2003-2011 SweetScape Software 5 010 Editor - Reference Manual What is 010 Editor? 010 Editor is a professional text editor and hex editor designed to quickly and easily edit the contents of any file on your computer. This software can edit simple text files including Unicode files, batch files, C/C++ source code, etc. but where 010 Editor excels is in editing binary files. A binary file is a file that is computer-readable but not human- readable (a binary file will appear as garbled characters if opened in a text editor). A hex editor is a program that allows you to view and edit the individual bytes of binary files and advanced hex editors including 010 Editor also allow you to edit the bytes of hard drives, floppy drives, memory keys, flash drives, CD-ROMs, processes, etc. Here are just some of the benefits of using 010 Editor: . View and edit any binary file on your hard drive (unlimited file size) and text files including Unicode files, C/C++ source code, etc. Unique Binary Templates technology allows you to understand any binary file format. Find and fix problems with hard drives, floppy drives, memory keys, flash drives, CD-ROMs, processes, etc. Analyze and edit text and binary data with powerful tools including Find, Replace, Find in Files, Replace in Files, Binary Comparisons, Checksum/Hash Algorithms, Histograms, etc. Powerful scripting engine allows automation of many tasks (language is very similar to C). Import and export your binary data in a number of different formats. 010 Editor's unique Binary Templates technology allows you to understand the bytes of a binary file by presenting you with the file parsed into an easy-to-use structure. For an example of how Binary Templates work, open any ZIP, BMP, or WAV file on your computer and a Binary Template will automatically be run on the file. Binary Templates are easy to write and look similar to C/C++ structures except they are very powerful and can be configured to parse any binary format. A repository of Templates that other people have written is available online. For more information on Binary Templates see Introduction to Templates and Scripts. The hex editor built into 010 Editor can load files of any size instantly, and features unlimited undo and redo on all editing operations. The editor can even copy or paste huge blocks of data between files instantly. Try 010 Editor and we're sure you'll agree that 010 Editor is the most powerful hex editor available today! For more information on how 010 Editor works see: 6 Copyright © 2003-2011 SweetScape Software 010 Editor - Reference Manual . Introduction to Number Systems . Introduction to Byte Ordering . Introduction to the Data Engine To begin editing files see: . Introduction to Editing For information on how Binary Templates and Scripts can be used to edit files see: . Introduction to Templates and Scripts 010 Editor can be downloaded and used free for 30 days. After that time, the program must be registered. For more information see: . How to Buy 010 Editor If you have any questions or problems, information on contacting SweetScape Software can be found here: . How to Get Support Thank you and we hope you enjoy using 010 Editor! Related Topics: Introduction to Templates and Scripts Introduction to Number Systems Introduction to the Data Engine Introduction to Editing How to Buy 010 Editor How to Get Support Copyright © 2003-2011 SweetScape Software - www.sweetscape.com Copyright © 2003-2011 SweetScape Software 7 010 Editor - Reference Manual Introduction to Number Systems When editing raw hex data, 010 Editor uses a variety of different number systems including decimal, hexadecimal, octal, and binary. Each number system has a different 'base' that is used to convert from a set of digits to a numeric value. For example, the digits '246' can be converted to a number using base 10 by 2*102 + 4*10 + 6 = 246. In general, if the n digits of a number A are numbered where A0 is the right-most digit, A1 is the digit to the left and so on, then the value of a number of base B is calculated: n-1 n-2 An-1*B + An-2*B + ... + A1*B + A0 The following is a list of the 4 number systems used: . Decimal - Numbers are represented as base 10. The digits may be any number from '0' to '9'. For example, in decimal 153 = 1*102 + 5*101 + 3. Hexadecimal - Numbers are represented as base 16. All the decimal digits are used, plus the letters 'A', 'B', 'C', 'D', 'E', and 'F' are used to represent the numbers 10 through 15. For example, in hexadecimal 3d7 = 3*162 + 13*161 + 7 = 983. This system is commonly referred to as Hex. Octal - Numbers are represented as base 8. Only the digits '0' through '7' are used ('8' or '9' is not allowed). For example, the number 2740 = 2*83 + 7*82 + 4*81 + 0 = 1504. Binary - Numbers are represented as base 2. Only the digits '0' or '1' can be used. For example, the number 10110 = 1*24 + 0*23 + 1*22 + 1*s1 + 0 = 22. Bits and Bytes A digit of a binary number is also called a 'bit'. When 8 bits are grouped together, the result is called a 'byte'. Since a byte has 8 binary digits, it can represent any value from 0 up to 255 inclusive. Every file stored on a disk is stored as a set of bytes. Note that when 4 bits are grouped together (base 2), this can also be represented as a single hexadecimal digit (base 16). For example, binary 0101 = '5' hexadecimal, or binary 1111 = 'F' hexadecimal. 010 Editor is designed specifically for editing the individual bytes of a file. When a file is opened for editing, a Hex Editor Window shows the representation of each byte as a hexadecimal number and as a character (see Introduction to Editing for more information). Entering Numbers in Text Fields Almost anywhere a number is entered in 010 Editor (in most text fields, the Inspector, etc.), the program supports input in a number of different formats. Usually, the format of the number is assumed to be decimal (some fields have a Decimal and Hex toggle beside them - clicking the Hex toggle will set the default to be hex).