Название: Forth Programmer’s Handbook
Авторы: Edward K. Conklin, Elizabeth D. Rather, and the technical staff of FORTH, Inc.
Авторские права: Copyright © 1997-2010 by FORTH, Inc. All rights reserved.
Редакции:First edition, September 1997
Second edition, August 1998
Third edition, August 2007
Latest revision, October 2010
Номер: ISBN 1-4196-7549-4
Издательство: FORTH, Inc., Los Angeles, California,
http://www.forth.comОписание (из книги):About This Book
The Forth Programmer’s Handbook provides a detailed technical refer-
ence for programmers and engineers developing software using Stan-
dard Forth (ANSI X3.215:1994, the standard adopted in 1994 and
reaffirmed in 1999; equivalent to ISO/IEC 15145:1997) provided by
FORTH, Inc. or other vendors. It features Standard Forth and many
extensions commonly in use; some information in this book is taken
directly from the official standard document.
This book assumes the reader has general knowledge of programming
principles and practices, and general familiarity with computer hard-
ware and software systems.
Краткое содержание:Contents
Preface to the Third Edition 11
Welcome! 13
About the Forth Programming Language 13
About This Book 13
How to Use This Book 14
Typographic Conventions 14
Reference Materials 15
How to Proceed 15
1. Introduction 17
1.1 Forth Language Features 18
1.2 Forth Operating System Features 33
1.3 The Forth Assembler 36
1.4 Documentation and Programmer Aids 38
1.5 Interactive Programming—An Example 43
2. Forth Fundamentals 47
2.1 Stack Operations 47
2.2 Arithmetic and Logical Operations 54
2.3 Memory and Data Storage 60
3. String Handling 73
3.1 General String Topics 73
3.2 Strings in Definitions 76
3.3 Strings in Data Structures 79
3.4 String Management Operations 80
3.5 Comparing Character Strings 82
3.6 Number Conversions 84
4. Structured Programming 97
4.1 Controlling Program Flow 97
4.2 Comparison and Testing Operations 98
4.3 Conditionals 100
4.4 Indefinite Loops 102
4.5 Counting (Finite) Loops 105
4.6 Finite vs. Indefinite Loops 109
4.7 Case Statement 110
4.8 Nesting Structures 111
4.9 Nesting and Un-nesting Structures and Definitions 112
5. System Functions 115
5.1 Vectored Execution 115
5.2 System Environment 120
5.3 Exception Handling 123
5.4 Serial I/O 128
5.5 File-Based Disk Access 133
5.6 Time and Timing Functions 138
5.7 Dynamic Memory Management 139
5.8 Floating Point 140
6. The Forth Interpreter and Compiler 155
6.1 The Text Interpreter 155
6.2 Defining Words 164
6.3 Compiling Words and Literals 175
6.4 Compiler Directives 182
6.5 Overlays 188
6.6 Word Lists 190
7. Forth Cross compilers 195
7.1 Issues in Cross Development 196
7.2 Host and Target Roles and Functions 196
7.3 Managing Scopes 197
7.4 Data Space Management 199
7.5 Interactive Programming 204
7.6 I/O Drivers for Embedded Systems 205
8. Programming Style and Editing Standards 209
8.1 FORTH, Inc. Editing Standards 209
8.2 Open Firmware Coding Style 213
8.3 Wong’s Rules for Readable Forth 218
8.4 Naming Conventions 224
Appendix A: Bibliography 229
Appendix B: Glossary & Notation 233
Appendix C: Blocks for Disk Storage 243
Appendix D: Index to Forth Words 257
General Index 271
List of Figures
List of Tables
Ссылки: