umouse

umouse.git
git clone git://git.lenczewski.org/umouse.git
Log | Files | Refs | Submodules | README

DPANS2.HTM (15694B)


      1 <HTML><HEAD>
      2 <TITLE>DPANS94</TITLE>
      3 <link disabled rel="stylesheet" href="mpexc6.css">
      4 <style>@import url(mpexc6.css);</style>
      5 </head>
      6 
      7 <BODY>
      8 <table width=100%>
      9 <tr>
     10 <td align=left>
     11 <a href=dpans1.htm><img src=left.gif
     12  width=26 height=26 align=ALIGN border=0></a>
     13 <a href=dpans3.htm><img src=right.gif
     14  width=26 height=26 align=ALIGN border=0></a>
     15 </td>
     16 <td align=right>
     17 <a href=dpans.htm#toc><img src=up.gif 
     18  width=26 height=26 align=ALIGN border=0></a>
     19 <a name=2.>Table of Contents</a>
     20 </td>
     21 </tr>
     22 </table>
     23 <p>
     24 <hr size=4>
     25 
     26 <H1>2. Terms, notation, and references</H1>
     27 
     28 The phrase <B>See:</B> is used throughout this Standard to direct the reader to
     29 other sections of the Standard that have a direct bearing on the current
     30 section.
     31 
     32 <P>
     33 
     34 In this Standard, <B>shall</B> states a requirement on a system or
     35 program; conversely, <B>shall not</B> is a prohibition; <B>need not</B>
     36 means <B>is not required to</B>; <B>should</B> describes a
     37 recommendation of the Standard; and <B>may</B>, depending on context,
     38 means <B>is allowed to</B> or <B>might happen</B>.
     39 
     40 <P>
     41 
     42 Throughout the Standard,
     43 typefaces are used in the following manner:
     44 
     45 <UL>
     46 <LI>This proportional
     47 serif typeface is used for text, with italic used
     48 for symbols and the first appearance of new terms;
     49 <LI>A bold
     50 proportional sans-serif typeface is used for headings;
     51 <LI>A bold
     52 monospaced serif typeface is used for Forth-language text.
     53 </UL>
     54 
     55 <P>
     56 
     57 <hr>
     58 <A name=2.1>
     59 <H2>2.1 Definitions of terms</H2>
     60 </a>
     61 
     62 Terms defined in this section are used generally throughout this Standard.
     63 Additional terms specific to individual word sets are defined in those word
     64 sets.  Other terms are defined at their first appearance, indicated by italic
     65 type.  Terms not defined in this Standard are to be construed according to the
     66 Dictionary for Information Systems, ANSI X3.172-1990.
     67 
     68 <P>
     69 
     70 <DL><DT><B>address unit:</B>  <DD>Depending on context, either 1) the units
     71 into which a Forth
     72 address space is divided for the purposes of locating data objects such as
     73 characters and variables; 2) the physical memory storage elements
     74 corresponding to those units; 3) the contents of such a memory storage
     75 element; or 4) the units in which the length of a region of memory is
     76 expressed.
     77 
     78 <DT><B>aligned address:</B>  <DD>The address of a memory location at which a
     79 character, cell,
     80 cell pair, or double-cell integer can be accessed.
     81 
     82 <DT><B>ambiguous condition:</B>  <DD>A circumstance for which this Standard
     83 does not
     84 prescribe a specific behavior for Forth systems and programs.
     85 
     86 <P>
     87 
     88 Ambiguous conditions include such things as the absence of a needed delimiter
     89 while parsing, attempted access to a nonexistent file, or attempted use of a
     90 nonexistent word.  An ambiguous condition also exists when a Standard word is
     91 passed values that are improper or out of range.
     92 
     93 <DT><B>cell:</B>
     94 <DD>The primary unit of information in the architecture of a Forth system.
     95 
     96 <DT><B>cell pair:</B>
     97 <DD>Two cells that are treated as a single unit.
     98 
     99 <DT><B>character:</B>
    100 <DD>Depending on context, either 1) a storage unit capable of holding
    101 a character; or 2) a member of a character set.
    102 
    103 <DT><B>character-aligned address:</B>
    104 <DD>The address of a memory location at which a
    105 character can be accessed.
    106 
    107 <DT><B>character string:</B>
    108 <DD>Data space that is associated with a sequence of
    109 consecutive character-aligned addresses.  Character strings usually
    110 contain text.  Unless otherwise indicated, the term <B>string</B> means
    111 <B>character string</B>.
    112 
    113 <DT><B>code space:</B>
    114 <DD>The logical area of the dictionary in which word semantics are
    115 implemented.
    116 
    117 <DT><B>compile:</B>
    118 <DD>To transform
    119 source code into dictionary definitions.
    120 
    121 <DT><B>compilation semantics:</B>
    122 <DD>The behavior of a Forth definition when its name is
    123 encountered by the text interpreter in compilation state.
    124 
    125 <DT><B>counted string:</B>
    126 <DD>A data structure consisting of one character containing a
    127 length followed by zero or more contiguous data characters.  Normally, counted
    128 strings contain text.
    129 
    130 <DT><B>cross compiler:</B>
    131 <DD>A system that compiles a program for later execution in
    132 an environment that may be physically and logically different from the
    133 compiling environment.  In a cross compiler, the term <B>host</B>
    134 applies to the compiling environment, and the term <B>target</B> applies
    135 to the run-time environment.
    136 
    137 <DT><B>current definition:</B>
    138 <DD>The definition whose compilation has been started but not
    139 yet ended.
    140 
    141 <DT><B>data field:</B>
    142 <DD>The data space
    143 associated with a word defined via 
    144 <a href=dpans6.htm#6.1.1000>CREATE</a>.
    145 
    146 <DT><B>data space:</B>
    147 <DD>The logical
    148 area of the dictionary that can be accessed.
    149 
    150 <DT><B>data-space pointer:</B>
    151 <DD>The address of the next available data space location,
    152 i.e., the value returned by 
    153 <a href=dpans6.htm#6.1.1650>HERE</a>.
    154 
    155 <DT><B>data stack:</B>
    156 <DD>A stack that may be used for passing parameters between
    157 definitions.  When there is no possibility of confusion, the data stack is
    158 referred to as <B>the stack</B>.  Contrast with return stack.
    159 
    160 <DT><B>data type:</B>
    161 <DD>An identifier
    162 for the set of values that a data object may have.
    163 
    164 <DT><B>defining word:</B>
    165 <DD>A Forth word
    166 that creates a new definition when executed.
    167 
    168 <DT><B>definition:</B>
    169 <DD>A Forth execution
    170 procedure compiled into the dictionary.
    171 
    172 <DT><B>dictionary:</B>
    173 <DD>An extensible structure that contains definitions and associated
    174 data space.
    175 
    176 <DT><B>display:</B>
    177 <DD>To send one or more
    178 characters to the user output device.
    179 
    180 <DT><B>environmental dependencies:</B>
    181 <DD>A program's implicit assumptions about a Forth
    182 system's implementation options or underlying hardware.  For example, a
    183 program that assumes a cell size greater than 16 bits is said to have an
    184 environmental dependency.
    185 
    186 <DT><B>execution semantics:</B>
    187 <DD>The behavior
    188 of a Forth definition when it is executed.
    189 
    190 <DT><B>execution token:</B>
    191 <DD>A value that identifies the execution semantics of a
    192 definition.
    193 
    194 <DT><B>find:</B>
    195 <DD>To search the
    196 dictionary for a definition name matching a given string.
    197 
    198 <DT><B>immediate word:</B>
    199 <DD>A Forth word whose compilation semantics are to perform its
    200 execution semantics.
    201 
    202 <DT><B>implementation defined:</B>
    203 <DD>Denotes system behaviors or features that must be
    204 provided and documented by a system but whose further details are not
    205 prescribed by this Standard.
    206 
    207 <DT><B>implementation dependent:</B>
    208 <DD>Denotes system behaviors or features that must be
    209 provided by a system but whose further details are not prescribed by this
    210 Standard.
    211 
    212 <DT><B>input buffer:</B>
    213 <DD>A region of memory containing the sequence of characters from
    214 the input source that is currently accessible to a program.
    215 
    216 <DT><B>input source:</B>
    217 <DD>The device, file, block, or other entity that supplies
    218 characters to refill the input buffer.
    219 
    220 <DT><B>input source specification:</B>
    221 <DD>A set of information describing a particular
    222 state of the input source, input buffer, and parse area. This information is
    223 sufficient, when saved and restored properly, to enable the nesting of parsing
    224 operations on the same or different input sources.
    225 
    226 <DT><B>interpretation semantics:</B>
    227 <DD>The behavior of a Forth definition when its name is
    228 encountered by the text interpreter in interpretation state.
    229 
    230 <dt><b>initiation semantics:</b> 
    231 <dd>The behavior of a Forth definition, or of the portion of a Forth definition 
    232 following <a href=dpans6.htm#6.1.1250>DOES></a>, when it begins execution. 
    233 
    234 <DT><B>keyboard event:</B>
    235 <DD>A value received by the system denoting a user action at the
    236 user input device.  The term <B>keyboard</B> in this document does not exclude
    237 other types of user input devices.
    238 
    239 <DT><B>line:</B>
    240 <DD>A sequence of characters followed by an actual or implied line
    241 terminator.
    242 
    243 <DT><B>name space:</B>
    244 <DD>The logical area of the dictionary in which definition names are
    245 stored.
    246 
    247 <DT><B>number:</B>
    248 <DD>In this Standard, <B>number</B> used without other qualification
    249 means <B>integer</B>.  Similarly, <B>double number</B> means
    250 <B>double-cell integer</B>.
    251 
    252 <DT><B>parse:</B>
    253 <DD>To select and exclude a character string from the parse area using a
    254 specified set of delimiting characters, called delimiters.
    255 
    256 <DT><B>parse area:</B>
    257 <DD>The portion of the input buffer that has not yet been parsed, and
    258 is thus available to the system for subsequent processing by the text
    259 interpreter and other parsing operations.
    260 
    261 <DT><B>pictured-numeric output:</B>
    262 <DD>A number display format in which the number is
    263 converted using Forth words that resemble a symbolic <B>picture</B> of
    264 the desired output.
    265 
    266 <DT><B>program:</B>
    267 <DD>A complete specification of execution to achieve a specific function
    268 (application task) expressed in Forth source code form.
    269 
    270 <DT><B>receive:</B>
    271 <DD>To obtain characters
    272 from the user input device.
    273 
    274 <DT><B>return stack:</B>
    275 <DD>A stack that may be used for program execution nesting, do-loop
    276 execution, temporary storage, and other purposes.
    277 
    278 <DT><B>standard word:</B>
    279 <DD>A named Forth
    280 procedure, formally specified in this Standard.
    281 
    282 <DT><B>user input device:</B>
    283 <DD>The input device currently selected as the source of
    284 received data, typically a keyboard.
    285 
    286 <DT><B>user output device:</B>
    287 <DD>The output device currently selected as the destination
    288 of display data.
    289 
    290 <DT><B>variable:</B>
    291 <DD>A named region of data space located and accessed by its memory
    292 address.
    293 
    294 <DT><B>word:</B>
    295 <DD>Depending on context, either 1) the name of a Forth definition; or 2) a
    296 parsed sequence of non-space characters, which could be the name of a Forth
    297 definition.
    298 
    299 <DT><B>word list:</B>
    300 <DD>A list of associated Forth definition names that may be examined
    301 during a dictionary search.
    302 
    303 <DT><B>word set:</B>
    304 <DD>A set of Forth definitions grouped together in this Standard under
    305 a name indicating some shared aspect, typically their common functional
    306 area.</DL>
    307 
    308 <p>
    309 <code>
    310 See:
    311 <a href=dpansa2.htm#A.2.1>A.2.1</a> Definition of terms,
    312 <a href=a0005.htm>RFI 0005</a> Initiation semantics,
    313 <a href=a0007.htm>RFI 0007</a> Distinction between <em>immediacy</em> and <em>special compilation semantics</em>.
    314 </code>
    315 <p>
    316 
    317 <hr>
    318 <A name=2.2>
    319 <H3>2.2 Notation</H3>
    320 </a>
    321 
    322 
    323 
    324 <hr>
    325 <A name=2.2.1>
    326 <H3>2.2.1 Numeric notation</H3>
    327 </a>
    328 
    329 Unless otherwise stated, all references to numbers apply to signed single-cell
    330 integers.  The inclusive range of values is shown as {from...to}.  The
    331 allowable range for the contents of an address is shown in double braces,
    332 particularly for the contents of variables, e.g., 
    333 <a href=dpans6.htm#6.1.0750>BASE</a> {{2...36}}.
    334 
    335 <P>
    336 
    337 <hr>
    338 <A name=2.2.2>
    339 <H3>2.2.2 Stack notation</H3>
    340 </a>
    341 
    342 Stack parameters input to and output from a definition are described using the
    343 notation:
    344 
    345 
    346 <PRE>
    347 
    348 ( stack-id  before -- after )
    349 
    350 </PRE>
    351 
    352 <P>
    353 
    354 where stack-id specifies which stack is being described, before represents the
    355 stack-parameter data types before execution of the definition and after
    356 represents them after execution.  The symbols used in before and after are
    357 shown in 
    358 <a href=dpans3.htm#table.3.1>table 3.1</a>.
    359 
    360 <P>
    361 
    362 The control-flow-stack stack-id is <B>C:</B>, the data-stack stack-id is
    363 <B>S:</B>, and the return-stack stack-id is <B>R:</B>.  When there is no
    364 confusion, the data-stack stack-id may be omitted.
    365 
    366 <P>
    367 
    368 When there are alternate after representations, they are described by
    369 <B>after1 | after2</B>.  The top of the stack is to the right.  Only
    370 those stack items required for or provided by execution of the
    371 definition are shown.
    372 
    373 <p>
    374 <code>
    375 See:
    376 <a href=dpansa2.htm#A.2.2.2>A.2.2.2</a> Stack notation
    377 </code>
    378 <p>
    379 
    380 
    381 <hr>
    382 <A name=2.2.3>
    383 <H3>2.2.3 Parsed-text notation</H3>
    384 </a>
    385 
    386 If, in addition to using stack parameters, a definition parses text,
    387 that text is specified by an abbreviation from table 2.1, shown
    388 surrounded by double-quotes and placed between the before parameters and
    389 the <B>--</B> separator in the first stack described, e.g.,
    390 
    391 
    392 <PRE>
    393 ( S: before <B>"parsed-text-abbreviation"</B> -- after ).
    394 </PRE>
    395 
    396 <P>
    397 
    398 <a name=table.2.1>
    399 Table 2.1 - Parsed text abbreviations
    400 </a>
    401 
    402 <P>
    403 
    404 
    405 <PRE>
    406 Abbreviation    Description
    407 ------------    -----------
    408 &lt;char&gt;          the delimiting character marking the end of the
    409                 string being parsed
    410 &lt;chars&gt;         zero or more consecutive occurrences of the
    411                 character char
    412 &lt;space&gt;         a delimiting space character
    413 &lt;spaces&gt;        zero or more consecutive occurrences of the
    414                 character space
    415 &lt;quote&gt;         a delimiting double quote
    416 &lt;paren&gt;         a delimiting right parenthesis
    417 &lt;eol&gt;           an implied delimiter marking the end of a line
    418 ccc             a parsed sequence of arbitrary characters,
    419                 excluding the delimiter character
    420 name            a token delimited by space, equivalent to
    421                 ccc&lt;space&gt; or ccc&lt;eol&gt;
    422 </PRE>
    423 
    424 <P>
    425 
    426 <hr>
    427 <A name=2.2.4>
    428 <H3>2.2.4 Glossary notation</H3>
    429 </a>
    430 
    431 The glossary entries for each word set are listed in the standard ASCII
    432 collating sequence.  Each glossary entry specifies an ANS Forth word and
    433 consists of two parts: an index line and the semantic description of the
    434 definition.
    435 
    436 <P>
    437 
    438 <hr>
    439 <A name=2.2.4.1>
    440 <H4>2.2.4.1 Glossary index line</H4>
    441 </a>
    442 
    443 The index line is a single-line entry containing, from left to right:
    444 <P>
    445 
    446 <UL>
    447 <LI>Section number,
    448 the last four digits of which assign a unique
    449 sequential number to all words included in this Standard;
    450 <LI>DEFINITION-NAME
    451 in upper-case, mono-spaced, bold-face letters;
    452 <LI>Natural-language
    453 pronunciation in quotes if it differs from English;
    454 <LI>Word-set
    455 designator from table 2.2. The designation for extensions
    456 word sets includes <B>EXT</B>.
    457 </UL>
    458 
    459 <P>
    460 
    461 <a name=table.2.2>
    462 Table 2.2 - Word set designators
    463 </a>
    464 <P>
    465 
    466 
    467 <PRE>
    468 Word set                        Designator
    469 --------                        ----------
    470 <a href=dpans6.htm>Core word set</a>                   CORE
    471 <a href=dpans7.htm>Block word set</a>                  BLOCK
    472 <a href=dpans8.htm>Double-Number word set</a>          DOUBLE
    473 <a href=dpans9.htm>Exception word set</a>              EXCEPTION
    474 <a href=dpans10.htm>Facility word set</a>               FACILITY
    475 <a href=dpans11.htm>File-Access word set</a>            FILE
    476 <a href=dpans12.htm>Floating-Point word set</a>         FLOATING
    477 <a href=dpans13.htm>Locals word set</a>                 LOCALS
    478 <a href=dpans14.htm>Memory-Allocation word set</a>      MEMORY
    479 <a href=dpans15.htm>Programming-Tools word set</a>      TOOLS
    480 <a href=dpans16.htm>Search-Order word set</a>           SEARCH
    481 <a href=dpans17.htm>String-Handling word set</a>        STRING
    482 </PRE>
    483 
    484 <P>
    485 
    486 <hr>
    487 <A name=2.2.4.2>
    488 <H4>2.2.4.2 Glossary semantic description</H4>
    489 </a>
    490 
    491 The first paragraph of the semantic description contains a stack notation for
    492 each stack affected by execution of the word.  The remaining paragraphs
    493 contain a text description of the semantics.  See 
    494 <a href=dpans3.htm#3.4.3>3.4.3</a> Semantics.
    495 
    496 <P>
    497 
    498 <hr>
    499 <A name=2.3>
    500 <H2>2.3 References</H2>
    501 </a>
    502 
    503 The following national and international standards are referenced in this
    504 Standard:
    505 
    506 <P>
    507 
    508 ANSI X3.172-1990, Dictionary for information systems 
    509 (<a href=dpans2.htm#2.1>2.1</a> Definition of terms);
    510 
    511 <P>
    512 
    513 ANSI X3.4-1974, American Standard Code for Information Interchange
    514 (ASCII) 
    515 (<a href=dpans3.htm#3.1.2.1>3.1.2.1</a> Graphic characters);
    516 
    517 <P>
    518 
    519 ISO 646-1983, ISO 7-bit coded characterset for information
    520 interchange, International Reference Version (IRV) 
    521 (<a href=dpans3.htm#3.1.2.1>3.1.2.1</a> Graphic characters);
    522 
    523 <P>
    524 
    525 ANSI/IEEE 754-1985, Floating-point standard 
    526 (<a href=dpans12.htm#12.2.1>12.2.1</a> Definition of terms).
    527 
    528 
    529 <hr>
    530 <A href=dpans.htm#toc><IMG   src="up.gif" ></A>    Table of Contents 
    531 <BR>
    532 <A href=dpans3.htm><IMG   src="right.gif" ></A>
    533 Next Section
    534 <P>
    535 </BODY>
    536 </HTML>