This is ci86.lina.info, produced by makeinfo version 4.5 from
ci86.lina.texinfo.


File: ci86.lina.info,  Node: Top,  Next: Gentle Introduction,  Prev: Glossary

Overview
********

   Forth is an interactive programming system.  ciforth is a family of
Forth's that can be generated in many different version for many
different operation systems.  It is sufficiently close to the ISO
standard to run most programs intended to be portable. It deviates
where less used features where objectionable to implement. *Note
Manual::, Section Portability.

   This file documents what you as a user needs to know for using this
particular version of ciforth called "lina" once it is installed on
your system.

   ciforth consists of three files:
   *    `lina'    : the program

   * `ciforth.ps' `ciforth.html' : the documentation

   * `forth.lab' : source library for auxiliary programs

   These files are generated together by a generic system from the file
`fig86.gnr' .  The documentation applies to the ciforth with which it
goes.

   If your Forth doesn't fit the description below get a new version.
The information below allows an expert to reconstruct how to generate a
corresponding version. Not all of it may make sense to you. Tell him
whether you want to fit the Forth to the description or vice versa
(*note Rationale & legalese::).

   These are the features:

   All ciforth's are "case sensitive" .  This is version 4.0.6 .  It is
running in protected mode.  It is running under Linux.          A
number has a precision of 32 bits.  It calls linux system from Forth
directly.  It has compiler security, sacrificing some bizarre ISO
compatibity. It doesn't use `>IN'  exactly in the way prescribed by
ISO.   It contains the full ISO CORE in the kernel, more than is needed
to make it self contained. It contains a field in the header to point
to source. It is indirect threaded.

* Menu:

* Gentle Introduction:: For newbies to Forth. You don't want to read this.
* Rationale & legalese:: For experts. You don't want to read this.
* Manual::         User manual
* Assembler::      The assemblers
* Errors::  What means ` ciforth ERROR ###'?
* Documentation::  Some references
* Glossary::       Description of Forth words
* Glossary Index:: Find a Forth words in the glossary
* Forth Word Index:: All references to Forth words
* Concept Index::


File: ci86.lina.info,  Node: Gentle Introduction,  Next: Rationale & legalese,  Prev: Top,  Up: Top

Gentle introduction
*******************

   A Forth system is a database of small programs.  The database is
called the dictionary.  The programs are called "word" 's, or
definitions.  The explanation of words from the dictionary is called a
glossary.

   First of all, a Forth system is an environment that you enter by
running it:
`lina'
Like in a Disk Operating System a "word"  is executed by typing its
name, but unlike in a DOS several programs can be specified on the same
line, interspersed with numbers. Also names can be anything, as long as
they don't contain spaces.

   A program may leave one or more results, and the next program can
use it.  The latest result is used up first, hence the name lifo buffer.
(last in, first out).

   For example:

     albert@apple:~/forth/fig86 > lina
     
     80386 ciforth beta $RCSfile: ci86.gnr,v $ $Revision: 3.275 $
     
     1 2 + 7 *
      OK
     .
     21  OK

   1 2 and 7 are numbers and are just remembered as they are typed in.
`OK' and `21 OK' are the answer of the computer.  `+'  is a small
program with an appropriate name.  It adds the two numbers that were
entered the latest, in this case 1 and 2. The result 3 remains, but 1
and 2 are consumed.  Note that a name can be anything, as long as it
doesn't contain spaces.  The program `*'  multiplies the 3 and the 7
and the result is 21.  The program `.'  prints this results. It could
have been put on the same line equally easily.

   Programs can be added to the database by special programs: the so
called "defining word" 's. A defining word generally gets the name of
the new word from the input line.

   For example: a constant is just a program that leaves always the
same value.  A constant is created in this way, by the defining word
`CONSTANT'  :

     127 CONSTANT MONKEY   12 .
     12 OK

   You may get ` constant ? ciforth ERROR # 12 : NOT RECOGNIZED '.
That is because you didn't type in what I said.  lina is case sensitive.
If you want to change that consult the section "Common problems".
(*note Errors::).

   This must not be read like:
a number, two programs and again a number etc.... ,
but as:
a number, a program and a name that is consumed,
and after that life goes on. The `12 .' we put there for demonstration
purposes, to show that `CONSTANT'  reads ahead only one word.  On this
single line we do two things, defining `MONKEY' and printing the number
12.  We see that `CONSTANT'  like any other program consumes some data,
in this case the 127 that serves as an initial value for the constant
called  `MONKEY' .

   A very important defining word is `:' , with its closure `;' .

     : TEST 1 2 + 7 * ;     12 .
     12 OK

   In this case not only the name `TEST' is consumed, but none of the
remaining numbers and programs are executed, up till the semicolon `;' .
Instead they form a specification of what `TEST' must do.  This state,
where Forth is building up a definition, is called "compilation mode"  .
After the semicolon life continues as usual.  Note that `;'  is a
program in itself too.  But it doesn't become part of `TEST'  . Instead
it is executed immediately.  It does little more than turning off
compilation mode.

     TEST TEST + .
     42  OK
     : TEST+1 TEST 1 + . ;  TEST+1
     22 OK

   We see that `TEST' behaves as a shorthand for the line up till the
semi colon, and that in its turn it can be used as a building block.

   The colon allows the Forth programmer to add new programs easily and
test them easily, by typing them at the keyboard.  It is considered bad
style if a program is longer than a couple of lines.  Indeed the
inventor of Forth Chuck Moore has written splendid applications with an
average program length of about one line.  Cathedrals were built by
laying stone upon stone, never carved out of one rock.

   The implementation of the language Forth you look at is old
fashioned, but simple. You as a user have to deal with only three
parts/files : this documentation, the executable program, and the
library file, a heap of small programs in source form.  There may be
several documentation files, but they contain the same information in a
different format.

   There is an ISO standard for Forth and this Forth doesn't fully
comply to it. Still by restricting yourself to the definitions marked
as ISO in the glossary, it is quite possible to write an application
that will run on any ISO-compliant system.

   Because of the way Forth remembers numbers you can always interrupt
your work and continue.  For example
     : TEST-AGAIN
     1 2 + [ 3 4 * . ]
     12 OK
     7 * ;
     OK
   What happened here is that some one asked you to calculate  "3 times
4" while you were busy with our test example. No sweat!  You switch
from compilation mode to normal (interpret) mode by `['  , and back by
`]' .  In the meantime, as long as you don't leave numbers behind, you
can do anything.  (This doesn't apply to adding definitions, as you are
in the process of adding one already.)


File: ci86.lina.info,  Node: Rationale & legalese,  Next: Manual,  Prev: Gentle Introduction,  Up: Top

Rationale & legalese
********************

Legalese
========

   This application currently is copyright by Albert van der Horst.
This Forth is called ciforth and is made available by the D.F.W..  All
publications of the D.F.W. are available under GPL, the GNU public
license.  The file `COPYING' containing the legal expression of these
lines must accompany it.

   Because Forth is "programming by extending the language" the GPL
could be construed to mean that systems based on ciforth always are
legally obliged to make the source available.  But we consider this
"fair use in the Forth sense" as expressed by the following statement.

   In addition to the GPL Albert van der Horst grants the following
rights in writing:

   The GPL is interpreted in the sense that a system based on ciforth
and intended to serve a particular purpose, that purpose not being a
"general purpose Forth system", is fair use of the system, even if it
could accomplish everything ciforth could, under the condition that the
ciforth it is based on is available in accordance to the GPL rules, and
this is made known to the user of the derived system.

Rationale
=========

   This Forth is meant to be simple.  What you find here is a Forth for
the Intel 86.  You need just the executable to work.  You choose the
format you prefer for the documentation.  They all have the same
content.  You can use the example file with blocks, you have the
assembler source for your Forth, but you can ignore both.

Source
======

   In practice the GPL  means (: this is an explanation and has no
legal value!)

   They may be further reproduced and distributed subject to the
following conditions:

   The three files comprising it must be kept together and in particular
the reference section with the World Wide Web sites.

   The latest version of lina is found at
`http://home.hccnet.nl/a.w.m.van.der.horst/ciforth.html'.

   Via that link you can also download ciforth's for other OS's and the
generic system, if you want to make important modifications.  Also you
can see how you can contact the author.  Otherwise in case of questions
about this ciforth, contact the person or organisation that generated
it for you.

   This Forth builds on fig-Forth. It is based on the work of Charlie
Krajewski and Thomas Newman, Hayward, Ca. still available via taygeta.
The acknowledgments for systems that serves as a base, in particular
the original fig-Forth, are found in the generic documentation,
including detailed information how these systems can be obtained.

   Important:
If you just want to use a Forth, you most certainly do not want the
generic system.  Great effort is expended in making sure that this
manual contains all that you need, and nothing that might confuse you.
The generic system on the contrary contains lots that you don't need,
and is confusing as hell.

   If you are interested in subjects like history of Forth, the
rationale behind the design and such you might want to read the manual
for the generic Forth.

The Generic System this Forth is based on.
==========================================

   The source and executable of this ciforth was generated, out of at
least dozens of possibilities, by a generic system.  You can configure
the operating system, memory sizes, file names and minor issues like
security policy. You can select between a 16 and 32 bit word size.  You
may undertake more fundamental changes by adapting one or more of the
macro header files.  An important goal was to generate exactly fitting
documentation, that contains only relevant information and with some
care your configuration will have that too.  This generic system can be
obtained via `http://home.hccnet.nl/a.w.m.van.der.horst/ciforth.html'.
                                                             `


File: ci86.lina.info,  Node: Manual,  Next: Assembler,  Prev: Rationale & legalese,  Up: Top

Manual
******

Getting started
===============

Hello world!
------------

   Type `lina' to get into your interactive Forth system.  You will see
a signon message.  While sitting in your interactive Forth doing a
"hello world" is easy:
     "Hello world!" TYPE
     Hello world! OK

Making it into an interactively usable program is also easy:
     : HELLO "Hello world!" TYPE CR ;
     OK
     HELLO
     Hello world!
     OK
   This means you type the command `HELLO' while you are in lina. As
soon as you leave lina, this command is gone.

In order to make a stand alone program to say hello you have to save
the source to a file, such as `hello.frt'.  It just contains the
definition we typed earlier:
      : HELLO "Hello world!" TYPE CR ;
   Now build the program by
lina -c hello.frt
(That is `c' for compile.)  The result is a file `hello' .  For the
compiler to run you must have the library correctly installed.

   If that failed, or anything else fails, you will get a message with
at least ` ciforth ERROR ###' and hopefully some more or less helpful
text as well.  The `###' is an error number. *Note Errors::, Section
Explanations.

   Note for the old hands. Indeed the quoted strings are not ISO.  They
surely are a Forth-like extension. Read up on denotations, and the
definition of `"'  .

   In lina you never have to worry about those quoted strings, they are
allocated in the dictionary and are permanent.

The library.
------------

   If you want to run a program written on some other Forth, it may use
facilities that are not available in lina's kernel, but they may be
available in the "library" .  A library is a store with facilities,
available on demand.  Forth as such doesn't have a library mechanism,
but lina does.

   lina uses the "blocks"  as a library by addition of the word
`REQUIRED'  and a convention.  Starting with `lina -r' or most any
option you have this facility available. If you are already in lina,
you can type `1 LOAD'.   The extension of `.lab' in `forth.lab' means
Library Addressable by Block.

   Now we will add `DO-DEBUG'  using this library mechanism.  It is
used immediately.  It is handy during development, after every line it
shows you what numbers Forth remembers for you.  Also from now on the
header of each block that is `LOAD' -ed is shown.
Type (`1 LOAD' may not be necessary):
     1 LOAD
     "DO-DEBUG" REQUIRED
     OK
     DO-DEBUG
     
     S[ ] OK 1
     
     S[ 1 ] OK
   You can turn `DO-DEBUG'  off with `NO-DEBUG'  .

   If you try to `INCLUDE'  a program, you may get errors like `TUCK?
ciforth ERROR # 12 : NOT RECOGNIZED'.  *Note Errors::, Section
Explanations.  Apparently, lina doesn't know about a forth word named
`TUCK' , but after `"TUCK" REQUIRED' maybe it does. You may try again.

   The convention about the way the library file must be organized for
`REQUIRED'  to find something is simple. It is divided into blocks of
16 lines.  The first line is the header of the block. If the word we
are looking for is mentioned in the header, that block is compiled.

   The library file contains examples for you to load using `REQUIRE'  .
Try
     REQUIRE SIEVE
     LIM # 4 ISN'T UNIQUE
     OK
     10 SIEVE
     KEY FOR NEXT SCREEN
     ERATOSTHENES SIEVE -- PRIMES LESS THAN 10 000
     0 002 003 ...
     (lots of prime numbers.)

Development.
------------

   If you want to try things out, or write a program - as opposed to
just running a ready made program - you best start up lina by `lina -e'.
That is `e' for elective. That name means that you  can configure this
screen 5 to suit your particular needs.
You will have available:
  1. `REQUIRED'  and `REQUIRE'  .  `REQUIRE xxx' is equivalent to
     `"xxx" REQUIRED' , but it is more convenient.

  2.  `DH.'  `H.'  `B.'  `DUMP'  `FARDUMP'

     For showing numbers in hex and parts of memory.

  3.  `CRACK'

     To analyse words, showing the source code of compiled words.

  4.  `LOCATE'

     To show the block of the library file where a word is located.

  5. `OS-IMPORT'

     To be able to type shell-commands from within Forth as if you were
     in a terminal window.   .   .   .

   Because this ciforth is "hosted", meaning that it is started from an
operating system, you can develop in a convenient way.  Start lina in a
window, and use a separate window to start your editor. Try out things
in lina. If they work, paste the code into your editor. If a word
works, but its source has scrolled off the screen, you can recover the
source using `CRACK'  .  If you have constructed a part or all of your
program, you can save it from your editor to a file. Then by the command
`INCLUDE <file-name> ' load the program in lina and do some further
testing.

   You are not obliged to work with separate windows.  Suppose your
favorite editor is called `vi'. After

      "vi" OS-IMPORT vi

   you can start editing a file in the same way as from  the shell.  Of
course you now have to switch between editing a file and lina. But at
least you need not set up your Forth again, until your testing causes
your Forth to crash.

Finding things out.
-------------------

   If you want to find things out you must start up lina again by `lina
-e'.  The sequence
     REQUIRE TUCK
     LOCATE TUCK
   shows you the source for TUCK if it is in the library somewhere.
     REQUIRE TUCK
     CRACK TUCK
   show you the source for TUCK if it is in the library or in the
kernel, but without comment or usage information.

Configuring
===========

   For configuring your lina, without enlarging the dictionary, you may
use the following sequence
      S" myforth.lab" BLOCK-FILE $! \ Or any config
     1 LOAD
     REQUIRE SAVE-SYSTEM
     : DOIT
         'CONTAINS 'FORTH FORGET-VOC
         'CONTAINS >NFA  DP !
         "newforth" SAVE-SYSTEM BYE ;
     DOIT
   Here `DOIT' trims the dictionary just before the saving your system
into a new file.  You can use a similar sequence for expanding the
system without building in the `SAVE-SYSTEM'  command as well.

   `FAR-DP'  allows have a disposable part of the dictionary. This may
be occasionally useful, but make sure to `FORGET'  always the disposed
off words.

Concepts
========

   A forth user is well aware of how the memory of his computer is
organised. He allocates it for certain purposes, and frees it again at
will.

   The last-in first-out buffer that remembers data for us is called
the "data stack"  or sometimes "computation stack" .  There are other
stacks around, but if there is no confusion it is often called just the
"stack" .  Every stack is in fact a buffer and needs also a "stack
pointer" to keep track of how far it has been filled.  It is just the
address where the last data item has been stored in the buffer.

   The "dictionary"  is the part of the memory where the "word"'s are
(*note DICTIONARY::).  Each word owns a part of the dictionary,
starting with its name and ending where the name of the next word
starts.  This structure is called a "dictionary entry" .  Its address
is called a "dictionary entry address" or "DEA" . In ciforth's this
address is used for external reference in a consistent way. For example
it is used as the "execution token"  of a word in the ISO sense.  In
building a word the boundary between the dictionary and the free space
shifts up.  This process is called "allocating" , and the boundary is
marked by a "dictionary pointer"  called `DP'  .  A word can be
executed by typing its name.  Each word in the dictionary belongs to
precisely one "word list" , or as we will say here vocabulary.  Apart
from the name, a word contains data and executable code, (interpreted
or not) and linking information (*note VOCABULARY::).

   The concept word list is part of the ISO standard, but we will use
"vocabulary" . A vocabulary is much more convenient, being a word list
with a name, created by `VOCABULARY'  . ISO merely knows "word list
identifier"  's, a kind of handle, abbreviated as "WID" . A new word
list is created by the use of `VOCABULARY' , and by executing the
vocabulary word the associated word list is pushed to the front of the
search order.  In fact in ciforth's every DEA can serve as a WID. It
defines a wordlist consisting of itself and all earlier words in the
same vocabulary.  If needed you can always derive the WID from the DEA
of a vocabulary.

   A word that is defined using `:'  is often called a "colon
definition" . Its code is called "high level"  code.

   A high level word, one defined by `:'  , is little more than a
sequence of addresses of other words. The "inner interpreter" takes
care to execute these words in order.  It acts by fetching the address
pointed by `HIP' , storing this value in register `W'. It then jumps to
the address pointed to by the address pointed to by `W'. `W' points to
the code field of a definition which contains the address of the code
which executes for that definition. This usage of indirect threaded
code is a major contributor to the power, portability, and
extensibility of Forth.

   If the inner interpreter must execute another high level word, while
it is interpreting, it must remember the old value of `HIP', and this
so called "nesting"  could go several levels deep.  Keeping this on the
data stack would interfere with the data the words are expecting, so
they are kept on a separate stack, the "return stack" .  The usage of
two stacks is another hall mark of Forth.

   A word that generates a new entry in the dictionary is called a
"defining word"  (*note DEFINING::).  The new word is created in the
`CURRENT'  word list .

   Each processor has a natural size for the information. (This is
sometimes called a machine word). For an Pentium processor this is 32
bit, for the older Intel 8086 it is 16 bit.  The pendant in Forth is
called a "cell"  and its size may deviate from the processor you are
running on.  For this ciforth it is 32, It applies to the data
remembered in the data stack, the return addresses on the return stack,
memory accesses `@'  and `!'  , the size of `VARIABLE' ' s and
`CONSTANT' ' s.  In Forth a cell has no hair. It is interpreted by you
as a signed integer, a bit-map, a memory address or an unsigned number.
The operator `+'  can be used to add numbers, to set a bit in a bitmap
or advance a pointer a couple of bytes.  In accordance with this there
are no errors such as overflow given.

   Sometimes we use data of two cells, a "double" .  The high-order
cell are most accessible on the stack and if stored in memory, it is
highest.

   The code for a high level word can be typed in from the terminal,
but it can also fed into Forth by redirection from a file, `INCLUDED'
from a file or you can "load"  it from the file `forth.lab', because
you can load a piece of this library at will once you know the block
number. This file is divided into "blocks"  of 1 Kbyte. They may
contain any data, but a most important application is containing source
code. A block contain source code is called a "screen" . It consists of
16 lines of 64 characters. In ciforth the 64-th character is `^J' such
that they may be edited in a normal way with some editors. To "load"
such a screen has the same effect as typing its content from the
terminal.  The extension lab stands for "Library Addressable by Block" ,

   Traditionally Forthers have things called "number" 's, words that
are present in the source be it interpreted or compiled, and are
thought of not as being executed but rather being a description of
something to be put on the stack directly. In early implementations the
word `NUMBER' was a catch-all for anything not found in the dictionary,
and could be adapted to the application.  For such an extensible
language as Forth, and in particular where strings and floating point
numbers play an increasing role, numbers must be generalised to the
concept of "denotation" 's.  The need for a way to catch those is as
present as it was in those early days.  Denotations put a constant
object on the stack without the need to define it first. Naturally they
look, and in fact are, the same in both modes. Here we adopt a practice
of selecting a type of the denotations based on the first letter. This
is quite practical and familiar.  Examples of this are (some from C,
some from assemblers, some from this Forth) :
     10
     'a'
     ^A
     0DEAD
     $8000403A
     #3487
     0177
     "Arpeggio"
     "JAMES BROWN IS DEAD"
     " JK "
     'DROP
     ' DROP
   These examples demonstrate that a denotation may contain spaces, and
still are easy to scan.  And yes, I insist that `' DROP' is a
denotation.  But `'DROP' is clearer, because it can only be interpreted
as such; it is not a valid word.

   Of course a sensible programmer will not define a word that looks
like a denotation :
      : 7 CR "This must be my lucky day" TYPE ; ( DON'T DO THIS)

Portability
===========

   If you build your words from the words defined in the ISO standard,
and are otherwise careful, your programs may run on other systems that
are ISO standard.

   There are no gratuitous deviations from the standard.  However a few
things are not quite conforming.
  1. The error system uses `CATCH'  and `THROW'  in a conforming way.
     However the codes are not assigned according to the table in the
     standard. Instead positive numbers are ciforth errors and
     documented in this manual.  ciforth's errors identify a problem
     more precisely than the standard allows. An error condition that
     is not detected has no number assigned to it.  Negative numbers
     are identical to the numbers used by the host operating system.
     No attempt is made to do better than reproduce the messages
     belonging to the number as given by strerror.

  2. It is not possible to catch the following words : `ABORT"'  `ABORT'
     `QUIT'  .

  3. There is no `REFILL'  . This is a matter of philosophy in the
     background. You may not notice it.
     Consequences are that `BLK'  is not inspected for every word
     interpreted, but that blocks in use are locked.  Files are not
     read line by line, but read in full and evaluated.

  4. It doesn't use `>IN'  exactly in the way prescribed by ISO.  The
     `>IN'  that is there is a fake, that can only be read, not changed.

  5. Vocabularies are wordlists with a name. However they push the
     wordlist to the search order, instead of replacing the topmost one.
     In this sense `FORTH'  and `ASSEMBLER'  words are not strictly
     conforming.

  6. This is not strictly non-conforming, but worth mentioning here.
     In fact lina contains only one state-smart word besides `SLITERAL'
     (that word is `."'  ).  All denotations are state-smart, but the
     result is correct ISO behaviour for numbers.  Knowledge of this is
     used freely in the libraries of ciforth; it is the right of a
     system developer to do so.  The library is not a supposedly
     ISO-conforming program.  It tends to rely on ciforth-specific and
     lina-specific - but hopefully documented - behaviour.
     Understanding it requires some study of non-portable facilities.

   Here we will explain how you must read the glossary of lina, in
relation to terminology in the ISO standard.

   Whenever the glossary specifies under which conditions a word may
"crash" , then you will see the euphemism "ambiguous condition"  in the
ISO standard.

   For example:
Using `HOLD' other than between `<#' and `#>' leads to a crash.

   Whenever we explicitly mention ciforth in a sentence that appears in
a glossary entry, the behaviour may not apply to other ISO standard
systems.  This is called "ciforth specific behaviour" . If it mentions
"this ciforth" or "lina", you cannot even trust that behaviour to be
the same on other ciforth systems.  Often this is called an
"implementation defined" behaviour in the standard.  Indeed we are
obliged to specify this behaviour in our glossary, or we don't comply
to the standard.  The behaviour of the other system may very well be a
crash.  In that case the standard probably declares this an "ambiguous
condition".

   For example:
On this ciforth `OUT' is set to zero whenever `CR' is executed.

   The bottom line is that you never want to write code where lina may
crash.  And that if you want your code to run on some other system, you
do not want to rely on "ciforth specific behaviour" .  If you couldn't
get around that, you must keep the specific code separate.  That part
has to be checked carefully against the documentation of any other
system, where you want your code to run on.

   By using `CELL+'  it is easy to keep your code 16/32 bit clean.
This means that it runs on 16 and 32 bits systems.

Saving a new system
===================

   We have said it before: "Programming Forth is extending the Forth
language.".  A facility to save your system after it has been extended
is of the essential.  It can be argued that if you don't have that, you
ain't have no Forth.  It is used for two purposes, that are in fact the
same.  Make a customised Forth, like you want to have it.  Make a
customised environment, like a customer wants to have it.  Such a
"customised environment", for example a game, is often called a
"turnkey system"  in Forth parlance.  It hides the normal working of
the underlying Forth.

   In fact this is what in other languages would be called "just
compiling", but compiling in Forth means adding definitions to an
interactive Forth.  In ciforth "just compiling" is as easy as in any
language (*note Manual::, Hello world!).  Of course, whether you have a
hosted system like this one  or a booted system , it is clear that some
system-dependant information goes into accomplishing this.

   This has all been sorted out for you. Just use `SAVE-SYSTEM'  .
This accepts a string, the name you want the program-file to have.

   In the following it is explained.  We use the naming convention of
ISO about cells.  A cell is the fundamental unit of storage for the
Forth engine.  Here it is 32 bits (4 bytes).

   The change of the boot-up parameters at `+ORIGIN' , in combination
with storing an image on disk goes a long way to extending the system.
This proceeds as follows:
  1. All user variables are saved by copying them from `U0 @' to `0
     +ORIGIN'.  The user variable `U0'  points to the start of the user
     area. The length of the area is 0x40 cells.  If in doubt check out
     the variable `US' in the assembler code.

  2. If all user variables are to be initialised to what they are in
     this live system skip the next step.

  3. Adjust any variables to what you want them to be in the saved
     system in the `+ORIGIN'  area.  The initialisation for user
     variable `Q' can be found at     `' Q >DFA @ +ORIGIN'.

  4. Adjust version information (if needed)

  5. Copy your lina to a new file using `PUT-FILE'  .  The difficult
     part is to add to the system specific header information about the
     new size of the system, which is the area from `BM'  to `HERE' .
     The command `REQUIRE SAVE-SYSTEM' loads a version that does that
     correctly for your hosted system.

Memory organization
===================

   A running ciforth has 3 distinct memory areas.

   They occur sequentially from low memory to high.
   * The dictionary

   * Free memory, available for dictionary, from below, and stacks,
     from above

   * Stacks, disk block buffers  and terminal input buffer.
   The lowest part of the free memory is used as a scratch area.

   The program as residing on disk may contain startup code, but that is
of no concern for the usage.

   The dictionary area is the only part that is initialised, the other
parts are just allocated.  Logically the Forth system consists of these
7 parts.
   * Boot-up parameters

   * Machine code definitions

   * Installation dependant code

   * High level standard definitions

   * High level user definitions

   * System tools (optional)

   * RAM memory workspace

Boot-up Parameters
------------------

   The boot-up area contains initial values for the registers needed
for the Forth engine, like stack pointers, the pointers to the special
memory area's, and the very important dictionary pointer `DP' that
determines the boundary between the dictionary and free space.

   Instead they are copied to a separate area the "user area"  , each
time Forth is started.  The bootup area itself is not changed, but the
variables in the user area are.  By having several user area's, and
switching between them, ciforth could support multitasking.  When you
have made extensions to your system, like for instance you have loaded
an editor, you can make these permanent by updating the initial values
in the boot-area and saving the result to disk as an executable program.
The boot-up parameters extends from `0 +ORIGIN' and has initial value
for all of the user area.  This is the image for the "user area" .

   So in ciforth the bootup parameters are more or less the data field
of the `+ORIGIN'  word.  Executing `0 +ORIGIN' leaves a pointer in this
area.

Installation Dependent Code
---------------------------

   `KEY'  `EMIT'  `KEY?'  `CR'  and `R/W'  are indeed different for
different I/O models.  This is of little concern to you as a user,
because these are perfectly normal dictionary entries and the different
implementations serves to make them behave similarly.  There will
however be more differences between the different configurations for
ciforth for these words than habitually.

Machine Code Definitions
------------------------

   The machine executable code definitions play an important role
because they convert your computer into a standard Forth stack computer.
It is clear that although you can define words by other words, you will
hit a lowest level.  The "code word" 's as these lowest level programs
are called, execute machine code directly, if you invoke them from the
terminal or from some other definition.  The other definitions, called
"high level"  code, ultimately execute a sequence of the machine
executable code words.  The Forth "inner interpreter"  takes care that
these code words are executed in turn.

   In the assembler source (if you care to look at it) you will see
that they are interspersed with the high level Forth definitions.  In
fact it is quite common to decide to rewrite a code definition in high
level Forth, or the other way around.

   Again code words are perfectly normal dictionary entries.

High-level Standard Definitions
-------------------------------

   The high level standard definitions add all the colon-definitions,
user variables, constants, and variables that must be available in a
"Forth stack computer" according to the ISO standard.  They comprise
the bulk of the system, enabling you to execute and compile from the
terminal, execute and "load"  code from disk to add definitions etc.
Changes here will result in deviations from the standard, so you
probably want to leave this area alone.  Again these words are
perfectly normal dictionary entries.  The technique described for the
next section, forget and recompile, is not always possible here because
of circular references.  That is in fact no problem with an assembler
listing, but it is if you load Forth code.

   Again standard definitions words are perfectly normal dictionary
entries.

User definitions
----------------

   The user definitions contain primarily definitions involving user
interaction: compiling aids, finding, forgetting, listing, and number
formating.  Some of these are fixed by the ISO standard too.  These
definitions are placed above the standard definitions to facilitate
modification.  That is you may `FORGET'  part of the high-level and
re-compile altered definitions from disc.  This applies even to the ISO
standard words from the `TOOLS' wordset like `DUMP'  (show a memory
area as numbers and text) and `.S'  (show the data stack).

   Again these words are perfectly normal dictionary entries.  A number
of entries that could easily be made loadable are integrated in the
assembler source of this ciforth version.  You can forget them, and
load your own version from files or blocks.

   Again user definitions words are perfectly normal dictionary entries.

System Tools
------------

   The boundary between categories are vague. A system tools is
contrary to a user tool, a larger set of cooperating words.  A text
editor and machine code assembler are the first tools normally
available.  An assembler is not part of ciforth as delivered, but it is
available after `REQUIRE ASSEMBLERi86'.  It automatically loads the
proper 32-bits version.  You can load a more elaborate assembler. *Note
Assembler::, Section Overview.  They are among the first candidates to
be integrated into your system by `SAVE-SYSTEM'  .

   An editor is not part of ciforth as delivered.  Development in Linux
uses the there available editors.  Even without tools, code can be
tested by piping it into Forth, then commanding Forth to look to the
console, as follows :
` (echo 8 LOAD; cat pascal.frt - )| lina '
Primitive and preliminary as this may seem, it has been used for quite
substantial developments like the 80386 assembler.
More advanced is using Your Favorite Editor, followed by including
files:
` "vim mysrc.frt" SYSTEM '
` "mysrc.frt" INCLUDED '
*Note Manual::, Section Getting Started.

   386 and a 8086 Forth assemblers are available in `forth.lab'.  They
are loaded in accordance with the system that is run.

   It is essential that you regard lina as just a way to get started
with Forth.  Forth is an extensible language, and you can set it to
your hand.  But that also means that you must not hesitate to throw
away parts of the system you don't like, and rebuilt them even in
conflict with standards.  Additions and changes must be planned and
tested at the usual Forth high level.  Later you can rewrite them as
code words.

   Again words belonging to tools are perfectly normal dictionary
entries.

RAM Workspace
-------------

   The RAM workspace contains the compilation space for the dictionary,
disc buffers,  the computation and return stacks, the user area, and
the terminal input buffer, From the fig-Forth user manual

     For a single user system, at least 2k bytes must be available
     above the compiled system (the dictionary). A 16k byte total
     system is most typical.
   It is indeed possible to do useful work, like factoring numbers of a
few hundred digits, in a workspace of 2k bytes.  More typical a
workspace is several megabytes to over hundred megabytes.

   32 bits system are set at 64Mbyte but this is arbitrary and could be
set much higher or lower without consequences for system load or
whatever.  Before long we will put the dictionary space on I86-Linux to
4G minus something and forget about this issue forver.

   The boundary between this area and the previous one is pretty sharp,
it is where `DP'  points.  The other areas are not clearly separated at
all.  But even this boundary constantly changes as you add and forget
definitions.

Specific layouts
================

The layout of a dictionary entry
--------------------------------

   We will divide the dictionary in entries.  A "dictionary entry"  is
a part of the dictionary that belongs to a specific word.  A
"dictionary entry address" , abbreviated "DEA"  is a pointer to the
header of a dictionary entry.  In ciforth a header extends from the
lowest address of the entry, where the code field is to the "past
header address" , just after the last field address.  A "dictionary
entry" apart from the header owns a part of the dictionary space that
can extend before the header (mostly the name of the entry) or after it
(mostly data and code).

   A dictionary entry has fields, and the addresses of fields directly
offset from the dictionary entry address, are called "field address" .
This is a bit strange terminology, but it makes a distinction between
those addresses and other addresses.  For example, this allows to make
the distinction between a "data field address" , that is always
present, and a "data field"  in the ISO sense that has only a
(differing) meaning for `CREATE'  `DOES> '  definitions.  Typically, a
field address contains a pointer. A "data field address"  contains a
pointer to near the "data field" , whenever the latter exists.

   They go from lowest in memory to highest:
  1. The code field. This is one cell.  A pointer to such a field is
     called a "code field address" .  It contains the address of the
     code to be executed for this word.

  2. The data field, of the DEA, not in the ISO sense.  This is one
     cell.  A pointer to such a field is called a "data field address" .
     It contains a pointer to an area owned by this definition.

  3. The flag field. This is one cell.  A pointer to such a field is
     called a "flag field address" .  For the meaning of the bits of
     the flag field sea below.

  4. The link field. This is one cell.  A pointer to such a field is
     called a "link field address" .  It contains the dictionary entry
     address of the last word that was defined in the same "word list"
     before this one.

  5. The name field. This is one cell.  This contains a pointer to a
     string.  A pointer to such a field is called a "name field address"
     .  The name itself is stored outside of the dictionary header in a
     regular string, i.e. a one cell count followed by as many
     characters.  Unfortunately, "name field address"  is sometimes
     used, where a "dictionary entry address"  would be more correct,
     especially in older documentation.  This came about because the
     name was lowest in memory. That they happen to be the same is no
     reason to confuse two completely different concepts. In this Forth
     the code field address and the dictionary address are the same,
     but not accidentally so.

  6. The source field. This is one cell.  This can be used to hold a
     reference to the source, a block number or a pointer to a string.
     It has not been filled in, in the kernel system.

  7. Past the header . This is actually not a field, but the free
     roaming dictionary. However, most of the time the part of the
     dictionary space owned by a dictionary entry starts here. A
     pointer to such a field is called a "past header address" address .
     Mostly a "data field address"  contains a pointer to just this
     address.

   Note that the entries are not only in alphabetic order, they are in
order of essentiality. They are accessed by `>CFA'  `>DFA'  `>FFA'
`>LFA'  `>NFA'  `>SFA'  .

   Note "data field"  has a specific meaning in the ISO standard. It is
accessed through `>BODY'  from the "execution token"  while a data
field address is accessed through `>DFA'  from the "dictionary entry
address" . It is in fact one cell behind where the "data field address"
pointer points to.

   The most important flag bits currently defined are:
   * The INVISIBLE bit = 1 when "smudge" d, and will prevent a match by
     `(FIND)' .

   * The IMMEDIATE bit = 1 for IMMEDIATE definitions; it is called the
     "immediate bit" .

   * The DUMMY bit =1 for a dictionary header contained in the data of
     a vocabulary. This indicates that it should not be executed.

   * The DENOTATION bit =1 for a prefix word.  This means that it is a
     short word used as a prefix that can parse all "denotation" 's
     (numbers) that start with that prefix, e.g. 7 or & .  Usually it
     is a one letter word, but not necessarily.  All built-in prefix
     words are part of the minimum search order.

   * After the last letter follow zero bytes up till the next cell
     boundary.
   `(CREATE)'  takes care to generate this data structure; it is called
by all defining words.

   For all "colon definition" 's the code field contains a pointer to
the same code, the "inner interpreter" , called `DOCOL'.  For all words
defined via `CREATE ... DOES>' the code field contains the same code,
`DODOES'.

   At the "data field address"  we find a pointer to an area with a
length and content that depends on the type of the word.
   * For a code word, it contains machine code.  The code field of this
     word points to it too.

   * For a word defined by `VARIABLE' , `USER' , or `CONSTANT'  it has
     a width of one cell, and contains data.

   * For all "colon definition" 's the data field address contains a
     pointer to an area with a variable length. It contains the
     compiled high level code, a sequence of "code field address"
     address es.

   * For a word defined via `CREATE ... DOES>' the first cell of this
     area contains a pointer to the "high level"  code defined by
     `DOES>'  and the remainder is data. A pointer to the data is
     passed to this `DOES>'  code.

   A "dictionary entry address"  can be turned into any of these fields
by words that are in the vocabulary `DICTIONARY'. *Note DICTIONARY::,,
for those field words. They customarily start with `>'.

   A dictionary falls apart into the
  1. Headers, with their fields.

  2. Names, pointed to by some "name field address" .

  3. Data, pointed to by some "data field address" .  This includes
     high level code, that is merely data fed into the high level
     interpreter.

  4. Code, pointed to by some "code field address" .  This is directly
     executable machine code.

Details of memory layout
------------------------

   The disc buffers are mainly needed for source code that is fetched
from disk were it resides in a file.

   The disc buffer area is at the upper bound of RAM memory, So it ends
at `EM'  .

   It is comprised of an integral number of buffers, each `B/BUF'
bytes plus two cells.  `B/BUF'  is the number of bytes read from the
disc in one go, originally thought of as one sector.  In ciforth's
`B/BUF'  is always the size of one screen according to ISO : 1024 bytes.
The constant `FIRST'  has the value of the address of the start of the
first buffer.   `LIMIT'  has the value of the first address beyond the
top buffer.  The distance between `FIRST'  and `LIMIT'  is a multiple of
`B/BUF CELL+ CELL+'  bytes.

   For this ciforth the number of disk buffers is configured at 8  .
The minimum possible is approximately 8 because nesting and locking
requires that much blocks available at the same time.

   The user area is configured to contain 0x40 cells, most of it unused.
User variables can be added by the word `USER'  , but you have to keep
track yourself which offset in the user area can be used.   The user
area is just under the disc buffers. So it ends at `FIRST'  .

   The terminal input buffer  and the return stack share an area
configured at a size of 0x10000 bytes.  The lower half is intended for
the terminal input buffer, and the higher part is used for the return
stack, growing down from the end.  The initial stack pointer is in
variable `R0' .  The return stack grows downward from the user area
toward the terminal buffer.

   The computation stack grows downward from the terminal buffer toward
the dictionary which grows upward.  The initial stack pointer is in
variable `S0' .

   During a cold start, the user variables are initialised from the
bootup parameters to contain the addresses of the above memory
assignments.

   They can be changed.  *Note +ORIGIN::, for the bootup area.  But
take care. You probably need to study the source for how and when they
take effect.

   If you need multi-tasking you have to allocate a separate user area
for each task, as well as a separate return stack area and a separate
data stack area. A task that asks for input, also needs an extra
terminal input buffer.

Terminal I/O and vectoring.
---------------------------

   It is useful to be able to change the behaviour of I/O words such
that they put their output to a different channel.  For instance they
must output to the printer instead of to the console.  In general this
is called "vectoring" .  Remember that in normal Forth system, all
printing of numbers is to the terminal, not to a file or even a buffer.
(On a linux system something like it can be accomplished by the
redirection facilities available.)

   For this reason character output `CR' , `EMIT'  and `TYPE'  all go
through a common word that can be changed.  For lina it is `TYPE'   .
Because this is defined in high level code it can temporarily be
replaced by other code. This "revectoring"  is possible for all high
level words in ciforth, such that we need no special measures to make
"vectoring"  possible.  As an example we replace `TYPE'  by `MYTYPE'  .
`' MYTYPE >DFA  ' TYPE >DFA !'
And back to default:
`' TYPE >PHA ' TYPE >DFA !'
Be careful not to define `MYTYPE'  in terms of `TYPE'  , as a recursive
tangle will result.  This method works in all versions of ciforth and
is called "revectoring" .

   A similar technique is not so useful on the input side, because keys
entered during `EXPECT'  are subject to correction until <RET> has been
pressed.  On lina `EXPECT'  is left to the operating system, such that
inputting to lina has the same look and feel as other input.  Text can
be pasted in with the mouse, etc.  Consequently `RUBOUT'  is not used.

Libraries and options
=====================

   In ciforth there is no notion of object (i.e. compiled) libraries,
only of source libraries.  A Forth "library"  is a block file adorned
with one convention.  This is that the words defined in a screen are
mentioned on the first line of that screen, the "index line" .  This is
of course quite established as a habit.  The word `REQUIRED'  takes a
string and loads the first screen where that name occurs in the index
line. For convenience also `REQUIRE'  is there that looks ahead in the
input stream.  These words are not in the kernel but are in screen 17,
that corresponds to the `-r' option.

   Screen 0 and screen 1 to 31 are reserved.

   When a Forth is started up with a first parameter that is a
one-letter option, the corresponding screen is to be executed. So `-a'
or `-A' is equivalent to `1 LOAD' and `-z' or  `-Z' is equivalent to
`26 LOAD'.   In fact all options are mapped onto screen 0..31 by a
bitwise and.

Options
-------

   ciforth is a primitive system, and can interpret just one option on
the command line. If the first argument is not starting with `-'
ciforth returns with error code 3.  However the option `-l' can
bootstrap it into more sophisticated behaviour.

   The following options can be passed to lina on the command line:

   * `-a'

     Make sure `REQUIRED'  is available.  This is a copy of the `-r'
     command because it is easier to remember `1 LOAD' if the screen
     must be loaded manually.  In addition the signon message is
     suppressed.

   * `-c name'

     Compile the file `name' to an executable binary. The name of the
     binary is `name' without the trailing `.frt' or else `a.out'.
     Upon invocation of the binary the word defined latest is executed,
     then Forth goes  `BYE'  .   `name' is a regular source file, not a
     block file.  Also `REQUIRED'  is made available.

   * `-e'

     Load the elective screen, screen 5. This contains "preferences" ,
     the tools you want to have available running an interactive Forth.
     The  default library file contans system wide default preferences.
     See the `-l' option if the default preferences don't suite you.
     In a elective screen you just put commands you want to be executed
     after Forth starts up, such as ` "fortune -f
     /usr/lib/forthcookies" SYSTEM '  or ` REQUIRE EDIT '

   * `-f forthcode'

     Execute the `forthcode' in the order present.  Beware of the
     special characters in the shell. Also the shell will collapse
     multiple spaces into one.

   * `-g number name'

     Expand the system by `number' Megabytes, then save it under the
     name `name'.  `number' may be negative, and in that case the system
     is made smaller.

   * `-h'

     Print overview of options.

   * `-i binpath libpath [shellpath]'

     Install the forth in `binpath' and the library in `libpath' .  If
     the `shellpath' parameter is specified, it will be installed as
     the command interpreter used for `SYSTEM' .  All of them must be
     full path names, not just directories.  The ciforth that is
     running is copied to `binpath', and the block file is copied to
     `libpath'.

     For system wide installation on a modern large system the following
     is recommended:

              su
              ./lina -g 60 lina+
              ./lina+ -i /usr/bin/lina /usr/lib/forth.lab
              chmod 755 /usr/bin/lina
              chmod 644 /usr/lib/forth.lab

     For a smallish system you may expand by 0 Mbyte `-g 0'.  If the
     system has no swap space, and less than 8 Mbyte of memory, use `-g
     -3', diminish from 4 to 1 Mbyte.

   * `--help' `--version' `--' `-m'

     In ciforth all options are mapped onto a letter. All options that
     start with `-' are mapped onto `m'.  The result is the combination
     of -h and -v , so both help and version information is printed.
     This conforms to the FSF-conventions.

   * `-l name [more]'

     Use a library `name'.  Restart Forth with as a block file `name'
     and as options the remainder of the line shifted, such that `-l
     name' disappears and the next option becomes the first.  A file
     specified via `-l' is opened for reading and writing.  Options ara
     again handled as as described in the begining of this section.  In
     this way options may be added or reconfigured for personal use.

     Note that the default file is opened for reading only.

   * `-r'

     Make sure `REQUIRED'  is available.

   * `-s script'

     Load the file `script' , but ignore its first line.  This is
     intended to be used for scripts, i.e. a piece of code to be
     interpreted rather than compiled.  The first line is probably
     `#!lina -s' or some such as `#!lina -l
     /usr/lib/forth/cgi/forth.lab -s'.  In a script `REQUIRED'  is
     available and you can use standard in and standard out.

   * `-t sourcefile'

     Try to load the file `script' automatically, by possibly unsafe
     means.  Report facilities that were required.  This is a first
     step in a porting activity.  Redefinition messages are issued on
     the error channel that can be redirected to /dev/nul leaving the
     report.

   * `-v'

     Print version and copy right information.


   The remaining screens are available for options to be added at a
later time, or for user defined options in a private library.

Private libraries
-----------------

   Working with source in files is quite comfortable using the default
block library, especially if sufficient tools have been added to it. In
principle all ISO words should be made available via `REQUIRED'  .

   In order to customize the forth library, you have to make a copy of
the default `/usr/lib/ciforth/forth.lab' to your home directory,
preferably to a lib subdirectory.  Then you can start up using a `-l'
option, or make a customized lina.  *Note Manual::, Subsection
Configuring.

   Most shells allow you to redefine commands, such as e.g. in bash:
alias lina='lina -l $HOME/lib/forth.lab'
Note that the `-l' option hides itself, such that such an alias can be
used completely identical to the original with respect to all options,
including `-l'.  Analysing arguments passed to lina in your programs
can remain the same.

Turnkey applications.
---------------------

   Turnkey application are made using the word `TURNKEY'  .  They take
a word, that is to be done, and a string with the file name.  Mostly it
is much easier to just use the `-c' option.  *Note Manual::, Getting
Started Subsection Hello World!  A turnkey application should decide
what to do with the library file that is default opened in `COLD'  .
Make sure to `CATCH'  errors from `BLOCK-EXIT'  and ignore them.


File: ci86.lina.info,  Node: Assembler,  Next: Errors,  Prev: Manual,  Up: Top

Assembler
*********

   The assembler is described in this manual, because it is not
feasable to use it from the description in the source.

* Menu:

* A2:: Introduction
* A3:: Reliability
* A4:: Principle of operation
* A5:: The 8080 assembler
* A6:: Opcode sheets
* A7:: Details about the 80386 instructions
* A8:: 16 and 32 bits code and segments
* A9:: Difference with the built in assembler
* AA:: A rant about redundancy
* AB:: Reference opcodes Intel 386
* ABA:: Reference opcodes Pentium-only
* AC:: The dreaded SIB byte
* AE:: An incomplete and irregular guide to the instruction mnemonics.
* AF:: Assembler Errors


File: ci86.lina.info,  Node: A2,  Next: A3,  Prev: AF,  Up: Assembler

Introduction
============

   Via `http://home.hccnet.nl/a.w.m.van.der.horst/forthassembler.html'
you can find a couple of assemblers, to complement the generic ciforth
system.  The assemblers are not part of the lina package, and must be
fetched separately.

   They are based on the postit/fixup principle, an original and novel
design to accommodate reverse engineering.  The assembler that is
present in the blocks, is code compatible, but is less sophisticated,
especially regards error detection.  This assembler is automatically
loaded in its 16 or a 32 bit form, such that it is appropriate for
adding small code definitions to the system at hand.  The background
information given here applies equally to that assembler.

   A useful technique is to develop code using the full assembler.
Then with code that at least contains valid instruction enter the
debugging phase with the assembler from the library.

forth.lab : equivalent to asgen.frt plus asi86.frt plus asipentium.frt
but without error detection.
`ass.frt'  : the 80-line 8086 assembler (no error detection), a
prototype.
`as6809s.frt'  : a small 6809 assembler (no error detection).
`asgen.frt' : generic part of postit/fixup assembler
`as80.frt'  : 8080 assembler, requires `asgen.frt'
`asi86.frt'  : 8086 assembler, requires `asgen.frt'
`asi386.frt' : 80386 assembler, requires `asgen.frt'
`aspentium.frt' : general Pentium non-386 instructions, requires
`asgen.frt'
`asalpha.frt' : DEC Alpha assembler, requires `asgen.frt'
`asi6809.frt' : 6809 assembler, requires `asgen.frt'
`ps.frt'     : generate opcode sheets
`p0.asi386.ps' : first byte opcode for asi386 assembler
`p0F.asi386.ps' : two byte opcode for same that start with 0F.
`test.mak' : makefile, i.e. with targets for opcode sheets.
De `asi386.frt' (containing the full 80386 instruction set) is in many
respects non-compliant to Intel syntax. The instruction mnemonics are
redesigned in behalf of reverse engineering.  There is a one to one
correspondence between mnemonics and machine instructions. In principle
this would require a monumental amount of documentation, comparable to
parts of Intel's architecture manuals. Not to mention the amount of work
to check this. I circumvent this. Opcode sheets for this assembler are
generated by tools automatically, and you can ask interactively how a
particular instructions can be completed.  This is a viable alternative
to using manuals, if not more practical. (Of course someone has to
write up the descriptions, I am happy Intel has done that.).

   So look at my opcode sheets. If you think an instruction would be
what you want, use `SHOW:'  to find out how it is to be completed.  If
you are at all a bit familiar, most of the time you can understand what
your options are.  If not compare with an Intel opcode sheet, and look
up the instruction that sits on the same place. If you don't understand
them, you can still experiment in a Forth to find out.

   The assembler in the Library Addressable by Blocks (block file)
hasn't the advanced features of disassembly, completion and error
detection.  It is intended for incidental use, to speed up a crucial
word.  But the code is fully compatible, so you can develop using the
full assembler.


File: ci86.lina.info,  Node: A3,  Next: A4,  Prev: A2,  Up: Assembler

Reliability
===========

   I skimped on write up. I didn't skimp on testing.  All full
assemblers, like `asi386.frt' and `aspentium.frt', are tested in this
way:

  1. All instructions are generated.  (Because this uses the same
     mechanism as checking during entry, it is most unlikely that you
     will get an instruction assembled that is not in this set.)

  2. They are assembled.

  3. They are disassembled again and compared with the original code,
     which must be the same.

  4. They are disassembled by a different tool (GNU's objdump), and the
     output is compared with 3. This has been done manually, just once.

   This leaves room for a defect of the following type: A valid
instruction is rejected or has been totally overlooked.

   But opcode maps reveal their Terra incognita relentlessly. So I am
quite confident to promise a bottle of good Irish whiskey to the first
one to come up with a defect in this assembler.

   The full set of instructions, with all operand combinations sit in a
file for reference. This is all barring the 256-way `SIB' construction
and prefixes, or combinations thereof. This would explode this approach
to beyond the practical.  Straightforward generation of all instructions
is also not practical for the Alpha with 32K register combinations per
instruction. This is solved by defining "interesting" registers that
are used as examples and leaving out opcode-operand combinations with
uninteresting registers.


File: ci86.lina.info,  Node: A4,  Next: A5,  Prev: A3,  Up: Assembler

Principle of operation
======================

   In making an assembler for the Pentium it turns out that the
in-between-step of creation defining words for each type of assembly
gets in the way. There are just too many of them.

   MASM heavily overloads the instruction, in particular `MOV' .  Once
I used to criticise Intel because they had an unpleasant to use
instruction set with `MOV' `MVR' and `MVI' for move instructions.  In
hindsight I find the use of different opcodes correct.  (I mean they
are really different instructions, it might have been better if they
weren't. But an assembler must live up to the truth.)  Where the Intel
folks really go overboard is with the disambiguation of essentially
ambiguous constructs, by things as `OFFSET' `BYTE POINTER'  `ASSUME' .
You can no longer find out what the instruction means by itself.
A simple example to illustrate this problem is
             INC [BX]
   Are we to increment the byte or the word at BX?  Intel's solution is
`INC BYTE POINTER BX') Contrarily here we adapt the rule: if an
instruction doesn't determine the operand size (some do, like `LEA,'  ),
then a size fixup is needed ( `X|' or `B|' ).
In this assembler this looks like
             INC, B| D0 [BX]
   This is completely unambiguous.

   These are the phases in which this assembler handles an instruction:

   * POSTIT phase: `MOV,'  assembles a two byte instruction with holes.

   * FIXUP phase: `X|'  or `B|'  fits in one of the holes left.  Other
     fixups determine registers and addressing mode.

   * COMMA phase: First check whether the fixups have filled up all
     holes.  Then add addresses (or offsets) and/or immediate data,
     using e.g. `IL,'  or `L,'

   * Check whether all commaers, requested either by postit's or fixup's
     are present.  This check is actually executed by a postit like
     `MOV,'

     prior to assembling, or by `END-CODE' .

   Doesn't this system lay a burden on the programmer? Yes.  He has to
know exactly what he is doing.  But assembly programming is dancing on
a rope. The Intel syntax tries to hide from you were the rope is. A bad
idea. There is no such thing as assembly programming for dummies.

   An advantage is that you are more aware of what instructions are
there.  Because you see the duplicates.

   Now if you are serious, you have to study the `asgen.frt' and
`as80.frt' sources.  You better get your feet wet with `as80.frt'
before you attack the Pentium.  The way `SIB' is handled is so clever,
that sometimes I don't understand it myself.  It deviates somewhat from
the phases explained here.

   Another invention in this assembler is the "family of instructions" .
Assembler instructions are grouped into families with identical fixups,
and a increment for the opcodes.  These are defined as a group by a
single execution of a defining word.  For each group there is one
opportunity to get the opcode wrong; formerly that was for each opcode.


File: ci86.lina.info,  Node: A5,  Next: A6,  Prev: A4,  Up: Assembler

The 8080 assembler
==================

   The 8080 assembler doesn't take less place than Cassady's .  (In the
end the postit-fixup makes the Pentium assembler more compact, but not
the 8080.)  But... The regularities are much more apparent. It is much
more difficult to make a mistake with the code for the `ADD' and `ADI'
instructions.  And there is information there to the point that it
allows to make a disassembler that is independant of the instruction
information, one that will work for the 8086, look at the pop family.
First I had
      38 C1 02 4 1FAMILY, POP -- PUSH RST      ( B'|)
   (cause I started from an existing assembler.)  But of course `RST'
(the restart instruction) has nothing to do with registers, so it gets
a separated out. Then the exception, represented by the hole `--'
disappears.  The bottom line is : the assembler proper now takes 22
lines of code.  Furthermore the "call conditional" and "return
conditional" instructions where missing. This became apparent as soon
as I printed the opcode sheets.  For me this means turning "jump
conditional" into a family.


File: ci86.lina.info,  Node: A6,  Next: A7,  Prev: A5,  Up: Assembler

Opcode sheets
=============

   Using `test.mak' (on a linux computer in lina) you can generate
opcode sheets by  "make asi386.ps".  For the opcode sheets featuring a
n-byte prefix you must pass the `PREFIX' to make and a `MASK' that
covers the prefix and the byte opcode, e.g. `make asi386.ps MASK=FFFF
PREFIX=0F' The opcode sheets `p0.asi386.ps' and `p0F.asi386.ps' are
already part of the distribution and can be printed on a PostScript
printer or viewed with e.g. `gv'.

   Compare the opcode sheets with Intel's to get an overview of what I
have done to the instruction set. In essence I have re-engineered it to
make it reverse assemblable, i.e. from a disassembly you can regenerate
the machine code.  This is not true for Intel's instruction set, e.g.
Intel has the same opcode for `MOV, X| T| AX'| R| BX| '     and `MOV,
X| F| BX'| R| AX|'.

   To get a reminder of what instructions there are type `SHOW-OPCODES'
. If you are a bit familiar with the opcodes you are almost there. For
if you want to know what the precise instruction format of e.g.
`IMUL|AD,'  just type `SHOW: IMUL|AD,' You can also type `SHOW-ALL,'
but that takes a lot of time and is more intended for test purposes.


File: ci86.lina.info,  Node: A7,  Next: A8,  Prev: A6,  Up: Assembler

Details about the 80386 instructions
====================================

   Read the introductory comment of `asgen.frt' for how the assembler
keeps track of the state, using the `BI'  `BY'  `BA'  tallies.
  1. A word ending in `,', an "opcode" reserves place in the dictionary.
     It stand for one assembler instruction.  The start of the
     instruction is kept and there is a bitfield (the tally) for all
     bits that belong to the instruction, if only mentally. These bits
     are put as comment in front of the instruction and they are
     considered filled in.  The opcode also determines the instruction
     length.

  2. A fixup mostly ends in `|'.  It `OR' s in some bits in an already
     assembled instruction. Again there is a mask in front of fixups
     and in using the fixup these bits are considered to be filled in.
     A fixup cannot touch data before the start of the latest
     instruction.  Some addressing modes fixups do not have `|' in them.
     This is in order to adhere more closely to conventions regarding
     those addressing modes.  This much can be said. You can be sure
     that a word containing `[' and/or `]' is a fixup, that it is
     addressing mode related and that the addressing is indirect.

  3. Families can be constructed from instructions or fixups with the
     same tally bit fields, provided the instructions differ by a fixed
     increment.  The tallies also contain information about data and
     addresses following.  These fields must be the same too.

  4. The part before a possible `|' in an instruction - but excluding an
     optional trailing I - is the opcode. Opcodes define indeed a same
     action.

  5. The part after `|' in an instruction may be considered a built in
     fixup where irregularity forbids to use a real fixup. A X stands
     for xell or natural data width. This is 16 bit for a 16 bit
     assembler and 32 bit for a 32 bit assembler. These can be
     overruled with ` AS:, '  applying to `DX|'  and `MEM|'  and with `
     OS:, '  applying to tdata required where there is an I suffix.
     The commaers always reveal their true width.  It is either `IW,'
     or `IL,'  .

  6. Width fixups determine the data width : `X|'

     (xell or natural data width 16/32 ) or `B|'  ( 8 bit) unless
     implied.  Offset fixups determine the offset or address width :
     `XO|'

     (xell or natural data width 16/32 ) or `BO|'  ( 8 bit) or `ZO|'  .

  7. Instruction ending in `I' have an immediate data field after all
     fixups. This can be either `IB,'  `IW,'  `IL,'  ( 8 16 32 bit).
     If there are width fixups they should correspond with the data.

  8. Instructions ending in `|SG' builtin fixup (segments) require `SG,'
     (which is always 16 bits).  For Xells in the presence of width
     overrules, the programmer should carefully insert `W,'  or `L,'
     whatever appropriate.

  9. With r/m you can have offsets (for `BO|'  and `XO|'  ) that must
     be assembled using `B,'  or `L,'  but mind the previous point.

 10. Instruction with r/m can have a register instead of memory
     indicated by the normal fixups `AX|'  etc.

 11. If instructions with r/m have another register, that one is
     indicated by a prime such as `AX'|' . Or if an instruction can
     handle two general registers, the one that cannot be replaced by a
     memory reference gets a prime.

 12. Unless `T|'  `F|'  (to/from) are present, a primed register is the
     modifiable one, else `T|'  `F|'  refer to the primed register.
     The primed register is the one that cannot be replaced by a memory
     reference.

 13. At the start of an instruction the mask of the previous instruction
     plus fixup should add up non-overlappingly to a full field.
     Offsets and immediate data should have been comma-ed in in that
     order.  This is diagnosed in the great assembler.

 14. Instructions ending in ` :, ' are prefixes and are considered in
     their own right. They have no fixups.

 15. The Scaled Index Byte is handled internally in the following way:
     The fixup `SIB|'  closes the previous instruction (i.e.  fill up
     its bit field), but possible immediate data and offsets are kept.
     Then `SIB,'  starts a new instruction.  The user merely needs to
     use a fixup with an unbalanced opening square bracket such as `[AX'
     , that handles this transparently.

 16. The `SET,'  instruction unfortunately requires a duplicate of the
     `O|'  etc. fixups of the `J,'  and `J|X,'  instructions, called
     `O'|'  etc.

 17. Similarly, some single byte instructions require `X'|'  and `B'|'
     instead of `X|'  and `B|'  that are used for the ubiquitous
     instructions with r/m.

   This is the way the disassembler works.

  1. Find the first instruction that agrees with the data at the
     program counter. Tally the bits. The instructions length follows
     from the instruction. As does the presence of address offsets and
     immediate data. In the current implementation the search follows
     dictionary links.  The dictionary must be organized such that the
     correct instruction is found first.  If two instructions agree
     with the data, in general the one that covers the most bits must
     be found first.

  2. Find the first fixup that agrees with untallied bits.  Note that
     opcode and previous fixups may have set bits in the `BAD'
     variable.  Any fixups that set a bit in `BAD'  that would result
     in a conflict are not considered.

  3. If not all bits have been tallied go to 2, searching the dictionary
     from where we left off

  4. Disassemble the address offsets and immediate data, in accordance
     with the instruction. Length is determined from fixups and prefix
     bytes.  The commaers that were used to assemble the data have an
     associated execution token to disassemble the data.  This is used
     to advantage to change the representation from program counter
     relative to absolute, or look up and show the name for a label.


File: ci86.lina.info,  Node: A8,  Next: A9,  Prev: A7,  Up: Assembler

16 and 32 bits code and segments
================================

   Note that the handling of segments and mixing thereof changed
starting ciforth version 4.0.6.  Contrary to the old situation,
commaers are checked correctly in the presence of prefixes and you have
never to overrule error-checking.

   The description of 16 or 32 bits in the Intel manuals is messy.
These are the rules.
  1. In real mode all sizes are 16 bits.

  2. In protected mode the size of an address or Xell offset agrees
     with the size of the code segment.

  3. In protected mode the size of an immediate data Xell agrees with
     the size of the applicable data segment.  Mostly this is the data
     segment, but it may be the stack segment or some extra segment.

  4. In all previous cases the code length can be swapped between 16
     and 32 bits by a code length override prefix `OS:' , the data
     length by a data length override prefix `AS:' ,

   The 16 bit indexing in a 32 bit assembler have separate fixup's,
that all end in a `%'-sign.

   In fixup X is used to mean Xell, or the natural word length.  This
is 16 bits for 16 bits segments and 32 bits for 32 bits segments.
Likewise in PostIt-FixUp AX means Intel's `AX'  for 16 bits segments
and `EAX'  for 32 bits segments.

   In comma-ing, you must always select the proper one, xell-wide
commaers always contain either `W' or `L' .

   After the directive `BITS-16'  code is generated for and checked
against 16 bit code and data segments.  After the directive `BITS-32'
code is generated for and checked against 32 bit code and data segments.

   In a 16 bits segments the following commaers must be used:  `W,'
`IW,'  `(RW,)'  and `RW,'  .

   In a 32 bits segments the following commaers must be used:  `L,'
`IL,'  `(RL,)'  and `RL,'  .

   The prefix `OS:'  switches the following opcode to use `IL,'
instead of `IW,'  and vice versa.  Similarly the prefix `AS:'  switches
between `W,'

   and `L,' , or between `RW,'  and `RL,' .

   While mixing modes, whenever you get error messages and you are sure
you know better than the assembler, put `!TALLY'  before the word that
gives the error messages.  This will "override the error detection" .
Proper use of the BITS-xx directives makes this largely unnecessary,
but it can be needed if you use e.g. an extra segment `ES|'

   that is 16 bits in an otherwise 32 bits environment.


File: ci86.lina.info,  Node: A9,  Next: AA,  Prev: A8,  Up: Assembler

The built in assembler
======================

   From within ciforth one can load an assembler from the installed LAB
library by the command `REQUIRE ASSEMBLERi86 ' .  Automatically a 32
bit assembler is loaded if the Forth itself is 32 bits and a 16 bit
assembler for the 16 bit forths.  This is a simplified version with no
error checking and no provisions for 16/32 bit mixing.  (Those are not
needed, because you can mix with impunity.)  In the future this
assembler is now (since 4.0.6) fully compatible with the large
file-based one.

   Consequently you can take a debugged program and run it through the
LAB assembler.

   The built in assembler has no error checking.

   IMPORTANT NOTE: The 4.0.6 version and later contains assembler code
in the LAB file that has not yet been converted.  This code largely
relates to a booting version; It will be updated as soon as I have a
booting version in a binary form available.


File: ci86.lina.info,  Node: AA,  Next: AB,  Prev: A9,  Up: Assembler

A rant about redundancy
=======================

   You could complain about redundancy in postit-fixup assemblers.  But
there is an advantage to that, it helps detect invalid combinations of
instructions parts. They look bad at first sight. What about
`MOV, B| T| [BX+SI] R| AX|'
`MOV,' needs two operands but there is no primary operand in sight.
`[BX+SI]'  would not qualify. and not even `BX|'  because the primary
operand should be marked with a prime.
`MOV, X| T| BX| AX|' looks bad because you know `BX|'  and `AX|'  work
on the same bit fields, so it easy to remember you need the prime.  `T|'
and `F|'  refer to the primary operands, so gone is the endless
confusion about what is the destination of the move.
`MOV, X| T| BX'| R| AL'| looks bad , because `AL|'  could not possibly
qualify as an X register.
`MOV, X| T| BX'| AX|' looks bad , because soon you will adopt the habit
that one of the 8 main register always must be preceeded with `T|' `F|'
or `R|'  .
`MOV, X| T| BX'| R| AX|' looks right but you still can code `MOV, AX|
BX'| R| T| X|' if you prefer your fixups in alphabetic order. (A nice
rule for those Code Standard Police out there?).

   And yes `ES: OS: MOV, X| T| DI'| SIB|, XO| [BP +8* AX] FFFFF800 X,'
though being correct, and in a logical order, looks still bad, because
it is bad in the sense that the Pentium design got overboard in
complication. (This example is from the built-in assembler, the one in
`asi386.frt' redefines `[BP'  c.s.  to get rid of the `SIB|,'
instruction.)
First remark: lets assume this is 32 bit code,(because otherwise there
would not be a `SIB,'  sure?)
There are 3 sizes involved :
   * The size of the data transported this is always the `X' as in `X|'
     .  Then the first `X|'  changes its meaning to 16 bit, because of
     the `OS:'  prefix.

   * The `X'  in `XO|'  and in `X,'  must agree and are 32 bits because
     you are in a 32 bits segment and this cannot be overridden.

   * The offset (in `+AX]' ) is counted in 64 bits, a strange array for
     fetching the `DI' but anyway.
   And .. by the way the data is placed in the extra segment.  Add a
bit of awareness of the cost of the instructions in execution time and
take care of the difference between the Pentium processors MMX en III
and what not and you will see that assembly program is not for the faint
of heart. The `ASSUME' of the MASM assembler buys you nothing, but
inconvenience.


File: ci86.lina.info,  Node: AB,  Next: ABA,  Prev: AA,  Up: Assembler

Reference opcodes, Intel 386
============================

   Table one contains all the opcodes used in `asi386.frt' in
alphabetic order, with `|' sorted before any letter.  The opcodes that
lift the assembler to the level of the Pentium is separately in table
3, in order not to make the tables overly long.  All opcodes on the
first position are the same as Intel opcodes, barring the bar.  Note
that sometimes parts that are integrated in the opcodes in Intel
mnemonics are a separate fixup in the Postit-Fixup assembler.  Examples
are the condition codes in jumps.

   You can use it in two ways.

   * You want the opcode for some known Intel opcode.
     Look it up in the first column. One of the opcodes on that line is
     what you want. To pick the right one, consider the extension that
     are explained in table 2. Exception: `PUSHI' is not on the line
     with `PUSH' .  Some times you have to trim built in size
     designators, e.g. you look up `LODSW' but you are stuck at `LODS'
     , so that's it.  With ` SHOW: LODS, ' you can see what the
     operands look like.

   * You want to know what a POSIT/FIXUP code does. Look it up in the
     table, on the first word on the line you should recognize an Intel
     opcode. For example you have ` CALLFAROI, '

     That is at the line with `CALL,'  . So the combination of operands
     for `CALLFAROI,'  are to be found in the description for `CALL' in
     the Intel manuals.

   Note. Some things are ugly. `LDS,'  should be `L|DS,'  . I would
replace `MOV|FA,'  by `STA,'  and `MOV|TA,'  by `LDA, '  . But that
would make the cross referencing more problematic. Note. The meaning of
the operands for `JMP' and `JMPFAR' are totally different. So my
suffices are different.

   Table 1. Opcode cross reference.

AAA,

AAD,

AAM,

AAS,

ADC, ADCI, ADCI|A, ADCSI,

ADD, ADDI, ADDI|A, ADDSI,

AND, ANDI, ANDI|A,

ARPL,

AS:,

BOUND,

BSF,

BSR,

BT, BTI,

BTC, BTCI,

BTR, BTRI,

BTS, BTSI,

CALL, CALLFAR, CALLFAROI, CALLO,

CBW,

CLC,

CLD,

CLI,

CLTS,

CMC,

CMP, CMPI, CMPI|A,

CMPS, CMPSI,

CPUID,

CS:,

CWD,

DAA,

DAS,

DEC, DEC|X,

DIV|AD,

DS:,

ENTER,

ES:,

FS:,

GS:,

HLT,

IDIV|AD,

IMUL, IMUL|AD, IMULI, IMULSI,

INC, INC|X,

INS,

INT, INT3, INTO,

IN|D, IN|P,

IRET,

J, J|X, (INTEL JCC)

JCXZ,

JMP, JMPFAR, JMPFAROI, JMPO, JMPS,

LAHF,

LAR,

LDS,

LEA,

LEAVE,

LES,

LFS,

LGDT,

LGS,

LIDT,

LLDT,

LMSW,

LOCK,

LODS,

LOOP, LOOPNZ, LOOPZ,

LSL,

LSS,

LTR,

MOV, MOV|CD, MOV|FA, MOV|SG, MOV|TA,

MOVI, MOVI|BR, MOVI|XR,

MOVS,

MOVSX|B, MOVSX|W,

MOVZX|B, MOVZX|W,

MUL|AD,

NEG,

NOT,

OR, ORI, ORI|A,

OS:,

OUTS,

OUT|D, OUT|P,

POP, POP|ALL, POP|DS, POP|ES, POP|FS, POP|GS, POP|SS, POP|X,

POPF,

PUSH, PUSH|ALL, PUSH|CS, PUSH|DS, PUSH|ES, PUSH|FS, PUSH|GS, PUSH|SS, PUSH|X,

PUSHF,

PUSHI|B, PUSHI|X,

RCL,

RCR,

REPNZ,

REPZ,

RET+, RET, RETFAR+, RETFAR,

ROL,

ROR,

SAHF,

SAR,

SBB, SBBI, SBBI|A, SBBSI,

SCAS,

SET,   (INTEL SETCC)

SGDT,

SHL,

SHLD|C, SHLDI,

SHR,

SHRD|C, SHRDI,

SIDT,

SLDT,

SMSW,

SS:,

STC,

STD,

STI,

STOS,

STR,

SUB, SUBI, SUBI|A, SUBSI,

TEST, TESTI, TESTI|A,

VERR,

VERW,

WAIT,

XCHG,

XCHG|AX,

XLAT,

XOR, XORI, XORI|A,

~SIB,

   Table 2 Suffixes, not separated by a `|'
I       : IMMEDIATE OPERAND

SI      : SIGN EXTENDED IMMEDIATE OPERAND

FAR     : FAR (SOMETIMES COMBINED WITH OI)

O       : OPERAND

OI      : OPERAND INDIRECT


File: ci86.lina.info,  Node: ABA,  Next: AC,  Prev: AB,  Up: Assembler

Reference opcodes, Pentium only.
================================

   Table three contains all the opcodes present in `asipentium.frt' in
alphabetic order, with `|' sorted before any letter.  All opcodes on
the first position are the same as Intel opcodes, barring the bar.
Note that again sometimes parts that are integrated in the opcodes in
Intel mnemonics are a separate fixup in the Postit-Fixup assembler.

   You can use it in the same way as the Intel 386 table.  But there
are much less instances where the opcodes do not agree exactly with
Intels.  Memory operands are specified in the same way for floating
point instructions.  But in     those instructions register operands
are always floating point registers.

   There is always at most one register specified in a floating point
instruction.  This explicit register may be modifiable (target) or not.
For two register operation `ST0'  is always implicit.  In that case
normally it is the first operand as per `ST0-ST1'.  If modiable, this
means the result is stored in `ST1' , the explicit register.  Reversed
operation means `ST0'

   is the second operand as per `ST1-ST0'.  If modiable, this means
(again) that the result is stored in `ST1' , the explicit register.

   And don't forget! `SHOW: <opcode>' is your friend.

   Table 3. Opcode cross reference. Pentium-only.

BSWAP,

CMPXCHG,

CMPXCHG8B,

F2XM1,

FABS,

FADD,

FADDP,

FBLD,

FBSTP,

FCHS,

FCLEX,

FCOM,

FCOMP,

FCOMPP,

FCOS,

FDECSTP,

FDIV,

FDIVP,

FFREE,

FIADD,

FICOM,

FICOMP,

FIDIV,

FILD, FILD|64,

FIMUL,

FINCSTP,

FINIT,

FIST,

FISTP, FISTP|64,

FISUB,

FLD, FLD|E,

FLD1,

FLDCW,

FLDENV,

FLDL2E,

FLDL2T,

FLDLG2,

FLDLN2,

FLDZ,

FMUL,

FMULP,

FNOP,

FPATAN,

FPREM,

FPREM1,

FPTAN,

FRNDINT,

FRSTOR,

FSAVE,

FSCALE,

FSIN,

FSINCOS,

FSQRT,

FST, FST|U,

FSTCW,

FSTENV,

FSTP, FSTP|E, FSTP|U,

FSTSW,

FSTSW|AX,

FSUB,

FSUBP,

FTST,

FUCOM,

FUCOMP,

FUCOMPP,

FXAM,

FXCH,

FXTRACT,

FYL2X,

FYL2XP1,

INVD,

INVLPG,

ILLEGAL-1,

ILLEGAL-2,

RDMSR,

RDTSC,

RSM,

WBINVD,

WRMSR,

XADD,

   Table 4 Fixups and their meanings, Pentium-only.
ST0|    : REGISTER NAME

ST1|

ST2|

ST3|

ST4|

ST5|

ST6|

ST7|

S|      : SINGLE (16 BIT)

D|      : DOUBLE (32 BIT)

M|      : REGISTER IS MODIFIABLE

U|      : REGISTER IS UNMODIFIABLE

N|      : ST0 IS FIRST OPERAND (NORMAL)

R|      : ST0 IS SECOND OPERAND (REVERSE)

|16     : INT WIDTH IN MEMORY.

|32     : INT WIDTH IN MEMORY.


File: ci86.lina.info,  Node: AC,  Next: AE,  Prev: ABA,  Up: Assembler

The dreaded SIB byte
====================

   If you ask for the operands of a memory instruction (one of the
simple one is LGDT, ) instead of all the sib ("scaled index byte" )
possibilities you see.  `LGDT, BO| ~SIB| 14 SIB,, 18, B,' This loads
the general description table from an address described by a sib-byte
of 14.

   The `~SIB| 14 SIB,,' may be replaced by any sib-specification of the
kind `[AX +2* SI]'.  You can ask for a reminder of the 256
possibilities by `SHOW: ~SIB,'

   The SIB constituents are not normal fixups.  They must always appear
between the normal fixups and the commaers, and the first must be the
base register, the one with opening bracket, such as `[AX' .

   Table 3 SIB-byte fixups.
[AX   : BASE REGISTER

[CX   : BASE REGISTER

[DX   : BASE REGISTER

[BX   : BASE REGISTER

[SP   : BASE REGISTER

[BP   : BASE REGISTER

[MEM  : BASE MEMORY

[SI   : BASE REGISTER

[DI   : REGISTER

+1*   : SCALE BY 1 BYTE.

+2*   : SCALE BY 2 BYTES.

+4*   : SCALE BY 4 BYTES.

+8*   : SCALE BY 8 BYTES.

AX]   : SCALED REGISTER

CX]   : SCALED REGISTER

DX]   : SCALED  REGISTER

BX]   : SCALED REGISTER

0]    : NO REGISTER

BP]   : SCALED REGISTER

SI]   : SCALED REGISTER

DI]   : SCALED REGISTER

   For the curious:

   Explanation of `LGDT, BO| ~SIB| 10 SIB,, 14, B,' This way of
specifying a sib-byte would be perfectly legal, had I not hidden those
words.  It shows what is going on: the instruction is completed by ~SIB|
telling the assembler that a comma-er `SIB,,'  is required.

   Instead of the comma-er we use a `~SIB,'  instruction.  This
specifies in fact a one byte opcode with three fields examplified by
`[AX +2* SI'] (and again you might say `+2* SI] [AX' with the same
meaning.)

   Many subtleties are involved to get right the error detection and the
disassembly.


File: ci86.lina.info,  Node: AE,  Next: AF,  Prev: AC,  Up: Assembler

An incomplete and irregular guide to the instruction mnemonics.
===============================================================

   The following is an attempted overview of the suffixes and fixup's
used. It may be of some help for using the assembler because it gives
some idea of some of the names.  It doesn't contain all mnemonics, you
have to consult an Intel manual anyway, just a few of them that I find
hard to remember.

   It also doesn't contain all fixup's, only those that are particularly
hard or irregular.  Neither does it contain fixups that are part of a
"SIB"  byte (treated elsewhere).

   So beware!

   Note that some of the instruction are Pentium and as yet not present
in the `asi386.frt'.

   Be careful with fixups that end in a % (such as ` [BP+IS]%' .  They
are to be used in incidental 16 bits code, so in 16 bits code segments
or for instructions preceeded by an address size overwrite prefix.

   The "primed registers"  have a prime after the register name such as
`AX'|'  , compared to `AX|' .  Some opcodes allow two registers.
Whether the primed register is a source or destination is explicitly
covered by `T|'  and `F|'  , not by any order in which the operands
appear.

   The primed conditions such as `Z'|'  have a different reason.  Those
cannot be the same as the unprimed ones, because they occur at a
different place in the opcode, though I would prefer them to be.

   Some instructions
CPUID: CPU Identification
L :   Load Full Pointer
LLDT: Load Local Descriptor Table Register
LGDT: Load General Descriptor Table Register
LIDT: Load Interrupt Descriptor Table Register
LTR:  Load Task Register
LMSW: Load Machine Status Word
RDTSC: Read from Time Stamp Counter
RDMSR: Read from Model Specific Register
SHLD: Double Precision Shift Left
SHRD: Double Precision Shift Right
SLDT: Store Local Descriptor Table Register
SMSW: Store Machine Status Word
VERR: Verify a Segment for Reading or Writing
WRMSR: Write to Model Specific Register
Suffices of the opcode, i.e. part of the opcode word.
|ALL : All
|CD : Control/Debug register
|FS : Replaces FS| in irregular opcodes.
|GS : Replaces GS| in irregular opcodes.
|AD : Implicit A and Double result.
|C  : Implicit C (count)
Items in Fixups.
Y| : Yes, Use the condition straight
N| : No, Use the condition inverted
O| : Overflow
C| : Carry
Z| : Zero
CZ| : C || Z (unsigned <= )
S| : Sign ( <0 )
P| : Parity (even)
L| :  S != O (signed < )
LE| : L || Z (signed <= )
T| : To (primed or special register)
F| : From (primed or special register)
V| : Variable number (in shifts)
1| : Just  by 1.
ZO| : Zero Offset
BO| : Byte Offset
XO| : Xell Offset
Items in Commaers.  Note that in commaers, there is never an `X'.  You
always have to choose between `W' for 16 bits and `L' for 32 bits.
OW,    Obligatory word
(RL,)  Cell relative to IP
(RW,)  Cell relative to IP
(RB,)  Byte relative to IP
SG,   Segment: word
P,    Port number : byte
IS,   Single obligatory  byte
IL,   immediate data : cell
IW,   immediate data : cell
IB,   immediate data : byte
L,    address/offset data : cell
W,    address/offset data : cell
B,    address/offset data : byte
SIB,, Scaled index byte, an instruction with in an instruction
OB, : Obligatory byte
OW, : Obligatory word (=16bits)
There are also `RB, RW, RL,'  based on `(RB,) (RW,) (RL,)' .  They
comma in an amount relative to the program counter based on an absolute
address, such that you can use labels.  These are used preferably, and
are made to appear in the disassemblies.  Otherwise no labels could
appear in disassemblies.


File: ci86.lina.info,  Node: AF,  Next: A2,  Prev: AE,  Up: Assembler

Assembler Errors
================

   Errors are identified by a number. They are globally unique, so
assembler error numbers do not overlap with other ciforth error numbers,
or errors returned from operating system calls.  Of course the error
numbers are given in decimal, always.

   The errors whose message starts with `AS:' are used by the PostIt
FixUp assembler in the file `asgen.frt'. *Note Errors::, for other
errors.

   * `ciforth ERROR # 26 : AS: PREVIOUS INSTRUCTION INCOMPLETE'

     You left holes in the instruction before the current one, i.e.
     one or more fixups like `X|'  are missing. Or you forget to supply
     data required by the opcode like `OW,'  .  With `SHOW:'  you can
     see what completions of your opcode are legal.

   * `ciforth ERROR # 27 : AS: INSTRUCTION PROHIBITED IRREGULARLY'

     The instruction you try to assemble would have been legal, if Intel
     had not made an exception just for this combination. This situation
     is handled by special code, to issue just this error.

   * `ciforth ERROR # 28 : AS: UNEXPECTED FIXUP/COMMAER'

     You try to complete an opcode by fixup's (like `X|' ) or comma-ers
     (like `OW,'  ) in a way that conflicts with what you specified
     earlier. So the fixup/comma-er word at which this error is
     detected conflicts with either the opcode, or one of the other
     fixups/comma-ers.  For example `B|'  (byte size) with a `LEA,'
     opcode or with a `DI|'  operand.

   *  `ciforth ERROR # 29 : AS: DUPLICATE FIXUP/UNEXPECTED COMMAER'

     You try to complete an opcode by fixup's (like `X|'   ) or
     comma-ers (like `OW,'  ) in a way that conflicts with what you
     specified earlier. So the fixup/comma-er word at which this error
     is detected conflicts with either the opcode, or one of other
     fixups/comma-ers.  For example `B|'  (byte size) with a `LEA,'
     opcode or with a DI| operand.

   * `ciforth ERROR # 30 : AS: COMMAERS IN WRONG ORDER'

     The opcode requires more than one data item to be comma-ed in,
     such as immediate data and an address. However you put them in the
     wrong order.  Use `SHOW:'  .

   *  `ciforth ERROR # 31 : AS: DESIGN ERROR, INCOMPATIBLE MASK'

     This signals an internal inconsistency in the assembler itself.
     If you are using an assembler supplied with ciforth, you can report
     this as a defect ("bug").  The remainder of this explanation is
     intended for the writers of assemblers.  The bits that are filled
     in by an assembler word are outside of the area were it is
     supposed to fill bits in. The latter are specified separately by a
     mask.

   *  `ciforth ERROR # 32 : AS: PREVIOUS OPCODE PLUS FIXUPS
     INCONSISTENT'

     The total instruction with opcode, fixups and data is "bad".
     Somewhere there are parts that are conflicting. This may be another
     one of the irregularities of the Intel instruction set. Or the
     `BAD'  data was preset with bits to indicate that you want to
     prohibit this instruction on this processor, because it is not
     implemented. Investigate `BAD'  for two consecutive bits that are
     up, and inspect the meaning of each of the two bits.


File: ci86.lina.info,  Node: Errors,  Next: Documentation,  Prev: Assembler,  Up: Top

Errors
******

   Errors are uniquely identified by a number.  The error code is the
same as the `THROW'  code. In other words the Forth exception system is
used for errors.  A ciforth always displays the text "ciforth ERROR #"
plus the error number, immediately and directly.  Of course the error
numbers are given in decimal. irrespective of `BASE' .  This allows you
to look the error up in the section "Error explanations".  More
specific problems are addressed in the section "Common Problems".

Error philosophy
================

   If you know the error number issued by ciforth, the situation you
are in is identified, and you can read an explanation in the next
section.  Preferably in addition to the number a "mnemonic message"  is
displayed.   It is fetched from the "library file" .  But this is not
always possible, such is the nature of error situations.  A mnemonic
message has a size limited to 63 characters and is therefore seldomly a
sufficient explanation.

   A good error system gives additional specific information about the
error.  In a plain ciforth this is limited to the input line that
generated the error.  Via the library file you may install a more
sophisticated error reporting, if available.

   Within ciforth itself all error situation have their unique
identification.  You may issue errors yourself at your discretion using
`THROW'  or, preferably, `?ERROR'  and use an error number with an
applicable message.  However, unless yours is a quick and dirty
program, you are encouraged to use some other unique error number.

Common problems
===============

Error 11 or 12 caused by lower case.
------------------------------------

   If you type a standard word like `words'  in lower case, it will not
be recognised, resulting in error 11.  Similarly `' words'  results in
error 12.  This is because lina is "case sensitive" , i.e.  the
difference between lower and upper case is significant  and only words
that match in this respect too are found in the dictionary.

   After `1 LOAD' or if started up using `lina -r' you have `REQUIRED'
available.  You may now issue `  "CASE-INSENSITIVE" REQUIRED ' and
switch the system into case-insensitivity and back by issuing the words
`CASE-INSENSITIVE'  and `CASE-SENSITIVE' .

   Case insensitivity applies to the words looked up in the dictionary,
not to hex digits.

Error 8 or only error numbers
-----------------------------

   If you get an error 8 as soon as you try to `LOAD'  or `LIST'  a
screen or use an option, or if errors show up only as numbers without
the mnemonic message, this is because you cannot access the library
file.  It may not be there, or it may not be at the expected place.
ciforth contains a string `BLOCK-FILE'  , that contains the name of the
library file interpreter, with as a default `forth.lab'.  If this is
not correct you may change it as appropriate by e.g.

   `S" /usrlib/ciforth/forth.lab" BLOCK-FILE $! ' The library is
accessible for read and write access and mnemonic message will be
fetched from it, after you install it with `2 BLOCK-INIT    1 WARNING
!'.

Error 8 while editing a screen
------------------------------

   If after editing a screen, you get error 8, the screen has not been
written to disk, because you have no write access for the library file.
You must issue `DEVELOP'  which reopens the library file in READ_WRITE
mode. Normally this should be part of loading the `EDITOR'  .   It may
be of course that you don't have privilege to write to the file. As
non-privileged user you cannot edit the the system-wide library file.

   You may always edit and use a private copy of the library file, by
the `-l' option.  *Note Manual::, for how opttions work. The `-l'
option itself works only if at least the official library file has been
correctly installed.

Error explanations
==================

   This section shows the explanation of the errors in ascending order.
In actual situations sometimes you may not see the part after the semi
colon.  If in this section an explanation is missing, this means that
the error is given for reference only; the error cannot be generated by
your lina, but maybe by other version of ciforth or even a differently
configured lina.  For example for a version without security you will
never see error 1. If it says "not used", this means it is not used by
any ciforth.

   The errors whose message starts with `AS:' are used by the PostIt
FixUp assembler in the file `asgen.frt',(*note Assembler::).

   Negative error numbers are those reported by  Linux. If possible,
mnemonic error messages are shown. But no explanation of the error is
available.

   .

   Here are the error explanations.
   * `ciforth ERROR # 1 : EMPTY STACK'

     The stack has underflowed. This is detected by `?STACK'  at
     several places, in particular in `INTERPRET'  after each word
     interpreted or compiled.  There is ample slack, but malicious
     intent can crash the system before this is detected.

   *  `ciforth ERROR # 2 : DICTIONARY FULL'

     Not used.

   * `ciforth ERROR # 3 : FIRST ARGUMENT MUST BE OPTION'

     If you pass arguments to ciforth, your first argument must be an
     option (such as -a), otherwise it doesn't know what to do with it.

   *  `ciforth ERROR # 4 : ISN'T UNIQUE'

     Not being unique is not so much an error as a warning. The word
     printed is the latest defined. A word with the same name exists
     already in the current search order.

   *  `ciforth ERROR # 5 : EMPTY NAME FOR NEW DEFINITION'

     An attempt is made to define a new word with an empty string for a
     name. This is detected by `(CREATE)'  .  All "defining word"  can
     return this message. It is typically caused by using such a word
     at the end of a line.

   * `ciforth ERROR # 6 : DISK RANGE ?'

     Reading to the terminal input buffer failed. The message is
     probably inappropiate.

   * `ciforth ERROR # 7 : FULL STACK'

     The stack has run into the dictionary. This can be caused by
     pushing too many items, but usually it must be interpreted as
     dictionary full. If you have enough room, you have passed a wrong
     value to `ALLOT'  . This is detected at several places, in
     particular in `INTERPRET'  after each word interpreted.

   *  `ciforth ERROR # 8 : DISC ERROR !'

     An access to the Library Accessible by Block (screen aka block
     file) has failed. This is detected by `?DISK-ERROR'  called from
     places where a disk access has occurred. It may be that the
     library file has not been properly installed. Check the content of
     `BLOCK-FILE'  . You may not have the right to access it. Try to
     view the file. Normally the library file is opened read-only. If
     you want to edit it make sure to do `DEVELOP'  in order to reopen
     it in read/write mode.  If you forget, you get this message too.

   *  `ciforth ERROR # 9 : UNRESOLVED FORWARD REFERENCE'

     Not used.

   *  `ciforth ERROR # 10 : NOT A WORD, NOR A NUMBER OR OTHER
     DENOTATION'

     The string printed was not found in the dictionary as such, but
     its first part matches a "denotation"  .  The denotation word
     however rejected it as not properly formed.  An example of this is
     a number containing some non-digit character, or the character
     denotation `&'  followed by more than one character. It may also
     be a miss-spelled word that looks like a number, e.g. `25WAP' .
     Be aware that denotations may mask regular words.  This will only
     happen with user-defined denotations.  Built-in denotations are in
     the `ONLY'  vocabulary, that can only be accessed last, because it
     ends the search order.  Note that hex digits must be typed in
     uppercase, even if `"CASE-SENSITIVE"'  is in effect.  Error 10 may
     be caused by using lower case where upper case is expected, suach
     as for ISO standard words.  See the section "Common problems" in
     this chapter if you want to make ciforth case insensitive.

   *  `ciforth ERROR # 11 : WORD IS NOT FOUND'

     The string printed was not found in the dictionary.  This error is
     detected by `''  (tick).  This may be caused by using lower case
     where upper case is required for ISO standard words.  See the
     section "Common problems" in this chapter if you want to make
     ciforth case insensitive.

   *  `ciforth ERROR # 12 : NOT RECOGNIZED'

     The string printed was not found in the dictionary, nor does it
     match a number, or some other denotation.  This may be caused by
     using lower case where upper case is required for ISO standard
     words or for hex digits.  See the section "Common problems" in
     this chapter if you want to make ciforth case insensitive.

   *  `ciforth ERROR # 13 : ERROR, NO FURTHER INFORMATION'

     This error is used temporily, whenever there is need for an error
     message but there is not yet one assigned.

   *  `ciforth ERROR # 14 : SAVE/RESTORE MUST RUN FROM FLOPPY'

   *  `ciforth ERROR # 15 : CANNOT FIND WORD TO BE POSTPONED'

     The word following POSTPONE must be postponed, but it can't be
     found in the search order.

   *  `ciforth ERROR # 16 : CANNOT FIND WORD TO BE COMPILED'

     The word following [COMPILE] must be postponed, but it can't be
     found in the search order.

   * `ciforth ERROR # 17 : COMPILATION ONLY, USE IN DEFINITION'

     This error is reported by `?COMP' . You try to use a word that
     doesn't work properly in interpret mode. This mostly refers to
     control words like `IF'  and `DO'  .  If you want control words to
     work in interpret mode, require `NEW-IF'  .

   * `ciforth ERROR # 18 : EXECUTION ONLY'

     This error is reported by `?EXEC.' . You try to use a word that
     doesn't work properly in compile mode. You will not see this
     error, because all words in ciforth do.

   *  `ciforth ERROR # 19 : CONDITIONALS NOT PAIRED'

     This error is reported by `?PAIRS' . You try to improperly use
     control words that pair up (like `IF'  and `THEN'  , or `DO'  and
     `LOOP'  )

   * `ciforth ERROR # 20 : STACK UNBALANCE, STRUCTURE UNFINISHED?'

     This error is reported by `?CSP' .  It detects   stack unbalance
     between `:'  and `;' , or wherever you choose to use the words
     `!CSP'  and `?CSP' .  This means there is an error in the compiled
     code.  This message is given also if during compilation you try to
     use data that is put on the stack before `:'  .  Instead of

     `<generatedata> : name LITERAL .... ;'

     use

     `<generatedata> : name [ _ SWAP ] LITERAL .... ; DROP'

     to keep the stack at the same depth.

   * `ciforth ERROR # 21 : IN PROTECTED DICTIONARY'

     The word you are trying to `FORGET'  is below the `FENCE'  , such
     that forgetting is not allowed.

   * `ciforth ERROR # 22 : USE ONLY WHEN LOADING'

     This error is reported by `?LOAD' . You try to use a word that
     only works while loading from the `BLOCK-FILE'  , in casu `-->'  .

   * `ciforth ERROR # 23 : OFF CURRENT EDITING SCREEN'

   * `ciforth ERROR # 24 : (WARNING) NOT PRESENT, THOUGH REQUIRED' This
     error is reported by `REQUIRED' .  The word you required, has been
     looked up in the index lines.  It was not found in the index lines,
     or it was a dummy item, that only marks the screen to be loaded,
     e.g. `ASSEMBLER-GENERIC'.  In the latter case it can be safely
     ignored.   This must be a warning only, because compilation can
     still succeed if the word is supplied by other means, in
     particular conditional compilation.

     `ciforth ERROR # 25 : LIST EXPECTS DECIMAL'

     This message is used by a redefined `LIST'  , to prevent getting
     the wrong screen.


   *Note ASSEMBLER::,, for errors generated by the assembler.  These
have numbers that are all higher than the general errors.


File: ci86.lina.info,  Node: Documentation,  Next: Glossary,  Prev: Errors,  Up: Top

Documentation summary
*********************

   This is copied from the FIG documentation 1978.  It is probably out
of date now.

   The following manuals are in print:

   Caltech FORTH Manual, an advanced manual with internal details of
Forth. Has Some implementation peculiarities. Approx. $6.50 from the
Caltech Book Store, Pasadena, CA.

   Kitt Peak Forth Primer, $20.00 postpaid from the Forth Interest
Group, P. O.  Box 1105, San Carlos, CA 94070.

   microFORTH Primer, $15.00 Forth, Inc.  815 Manhattan Ave. Manhattan
Beach, CA 90266

   Forth Dimensions, newsletter of the Forth Interest Group, $5.00 for
6 issues including membership. F-I-G. P.O. Box 1105, San Carlos, CA.
94070


File: ci86.lina.info,  Node: Glossary,  Next: Top,  Prev: Documentation,  Up: Top

Glossary
********

   Wherever it says single precision number or "cell"  32 bits is meant.
Wherever it says  "double"  or "double precision number" a 64 bits
number is meant.

   The first line of each entry shows a symbolic description of the
action of the proceedure on the parameter stack. The symbols indicate
the order in which input parameters have been placed on the stack. The
dashes "--" indicate the execution point; any parameters left on the
stack are listed.  In this notation, the top of the stack is to the
right.  Any symbol may be followed by a number to indicate different
data items passed to or from a Forth word.

   The symbols include:

`addr'
     memory address

`b'
     8 bit byte (the remaining bits are zero)

`c'
     7 bit ascii character (the remaining bits are zero)

`d'
     64 bit signed double integer: most significant portion with sign
     on top of stack

`dea'
     An "dictionary entry address"  , the basic address of a Forth word
     from which all its fields can be found.

`f'
     logical "flag" : zero is interpreted as false, non-zero as true

`faraddr'
     a <selector:address> pair

`ff'
     "Forth flag" , a well-formed logical flag, 0=false, -1=true.

`false'
     a false "Forth flag" : 0

`n'
     32 bit signed integer number; it is also used for a 32-bit entity
     where it is irrelevant what number it represents

`sc'
     a "string constant" , i.e. two cells, an address and a length;
     length characters are present at the address (they must not be
     changed)

`true'
     a true "Forth flag" : -1.

`u'
     32-bit unsigned integer

`ud'
     64-bit unsigned double integer: most significant portion on top of
     stack

   The capital letters on the right show definition characteristics:

`B'
     The word is available only after loading from background storage

`C'
     May only be used within a colon definition. A digit indicates
     number of memory addresses used, if other than one.

`E'
     Intended for execution only.

`FIG'
     Belongs to the FIG model

`I'
     Has immediate bit set. Will execute even when compiling.

`ISO'
     Belongs to ISO standard

`L0'
     Level Zero definition of FORTH-78

`L1'
     Level One definition of FORTH-78

`NFIG'
     Word belongs to FIG standard, but the implementation is not quite
     conforming.

`NISO'
     Word belongs to ISO standard, but the implementation is not quite
     conforming.

`U'
     A user variable.

   Where there is mention of a standard or a model, it means that the
word actually complies to the standard or the model, not that some word
of that name is present.  Words marked with `ISO,FIG,L0' will behave
identically over all but the whole spectra of Forth's.

   Unless otherwise noted, all references to numbers are for 32-bit
signed integers. For 64-bit signed numbers, the most significant part
(with the sign) is on top.

   All arithmetic is implicitly 32-bit signed integer math, with error
and under-flow indication unspecified.

   A "nil pointer"  is an address containing zero. This indicates an
invalid address.

   The Forth words are divided into "wordset" s, that contain words
that logically belong together. Each wordset has a separate section
with a description.  The following rules take precedence over any
wordset a word may logically belong to.
   * A defining word -- one that adds to the dictionary -- is present
     in the wordset `DEFINING'.

   * A denotation word - one that has the prefix bit set - is present
     in the wordset `DENOTATIONS'.

   * An environmental query word -- one that is understood by
     `?ENVIRONMENT'  -- is present in the wordset `ENVIRONMENTS'.

* Menu:

* BLOCKS ::
* COMPILING ::
* CONTROL ::
* DEFINING ::
* DENOTATIONS ::
* DICTIONARY ::
* DOUBLE ::
* ENVIRONMENTS ::
* ERRORS ::
* FILES ::
* FORMATTING ::
* INIT ::
* INPUT ::
* JUGGLING ::
* LOGIC ::
* MEMORY ::
* MISC ::
* MULTIPLYING ::
* OPERATINGSYSTEM ::
* OPERATOR ::
* OUTPUT ::
* PARSING ::
* SCREEN ::
* SECURITY ::
* STACKS ::
* STRING ::
* SUPERFLUOUS ::
* WORDLISTS ::


File: ci86.lina.info,  Node: BLOCKS,  Next: COMPILING,  Up: Glossary

BLOCKS
======

   The block mechanism connects to the Forth system a single background
storage divided in numbered "blocks" .  The wordset `BLOCKS' contains
words to input and output to this mass storage. In this ciforth blocks
reside   in a file, by default named `forth.lab'. . Most blocks are
used for the `SCREEN' facility, where each block contains source code.

* Menu:



* #BUFF  ::
* ?DISK-ERROR  ::
* B/BUF  ::
* BLOCK-EXIT  ::
* BLOCK-FILE  ::
* BLOCK-HANDLE  ::
* BLOCK-INIT  ::
* BLOCK  ::
* DISK-ERROR  ::
* EMPTY-BUFFERS  ::
* R\W  ::
* UPDATE  ::
* (BUFFER)  :paren_buffer
* +BUF  ::
* FIRST  ::
* FLUSH  ::
* LIMIT  ::
* OFFSET  ::
* PREV  ::
* RESTORE-INPUT  ::
* RESTORE  ::
* SAVE-INPUT  ::
* SAVE  ::
* SEEK  ::
* STALEST  ::


File: ci86.lina.info,  Node: #BUFF,  Next: ?DISK-ERROR,  Prev: BLOCKS,  Up: BLOCKS

#BUFF
-----

Name: `#BUFF'

Stackeffect: -- n

Attributes:

Description: A constant that leaves the number of block buffers.
Because a buffer that is being interpreted is locked in memory, this is
also a limit to the nesting depth of blocks loading other blocks.

See also: `BLOCK'  `THRU'  `LOAD'  `LOCK'


File: ci86.lina.info,  Node: ?DISK-ERROR,  Next: B/BUF,  Prev: #BUFF,  Up: BLOCKS

?DISK-ERROR
-----------

Name: `?DISK-ERROR'

Stackeffect: n--

Attributes:

Description: Interpret `n' as the status of a disk i/o call and "signal
an error"  if it contains an error condition.

See also: `BLOCK-FILE'  `BLOCK-HANDLE'  `BLOCK-INIT'  `BLOCK-EXIT'


File: ci86.lina.info,  Node: B/BUF,  Next: BLOCK-EXIT,  Prev: ?DISK-ERROR,  Up: BLOCKS

B/BUF
-----

Name: `B/BUF'

Stackeffect: -- n

Attributes:

Description: This constant leaves the number of bytes per disc buffer,
the byte count read from disc by `BLOCK'  .  The ISO standard fixes
this to 1024.

See also: `(BUFFER)'


File: ci86.lina.info,  Node: BLOCK-EXIT,  Next: BLOCK-FILE,  Prev: B/BUF,  Up: BLOCKS

BLOCK-EXIT
----------

Name: `BLOCK-EXIT'

Stackeffect: --

Attributes:

Description: A block file must have been opened by `BLOCK-INIT'  .
Close the currently open block file `BLOCK-HANDLE' , i.e. the mass
storage words no longer work, and will result in error messages.  If
error messages were fetched from disk, they no longer are.

See also: `BLOCK'  `LIST'  `LOAD'  `DISK-ERROR'  `WARNING'


File: ci86.lina.info,  Node: BLOCK-FILE,  Next: BLOCK-HANDLE,  Prev: BLOCK-EXIT,  Up: BLOCKS

BLOCK-FILE
----------

Name: `BLOCK-FILE'

Stackeffect: --addr

Attributes:

Description: Leave the address `addr' of a counted string, the name of
a "library file"

   in which "blocks"  are (to be) allocated.  The name may contain a
path and be at most 252 characters long.  The default name is
`forth.lab' .  This name may be changed and is used by the  `BLOCK-INIT'
command.

See also: `BLOCK-HANDLE'  `BLOCK-INIT'  `BLOCK-EXIT'


File: ci86.lina.info,  Node: BLOCK-HANDLE,  Next: BLOCK-INIT,  Prev: BLOCK-FILE,  Up: BLOCKS

BLOCK-HANDLE
------------

Name: `BLOCK-HANDLE'

Stackeffect: --n

Attributes:

Description: Leave a file handle in `n' .  If it is negative there is
no block file open, otherwise the handle is used by the system to
access blocks.

See also: `BLOCK-FILE'  `BLOCK-INIT'  `BLOCK-EXIT'


File: ci86.lina.info,  Node: BLOCK-INIT,  Next: BLOCK,  Prev: BLOCK-HANDLE,  Up: BLOCKS

BLOCK-INIT
----------

Name: `BLOCK-INIT'

Stackeffect: n --

Attributes:

Description: Map the blocks on the block file `BLOCK-FILE' , i.e. the
mass storage words refer to the blocks in this file. The handle
`BLOCK-HANDLE' can be used to access it, with access code `n' (2 for
read and write).  This command fails silently.  You must activate
mnemonic error messages explicitly by setting `WARNING' .

See also: `BLOCK'  `LIST'  `LOAD'  `BLOCK-EXIT'  `OPEN-FILE'


File: ci86.lina.info,  Node: BLOCK,  Next: DISK-ERROR,  Prev: BLOCK-INIT,  Up: BLOCKS

BLOCK
-----

Name: `BLOCK'

Stackeffect: n -- addr

Attributes: ISO FIG L0

Description: Leave `addr', the disc buffer containing block `n', which
is the physical disk block `OFFSET+n'. The address left is the field
within the buffer to be used for data storage. If the block is not
already in memory, it is transferred from disc to a new buffer allocated
by `(BUFFER)'  .  Blocks are generally used to contain source code to
be interpreted by `LOAD' . They can be equally useful to contain other
data, e.g. for implementing a database.

See also: `(BUFFER)'  `R\W'  `OFFSET'  `UPDATE'  `FLUSH'  `LOAD'


File: ci86.lina.info,  Node: DISK-ERROR,  Next: EMPTY-BUFFERS,  Prev: BLOCK,  Up: BLOCKS

DISK-ERROR
----------

Name: `DISK-ERROR'

Stackeffect: -- addr

Attributes:

Description: using or closing the block file.  One means an error and
and zero means okay.  Beware that if error messages are loaded from
disk, this may clear `DISK-ERROR'

   This flag is not used.

See also: `BLOCK'


File: ci86.lina.info,  Node: EMPTY-BUFFERS,  Next: R\W,  Prev: DISK-ERROR,  Up: BLOCKS

EMPTY-BUFFERS
-------------

Name: `EMPTY-BUFFERS'

No stackeffect

Attributes: ISO FIG L0

Description: Mark all block-buffers as empty. Updated blocks are not
written to the disc. This is an initialization proceedure before first
use of the disc. The usage as an "undo" is infeasible in ciforth.

See also: `FLUSH'  `BLOCK'  `SCREEN'  `UPDATE'


File: ci86.lina.info,  Node: R\W,  Next: UPDATE,  Prev: EMPTY-BUFFERS,  Up: BLOCKS

R\W
---

Name: `R\W'

Stackeffect: addr blk n --

Attributes:

Description: The ciforth primitive for read-write of blocks. `addr'
specifies the source or destination block buffer, `blk' is the
sequential number of the referenced physical block; and `n' is a
control variable for `n'=0 write and `n'=l read. `R\W'  determines the
location on mass storage, performs the read or write and throws an
exception on errors.

See also: `BLOCK'  `DISK-ERROR'


File: ci86.lina.info,  Node: UPDATE,  Next: paren_buffer,  Prev: R\W,  Up: BLOCKS

UPDATE
------

Name: `UPDATE'

No stackeffect

Attributes: ISO,FIG,L0

Description: Marks the most recently referenced block (pointed to by
`PREV'  ) as altered. The block will subsequently be transferred
automatically to disc should its buffer be required for storage of a
different block. In fact the block is transferred to disk immediately.

See also: `BLOCK'  `SCREEN'


File: ci86.lina.info,  Node: paren_buffer,  Next: +BUF,  Prev: UPDATE,  Up: BLOCKS

(BUFFER)
--------

Name: `(BUFFER)'

Stackeffect: n -- addr

Attributes:

Description: Return the addres `addr' of a buffer assigned to block `n'
.  The buffer layout is as follows: a cell with the block number, a
cell with the status, and the content. The status is negative for
locked, zero for free and one for present and unlocked.  The block is
not read from the disc. The buffer is either one that was already
assigned, or else a free buffer.  If there is none free, the stalest
buffer is freed. The contents of that buffer is written to the disc, if
it was marked as updated. In ciforth this is never needed, because
updated blocks are written immediately. In ciforth blocks can be
locked, and locked buffers are never freed by `(BUFFER)'  .  An update
flag would somehow be multiplexed with the lock count, but it is not
needed in ciforth. If all buffers were locked, `(BUFFER)'  freezes the
system.

See also: `BLOCK'  `STALEST'  `PREV'  `#BUFF'  `LOCK'  `UNLOCK'


File: ci86.lina.info,  Node: +BUF,  Next: FIRST,  Prev: paren_buffer,  Up: BLOCKS

+BUF
----

Name: `+BUF'

Stackeffect: addr1 -- addr2 ff

Attributes: FIG

Description: Advance the disc buffer address `addr1' to the address of
the next buffer `addr2' . Boolean `ff' is false when `addr2' is the
buffer presently pointed to by variable `PREV' .

See also: `BLOCK'


File: ci86.lina.info,  Node: FIRST,  Next: FLUSH,  Prev: +BUF,  Up: BLOCKS

FIRST
-----

Name: `FIRST'

Stackeffect: -- n

Attributes:

Description: A constant that leaves the address of the first (lowest)
block buffer.

See also: `BLOCK'  `LIMIT'


File: ci86.lina.info,  Node: FLUSH,  Next: LIMIT,  Prev: FIRST,  Up: BLOCKS

FLUSH
-----

Name: `FLUSH'

No stackeffect

Attributes: ISO FIG L0

Description: Make sure that the content of all `UPDATE'  d block buffers
has been transferred to disk.  They are no longer associated with a
block and their content is no longer available.

See also: `EMPTY-BUFFERS'  `BLOCK'  `SCREEN'


File: ci86.lina.info,  Node: LIMIT,  Next: OFFSET,  Prev: FLUSH,  Up: BLOCKS

LIMIT
-----

Name: `LIMIT'

Stackeffect: --- n

Attributes:

Description: A constant leaving the address just above the highest
memory available for a disc buffer.  Actually this is the highest
system memory.

See also: `BLOCK'  `FIRST'


File: ci86.lina.info,  Node: OFFSET,  Next: PREV,  Prev: LIMIT,  Up: BLOCKS

OFFSET
------

Name: `OFFSET'

Stackeffect: -- addr

Attributes: U

Description: A user variable which contains a block offset to disc
drives; in this way a part of it is available for boot-code.

   As blocks are allocated in a file on the host operating system it is
0.  The contents of `OFFSET'  is added to the stack number by `BLOCK'
before calling `R\W'.

See also: `BLOCK'  `MESSAGE '


File: ci86.lina.info,  Node: PREV,  Next: RESTORE-INPUT,  Prev: OFFSET,  Up: BLOCKS

PREV
----

Name: `PREV'

Stackeffect: --- addr

Attributes:

Description: A variable containing the address of the disc buffer (not
its content field!) most recently referenced. The `UPDATE'  command
marks this buffer to be written to disc.

See also: `(BUFFER)'


File: ci86.lina.info,  Node: RESTORE-INPUT,  Next: RESTORE,  Prev: PREV,  Up: BLOCKS

RESTORE-INPUT
-------------

Name: `RESTORE-INPUT'

Stackeffect:  n1 n2 n3 3--f

Attributes: ISO

Description: Restore the input source stream from what was saved by
SAVE-INPUT .  ciforth is always able to restore the input across
different input sources, as long as the input to be restored was not
exhausted. This has the effect of chaining, and doesn't affect the
return from nested calls be it interpreting, loading or evaluating.
ciforth always returns a true into `f'.  The input source abandoned will
never be closed properly, so use should be restricted to the same input
source.

See also: `RESTORE'  `SAVE-INPUT'


File: ci86.lina.info,  Node: RESTORE,  Next: SAVE-INPUT,  Prev: RESTORE-INPUT,  Up: BLOCKS

RESTORE
-------

Name: `RESTORE'

Stackeffect:  --

Attributes:

Description: This must follow a `SAVE'  in the same definition.
Restore the content of `SRC'  from the return stack thus restoring the
"current input source"  to what it was when the `SAVE'  was executed.

See also: `RESTORE-INPUT'  `SAVE-INPUT'


File: ci86.lina.info,  Node: SAVE-INPUT,  Next: SAVE,  Prev: RESTORE,  Up: BLOCKS

SAVE-INPUT
----------

Name: `SAVE-INPUT'

Stackeffect:  -- n1 n2 n3 3

Attributes: ISO

Description: Get a complete specification of the input source stream.
For ciforth this is the content of `SRC' . ciforth needs 3 cells, and
is always able to `RESTORE'  an input saved like this. In practice the
use of `SAVE-INPUT'  should be restricted to restoring input of the
same stream.

See also: `RESTORE'  `RESTORE-INPUT'


File: ci86.lina.info,  Node: SAVE,  Next: SEEK,  Prev: SAVE-INPUT,  Up: BLOCKS

SAVE
----

Name: `SAVE'

Stackeffect:  --

Attributes:

Description: Save the content of `SRC'  on the return stack prior to
changing the "current input source" .  This must be balanced by a
RESTORE in the same definition.

See also: `RESTORE'  `SAVE-INPUT'


File: ci86.lina.info,  Node: SEEK,  Next: STALEST,  Prev: SAVE,  Up: BLOCKS

SEEK
----

Name: `SEEK'

Stackeffect: n--

Attributes:

Description: A block file must have been opened by `BLOCK-INIT'  .
Position the file pointer at block `n' in behalf of subsequent reads
and writes.

See also: `BLOCK'  `LIST'  `LOAD'


File: ci86.lina.info,  Node: STALEST,  Prev: SEEK,  Up: BLOCKS

STALEST
-------

Name: `STALEST'

Stackeffect: -- addr

Attributes:

Description: A variable containing the address of the oldest block
buffer, the first candidate to be claimed if a new one is needed.

See also: `BLOCK'


File: ci86.lina.info,  Node: COMPILING,  Next: CONTROL,  Prev: BLOCKS,  Up: Glossary

COMPILING
=========

   The wordset `COMPILING' contains words that compile *Note
IMMEDIATE::, words and numbers.  You need special precautions because
these words would execute during compilation. Numbers are compiled "in
line"  , behind a word that fetches them.

* Menu:



* DLITERAL  ::
* LITERAL  ::
* POSTPONE  ::
* [COMPILE]  :bracket_compile
* LIT  ::
* SDLITERAL  ::


File: ci86.lina.info,  Node: DLITERAL,  Next: LITERAL,  Prev: COMPILING,  Up: COMPILING

DLITERAL
--------

Name: `DLITERAL'

Stackeffect: d -- d (executing) d -- (compiling)

Attributes: I

Description: If compiling, compile a stack double number into a literal.
Later execution of the definition containing the literal will push it
to the stack. If executing in ciforth, the number will just remain on
the stack.

See also: `LITERAL'  `LIT'


File: ci86.lina.info,  Node: LITERAL,  Next: POSTPONE,  Prev: DLITERAL,  Up: COMPILING

LITERAL
-------

Name: `LITERAL'

Stackeffect: n -- n (executing) n -- (compiling)

Attributes: ISO,I,C2,L0

Description: If compiling, then compile the stack value `n' as a 32 bit
literal.  The intended use is:      `: xxx    [ calculate ]  LITERAL  ;'
Compilation is suspended for the compile time calculation of a value.
Compilation is resumed and `LITERAL'  compiles this value. Later
execution of the definition containing the literal will push it to the
stack. If executing in ciforth, the number will just remain on the
stack.

See also: `LIT'  `LITERAL'


File: ci86.lina.info,  Node: POSTPONE,  Next: bracket_compile,  Prev: LITERAL,  Up: COMPILING

POSTPONE
--------

Name: `POSTPONE'

No stackeffect

Attributes: ISO,I,C

Description: Used in a colon-definition in the form:
     : xxx POSTPONE SOME-WORD
   `POSTPONE'  will postpone the compilation behaviour of `SOME-WORD'
to the definition being compiled. If `SOME-WORD' is an immediate word
this is similar to `[COMPILE] SOME-WORD'.

See also: `[COMPILE]'


File: ci86.lina.info,  Node: bracket_compile,  Next: LIT,  Prev: POSTPONE,  Up: COMPILING

[COMPILE]
---------

Name: `[COMPILE]'

No stackeffect

Attributes: ISO,I,C

Description: Used in a colon-definition in form:
     :  xxx    [COMPILE]   FORTH   ;
   `[COMPILE]'  will force the compilation of an immediate definitions,
that would otherwise execute during compilation. The above example will
select the `FORTH'  vocabulary when `xxx' executes, rather than at
compile time.

See also: `POSTPONE'


File: ci86.lina.info,  Node: LIT,  Next: SDLITERAL,  Prev: bracket_compile,  Up: COMPILING

LIT
---

Name: `LIT'

Stackeffect: -- n

Attributes: FIG,C2,L0

Description: Within a colon-definition, `LIT'  is compiled followed by a
32 bit literal number given during compilation.  Later execution of
`LIT'  causes the contents of this next dictionary cell to be pushed to
the stack.

See also: `LITERAL'


File: ci86.lina.info,  Node: SDLITERAL,  Prev: LIT,  Up: COMPILING

SDLITERAL
---------

Name: `SDLITERAL'

Stackeffect: d -- s/d (executing) d -- (compiling)

Attributes: I

Description: If compiling, compile a stack double number into a literal
or double literal, depending on whether `DPL'  contains a "nil pointer"
or points into the input. Later execution of the definition containing
the literal will push it to the stack. If executing, the number will
remain on the stack.

See also: `SLITERAL'  `DLITERAL'


File: ci86.lina.info,  Node: CONTROL,  Next: DEFINING,  Prev: COMPILING,  Up: Glossary

CONTROL
=======

   The wordset `CONTROL' contains words that influence the control flow
of a program, i.e. the sequence in which commands are executed in
compiled words.  With control words you can have actions performed
repeatedly, or depending on conditions.

* Menu:



* +LOOP  ::
* ?DO  ::
* AGAIN  ::
* BEGIN  ::
* CO  ::
* DO  ::
* ELSE  ::
* EXIT  ::
* IF  ::
* I  ::
* J  ::
* LEAVE  ::
* LOOP  ::
* RECURSE  ::
* REPEAT  ::
* SKIP  ::
* THEN  ::
* UNLOOP  ::
* UNTIL  ::
* WHILE  ::
* (+LOOP)  :paren_plus_loop
* (;)  :paren_semicolon
* (?DO)  :paren_question_do
* (BACK  :paren_back
* (DO)  :paren_do
* (FORWARD  :paren_forward
* (LOOP)  :paren_loop
* 0BRANCH  ::
* BACK)  :back_paren
* BRANCH  ::
* FORWARD)  :forward_paren


File: ci86.lina.info,  Node: +LOOP,  Next: ?DO,  Prev: CONTROL,  Up: CONTROL

+LOOP
-----

Name: `+LOOP'

Stackeffect: n1 -- (run)  addr n2 -- (compile)

Attributes: ISO,I,C2,L0

Description: Used in a colon-definition in the form:
     DO ... n1 +LOOP
   At run-time, `+LOOP'  selectively controls branching back to the
corresponding `DO'  based on `n1' , the loop index and the loop limit.
The signed increment `n1' is added to the index and the total compared
to the limit.  The branch back to `DO'  occurs until the new index is
equal to or greater than the limit (`n1>0'), or until the new index is
equal to or less than the limit (`n1<0'). Upon exiting the loop, the
parameters are discarded and execution continues ahead.

   At compile time, `+LOOP'  compiles the run-time word `(+LOOP)'  and
the branch offset computed from `HERE'  to the address left on the
stack by `DO'  .   `n2' is used for compile time error checking.


File: ci86.lina.info,  Node: ?DO,  Next: AGAIN,  Prev: +LOOP,  Up: CONTROL

?DO
---

Name: `?DO'

Stackeffect: n1 n2 -- (execute) addr n -- (compile)

Attributes: ISO,I,C2,L0

Description: Occurs in a colon-definition in form:
     ?DO ... LOOP
   It behaves like DO , with the exception that if n1 and n2 are equal
the loop body is not executed.

See also: `DO'  `I'  `LOOP'  `+LOOP'  `LEAVE'


File: ci86.lina.info,  Node: AGAIN,  Next: BEGIN,  Prev: ?DO,  Up: CONTROL

AGAIN
-----

Name: `AGAIN'

Stackeffect: addr n -- (compiling)

Attributes: ISO,FIG,I,C2,L0

Description: Used in a colon-definition in the form:
     BEGIN ... AGAIN
   At run-time, `AGAIN'  forces execution to return to the corresponding
`BEGIN'  . There is no effect on the stack. Execution cannot leave this
loop except for `EXIT' . At compile time, `AGAIN'  compiles `BRANCH'
with an offset from `HERE'  to addr. `n' is used for compile-time error
checking.

See also: `BEGIN'


File: ci86.lina.info,  Node: BEGIN,  Next: CO,  Prev: AGAIN,  Up: CONTROL

BEGIN
-----

Name: `BEGIN'

Stackeffect: -- addr n  (compiling)

Attributes: ISO,FIG,I,L0

Description: Occurs in a colon-definition in one of the forms:
     BEGIN ... UNTIL

     BEGIN ... AGAIN

     BEGIN ... WHILE ... REPEAT
   At run-time, `BEGIN'  marks the start of a sequence that may be
repetitively executed. It serves as a return point from the
corresponding `UNTIL'  , `AGAIN'  or `REPEAT'  .  When executing `UNTIL'
a return to `BEGIN'  will occur if the top of the stack is false; for
`AGAIN'  and `REPEAT'  a return to `BEGIN'  always occurs.

   At compile time `BEGIN'  leaves its return address and `n' for
compiler error checking.

See also: `(BACK'


File: ci86.lina.info,  Node: CO,  Next: DO,  Prev: BEGIN,  Up: CONTROL

CO
--

Name: `CO'

No stackeffect

Attributes:

Description:  Return suspend interpretation of the current definition,
such that when the caller exits, this definition is resumed.  The return
stack must not be engaged, such as between `>R'  and `R>'  , or `DO'
and `LOOP'  .

See also: `EXIT'


File: ci86.lina.info,  Node: DO,  Next: ELSE,  Prev: CO,  Up: CONTROL

DO
--

Name: `DO'

Stackeffect: n1 n2 -- (execute) addr n -- (compile)

Attributes: ISO,FIG,I,C2,L0

Description: Occurs in a colon-definition in form: `DO ... LOOP' At run
time, `DO'  begins a sequence with repetitive execution controlled by a
loop limit `n1' and an index with initial value `n2' .  `DO'  removes
these from the stack. Upon reaching `LOOP'  the index is incremented by
one. Until the new index equals or exceeds the limit, execution loops
back to just after `DO'  ; otherwise the loop parameters are discarded
and execution continues ahead. Both `n1' and `n2' are determined at
run-time and may be the result of other operations. Within a loop `I'
will copy the current value of the index to the stack.

   When compiling within the colon definition, `DO'  compiles `(DO)'
and leaves the following address `addr' and `n' for later error
checking.

See also: `I'  `LOOP'  `+LOOP'  `LEAVE'


File: ci86.lina.info,  Node: ELSE,  Next: EXIT,  Prev: DO,  Up: CONTROL

ELSE
----

Name: `ELSE'

Stackeffect: addr1 n1 -- addr2 n2 (compiling)

Attributes: ISO,FIG,I,C2,L0

Description: Occurs within a colon-definition in the form:
     IF ... ELSE ... THEN
   At run-time, `ELSE'  executes after the true part following `IF'  .
`ELSE'  forces execution to skip over the following false part and
resumes execution after the `THEN'  . It has no stack effect.

   At compile-time `ELSE'  emplaces `BRANCH'  reserving a branch
offset, leaves the address `addr2' and `n2' for error testing. `ELSE'
also resolves the pending forward branch from `IF'  by calculating the
offset from `addr1' to `HERE'  and storing at `addr1' .

See also: `(FORWARD'


File: ci86.lina.info,  Node: EXIT,  Next: IF,  Prev: ELSE,  Up: CONTROL

EXIT
----

Name: `EXIT'

No stackeffect

Attributes: ISO

Description:  Stop interpretation of the current definition. The return
stack must not be engaged, such as between `>R'  and `R>'  , or `DO'
and `LOOP'  . In ciforth it can also be used to terminate
interpretation from a string, block or file, or a line from the current
input stream.

See also: `(;)'


File: ci86.lina.info,  Node: IF,  Next: I,  Prev: EXIT,  Up: CONTROL

IF
--

Name: `IF'

Stackeffect: f -- (run-time) / -- addr n (compile)

Attributes: ISO,FIG,I,C2,L0

Description: Occurs in a colon-definition in form:
     IF (tp) ...  THEN
       or
     IF (tp) ... ELSE (fp) ... THEN
   At run-time, `IF'  selects execution based on a boolean flag. If `f'
is true (non-zero), execution continues ahead thru the true part. If
`f' is false (zero), execution skips till just after `ELSE'  to execute
the false part. After either part, execution resumes after `THEN' .
`ELSE'  and its false part are optional; if missing, false execution
skips to just after `THEN'  .

   At compile-time `IF'  compiles `0BRANCH'  and reserves space for an
offset at `addr' . `addr' and `n' are used later for resolution of the
offset and error testing.

See also: `(FORWARD'


File: ci86.lina.info,  Node: I,  Next: J,  Prev: IF,  Up: CONTROL

I
-

Name: `I'

Stackeffect: -- n

Attributes: ISO,FIG,C,L0

Description: Used within a do-loop to copy the loop index to the stack.

See also: `DO'  `LOOP'  `+LOOP'


File: ci86.lina.info,  Node: J,  Next: LEAVE,  Prev: I,  Up: CONTROL

J
-

Name: `J'

Stackeffect: -- n

Attributes: ISO,FIG,C,L0

Description: Used within a nested do-loop to copy the loop index of the
outer do-loop to the stack.

See also: `DO'  `LOOP'  `+LOOP'


File: ci86.lina.info,  Node: LEAVE,  Next: LOOP,  Prev: J,  Up: CONTROL

LEAVE
-----

Name: `LEAVE'

No stackeffect

Attributes: ISO

Description: Termination a do-loop by branching to directly behind the
end of a loop started by `DO' or `?DO' , so after the corresponding
`LOOP'  or `+LOOP'  .


File: ci86.lina.info,  Node: LOOP,  Next: RECURSE,  Prev: LEAVE,  Up: CONTROL

LOOP
----

Name: `LOOP'

Stackeffect:  -- (run) addr n -- (compiling)

Attributes: ISO,I,C2,L0

Description: Occurs in a colon-definition in form:
     DO ... LOOP
   At run-time, `LOOP'  selectively controls branching back to the
corresponding `DO'  based on the loop index and limit. The loop index
is incremented by one and compared to the limit. The branch back to `DO'
occurs until the index equals or exceeds the limit; at that time, the
parameters are discarded and execution continues ahead.

   At compile-time, `LOOP'  compiles `(LOOP)'  and uses `addr' to
calculate an offset to `DO' . `n2' is used for compile time error
checking.

See also: `+LOOP'


File: ci86.lina.info,  Node: RECURSE,  Next: REPEAT,  Prev: LOOP,  Up: CONTROL

RECURSE
-------

Name: `RECURSE'

Stackeffect: (varies)

Attributes: ISO

Description: Do a recursive call of the definition being compiled.

See also: `:'


File: ci86.lina.info,  Node: REPEAT,  Next: SKIP,  Prev: RECURSE,  Up: CONTROL

REPEAT
------

Name: `REPEAT'

Stackeffect: addr1 n1 addr2 n2-- (compiling)

Attributes: ISO,FIG,I,C2

Description: Used within a colon-definition in the form:
     BEGIN ... WHILE ... REPEAT
   At run-time, `REPEAT'  forces an unconditional branch back to just
after the corresponding `BEGIN'  .

   At compile-time, `REPEAT'  compiles `BRANCH'  and the offset from
`HERE'  to `addr2' . Then it fills in another branch offset at `addr1'
left there by `WHILE'  .  `n1 n2' is used for error testing.

See also: `WHILE'


File: ci86.lina.info,  Node: SKIP,  Next: THEN,  Prev: REPEAT,  Up: CONTROL

SKIP
----

Name: `SKIP'

No stackeffect

Attributes: C2,L0

Description: Skip over an area in memory, where the length is given in
the next cell.  This length doesn't include the length cell, so it is
compatible with `$@'  .  Internal, used for nested compilation and
compiling strings.

See also: `BRANCH'


File: ci86.lina.info,  Node: THEN,  Next: UNLOOP,  Prev: SKIP,  Up: CONTROL

THEN
----

Name: `THEN'

Stackeffect: addr n -- (compile)

Attributes: ISO,FIG,I,CO,L0

Description: Occurs in a colon-definition in form:
     IF ... THEN

     IF ... ELSE ... THEN
   At run-time, `THEN'  serves only as the destination of a forward
branch from `IF'  or `ELSE'  .  It marks the conclusion of the
conditional structure. At compile-time, `THEN'  computes the forward
branch offset from `addr' to `HERE'  and stores it at `addr' . `n' is
used for error tests.

See also: `FORWARD)'  `IF'  `ELSE'


File: ci86.lina.info,  Node: UNLOOP,  Next: UNTIL,  Prev: THEN,  Up: CONTROL

UNLOOP
------

Name: `UNLOOP'

Stackeffect: -- n

Attributes: ISO,I,C,L0

Description: Discard the loop parameters. Must be used when the regular
end of the loop is by-passed. That means it is not ended via `LOOP'
`+LOOP'  or `LEAVE' .

See also: `DO'  `LOOP'  `+LOOP'  `(BACK'  `(FORWARD'  `EXIT'


File: ci86.lina.info,  Node: UNTIL,  Next: WHILE,  Prev: UNLOOP,  Up: CONTROL

UNTIL
-----

Name: `UNTIL'

Stackeffect: f -- (run-time) addr n -- (compile)

Attributes: ISO,FIG,I,C2,L0

Description: Occurs within a colon-definition in the form:
     BEGIN ... UNTIL
   At run-time, `UNTIL'  controls the conditional branch back to the
corresponding `BEGIN'  If f is false, execution returns to just after
`BEGIN'  , otherwise execution continues ahead.

   At compile-time, `UNTIL'  compiles `0BRANCH'  and an offset from
`HERE'  to addr. `n' is used for error tests.

See also: `BEGIN'


File: ci86.lina.info,  Node: WHILE,  Next: paren_plus_loop,  Prev: UNTIL,  Up: CONTROL

WHILE
-----

Name: `WHILE'

Stackeffect: f -- (run-time) addr1 nl -- addr2 n1 addr1 n2(compile-time)

Attributes: ISO,FIG,I,C2

Description: Occurs in a colon-definition in the form:          `BEGIN
... WHILE (tp) ... REPEAT' At run-time, `WHILE'  selects conditional
execution based on boolean flag `f' . If `f' is true (non-zero), `WHILE'
continues execution of the true part thru to `REPEAT'  , which then
branches back to `BEGIN'  . If `f' is false (zero), execution skips to
just after `REPEAT'  , exiting the structure.

   At compile time, `WHILE'  compiles `0BRANCH'  and tucks the target
address `addr2' under the `addr1' left there by `BEGIN'  . The stack
values will be resolved by `REPEAT'  . `n1' and `n2' provide checks for
compiler security.

See also: `(FORWARD'  `BEGIN'


File: ci86.lina.info,  Node: paren_plus_loop,  Next: paren_semicolon,  Prev: WHILE,  Up: CONTROL

(+LOOP)
-------

Name: `(+LOOP)'

Stackeffect: n --

Attributes: C2

Description: The run-time proceedure compiled by `+LOOP' , which
increments the loop index by n and tests for loop completion.

See also: `+LOOP'


File: ci86.lina.info,  Node: paren_semicolon,  Next: paren_question_do,  Prev: paren_plus_loop,  Up: CONTROL

(;)
---

Name: `(;)'

No stackeffect

Attributes:

Description:  This is a synonym for `EXIT' . It is the run-time word
compiled at the end of a colon-definition which returns execution to
the calling proceedure. Stop interpretation of the current definition.
The return stack must not be engaged.

See also: `EXIT'


File: ci86.lina.info,  Node: paren_question_do,  Next: paren_back,  Prev: paren_semicolon,  Up: CONTROL

(?DO)
-----

Name: `(?DO)'

No stackeffect

Attributes: C

Description: The run-time proceedure compiled by `?DO'  which prepares
the return stack, where the looping bookkeeping is kept.

See also: `?DO'


File: ci86.lina.info,  Node: paren_back,  Next: paren_do,  Prev: paren_question_do,  Up: CONTROL

(BACK
-----

Name: `(BACK'

Stackeffect: -- addr

Attributes:

Description: Start a backward branch by leaving the target address
`HERE'  into `addr'. Usage is `(BACK .. POSTPONE BRANCH BACK) '

See also: `BACK)'  `BEGIN'  `DO'


File: ci86.lina.info,  Node: paren_do,  Next: paren_forward,  Prev: paren_back,  Up: CONTROL

(DO)
----

Name: `(DO)'

No stackeffect

Attributes: C

Description: The run-time proceedure compiled by `DO'  which prepares
the return stack, where the looping bookkeeping is kept.

See also: `DO'


File: ci86.lina.info,  Node: paren_forward,  Next: paren_loop,  Prev: paren_do,  Up: CONTROL

(FORWARD
--------

Name: `(FORWARD'

Stackeffect: -- addr

Attributes:

Description: Start a forward branch by leaving the address that must be
backpatched with an offset into `addr'.  Usage is `POSTPONE BRANCH
(FORWARD .. FORWARD) '

See also: `IF'


File: ci86.lina.info,  Node: paren_loop,  Next: 0BRANCH,  Prev: paren_forward,  Up: CONTROL

(LOOP)
------

Name: `(LOOP)'

No stackeffect

Attributes: C2

Description: The run-time proceedure compiled by LOOP which increments
the loop index and tests for loop completion.

See also: `LOOP'


File: ci86.lina.info,  Node: 0BRANCH,  Next: back_paren,  Prev: paren_loop,  Up: CONTROL

0BRANCH
-------

Name: `0BRANCH'

Stackeffect: f --

Attributes: FIG,C2

Description: The run-time proceedure to conditionally branch. If `f' is
false (zero), the following in-line parameter is added to the
interpretive pointer to branch ahead or back.  Compiled by `IF'  ,
`UNTIL'  , and `WHILE'  .

See also: `BRANCH'


File: ci86.lina.info,  Node: back_paren,  Next: BRANCH,  Prev: 0BRANCH,  Up: CONTROL

BACK)
-----

Name: `BACK)'

Stackeffect: addr --

Attributes:

Description: Complete a backward branch by compiling an offset from
`HERE'  to `addr', left there by `(BACK'  . Usage is `(BACK .. POSTPONE
BRANCH BACK) '

See also: `LOOP'  `UNTIL'


File: ci86.lina.info,  Node: BRANCH,  Next: forward_paren,  Prev: back_paren,  Up: CONTROL

BRANCH
------

Name: `BRANCH'

No stackeffect

Attributes: FIG,C2,L0

Description: The run-time proceedure to unconditionally branch. An
in-line offset is added to the interpretive pointer `IP'  to branch
ahead or back. `BRANCH'  is compiled by `ELSE'  `AGAIN'  `REPEAT'  .

See also: `0BRANCH'


File: ci86.lina.info,  Node: forward_paren,  Prev: BRANCH,  Up: CONTROL

FORWARD)
--------

Name: `FORWARD)'

Stackeffect: addr --

Attributes:

Description: Complete a forward branch by backpatching an offset from
`HERE'  into `addr', left there by `(FORWARD'  .  Usage is `POSTPONE
BRANCH (FORWARD .. FORWARD) '

See also: `LOOP'  `UNTIL'


File: ci86.lina.info,  Node: DEFINING,  Next: DENOTATIONS,  Prev: CONTROL,  Up: Glossary

DEFINING
========

   The wordset `DEFINING' contains words that add new entries to the
dictionary. A number of such "defining word" 's are predefined, but
there is also the possibility to make new defining words, using `CREATE'
and `DOES>'  .

* Menu:



* :  ::
* ;  ::
* CONSTANT  ::
* CREATE  ::
* DOES>  ::
* USER  ::
* VARIABLE  ::
* VOCABULARY  ::
* (;CODE)  :paren_semicolon_code
* (CREATE)  :paren_create
* ;CODE  ::


File: ci86.lina.info,  Node: :,  Next: ;,  Prev: DEFINING,  Up: DEFINING

:
-

Name: `:'

No stackeffect

Attributes: ISO,FIG,E,L0

Description: Used in the form called a colon-definition:
     : cccc     ...     ;
   Creates a dictionary entry defining `cccc' as equivalent to the
following sequence of Forth word definitions '...' until the next `';''
or `';CODE'' . The word is added as the latest into the `CURRENT'
word list.  The compiling process is done by the text interpreter as
long as `STATE'  is non-zero.  Words with the immediate bit set (I) are
executed rather than being compiled.


File: ci86.lina.info,  Node: ;,  Next: CONSTANT,  Prev: :,  Up: DEFINING

;
-

Name: `;'

No stackeffect

Attributes: ISO,FIG,I,C,L0

Description: Terminate a colon-definition and stop further compilation.
Compiles the run-time `EXIT'  .

See also: `:'


File: ci86.lina.info,  Node: CONSTANT,  Next: CREATE,  Prev: ;,  Up: DEFINING

CONSTANT
--------

Name: `CONSTANT'

Stackeffect: n --

Attributes: ISO,FIG,L0

Description: A defining word used in the form:     `n' `CONSTANT'
`cccc' to create word `cccc' , with its data field containing `n' .
When `cccc' is later executed, it will push the value of `n' to the
stack.

See also: `VARIABLE'


File: ci86.lina.info,  Node: CREATE,  Next: DOES>,  Prev: CONSTANT,  Up: DEFINING

CREATE
------

Name: `CREATE'

No stackeffect

Attributes:

Description: A defining word used in the form:      `CREATE cccc' Later
execution of `cccc' returns its data field, i.e.  the value of `HERE'
immediately after executing `CREATE'  .

   It can be the base of a new defining word if used in the form:
     : CREATOR CREATE aaaa DOES> bbbb ;
     CREATOR cccc
   The second line has the effect of creating a word `cccc' .  Its
datastructure is build by the code `aaaa' and when executing `cccc' ,
its data field is pushed on the stack, then the code `bbbb' is executed.

   Space in this data field has yet to be allocated and the execution
action can be changed.  ciforth is byte aligned, so no extra measures
are needed.

See also: `DOES>'  `;CODE'  `ALLOT'  `,'  `C,'


File: ci86.lina.info,  Node: DOES>,  Next: USER,  Prev: CREATE,  Up: DEFINING

DOES>
-----

Name: `DOES>'

No stackeffect

Attributes: ISO,FIG,L0

Description: A word which is normally use to specify the run-time action
within a high-level defining word. `DOES>'  modifies the behaviour of
the latest word as to execute the sequence of compiled word addresses
following `DOES>'  . Used in combination with `CREATE'  . When the
`DOES>'  part executes it begins with the address of the data field of
the word on the stack. This allows interpretation using this area or
its contents.  Typical uses include the Forth assembler,
multidimensional arrays, and compiler generation.


File: ci86.lina.info,  Node: USER,  Next: VARIABLE,  Prev: DOES>,  Up: DEFINING

USER
----

Name: `USER'

Stackeffect: n --

Attributes: ISO,L0

Description: A defining word used in the form:                `n USER
cccc' which creates a user variable `cccc' . The data field of `cccc'
contains `n' as a fixed offset relative to the user pointer register
`UP' for this user variable. When `cccc' is later executed, it places
the sum of its offset and the user area base address on the stack as
the storage address of that particular variable. In ciforth the `UP' is
fixed.

See also: `VARIABLE'  `+ORIGIN'  `CONTEXT'  `>DFA'


File: ci86.lina.info,  Node: VARIABLE,  Next: VOCABULARY,  Prev: USER,  Up: DEFINING

VARIABLE
--------

Name: `VARIABLE'

No stackeffect

Attributes: ISO,E,LU

Description: A defining word used in the form:
`VARIABLE cccc' When `VARIABLE'  is executed, it creates the definition
`cccc' with its data field pointing to a data location.  When `cccc' is
later executed, the content of its data field (containing `n' ) is left
on the stack, so that a fetch or store may access this location.

See also: `USER'  `CONSTANT'


File: ci86.lina.info,  Node: VOCABULARY,  Next: paren_semicolon_code,  Prev: VARIABLE,  Up: DEFINING

VOCABULARY
----------

Name: `VOCABULARY'

No stackeffect

Attributes: FIG,E,L

Description: A defining word used in the form: `VOCABULARY'  `cccc' to
create a vocabulary definition `cccc' . It will create a "word list" in
the ISO sense. Subsequent use of `cccc' will push this word list (the
"word list associated with"  `cccc') to the top of the search order in
`CONTEXT' . So it will searched first by `INTERPRET'  .

   A vocabulary 's data content field contains at first the dovoc
pointer (like for any `DOES>'  word) , then follows its body. The body
contains the vocabulary link field address ( "VLFA"  ). The VLFA points
to the VLFA of the next vocabulary or  a "nil pointer"  for the end.
Then follows a dummy dea that serves as "word list identifier"  or "WID"
in the sense of the ISO standard.  It has empty fields, except for the
link field.  The "link field address"  contains the DEA of the latest
word of the vocabulary or a "nil pointer" if empty. Executing the
vocabulary means pushing its WID on top of the `CONTEXT'  order. In
ciforth when there can be at most 16 word list 's in the search order,
the oldest one gets lost. The vocabularies generated are `IMMEDIATE'
words.

See also: `VOC-LINK'  `DEFINITIONS'


File: ci86.lina.info,  Node: paren_semicolon_code,  Next: paren_create,  Prev: VOCABULARY,  Up: DEFINING

(;CODE)
-------

Name: `(;CODE)'

No stackeffect

Attributes: C

Description: The run-time proceedure, compiled by `;CODE' , that
rewrites the code field of the most recently defined word to point to
the following machine code sequence. It is used after `CREATE'  instead
of `DOES>'  if the code following is assembler code instead of high
level code.

See also: ` (CREATE)'  `;CODE'


File: ci86.lina.info,  Node: paren_create,  Next: ;CODE,  Prev: paren_semicolon_code,  Up: DEFINING

(CREATE)
--------

Name: `(CREATE)'

Stackeffect: sc --

Attributes:

Description: This is the basis for all defining words. It lays down the
string `sc' in the dictionary, then creates a dictionary entries with
that string as the namefield. It is linked into the `CURRENT'  word
list. The code field and data field both point to the area owned by
this header, i.e. immediately following the completed header as
appropriate for a low level (assembler) definition. The flag field is
empty , so not `HIDDEN' .

See also: `CREATE'


File: ci86.lina.info,  Node: ;CODE,  Prev: paren_create,  Up: DEFINING

;CODE
-----

Name: `;CODE'

No stackeffect

Attributes: B,ISO,FIG,I,C,L0

Description: Used in the form:   `: cccc CREATE .... ;CODE assembly
mnemonics ' Stop compilation and terminate a new defining word `cccc'
by compiling `(;CODE)' . Set `ASSEMBLER'  to the top of the "search
order"  order. Start assembling to machine code the following mnemonics.

   When `cccc' later executes in the form:                      `cccc
nnnn' the word `nnnn' will be created with its execution proceedure
given by the machine code following `cccc' .  That is, when `nnnn' is
executed, it does so by jumping to the code after `nnnn' .  Because of
intimate relation to the assembler, it is present in loadable form in
the screens file `forth.lab' .

See also: `(;CODE)'  `LOAD'  `:'


File: ci86.lina.info,  Node: DENOTATIONS,  Next: DICTIONARY,  Prev: DEFINING,  Up: Glossary

DENOTATIONS
===========

   The wordset `DENOTATIONS' contains prefixes (mostly one letter
words) that introduce a "denotation" , i.e. a generalisation of `NUMBER'
.  Any word starting with the prefix is considered found in the
dictionary and the prefix word executed.  These words parse input and
leave a constant (number, char or string) on the stack, or compile such
constant, depending on `STATE' .  For a kernel system it is guaranteed
that they reside in the minimum search order wordset, called `ONLY' .
To make a distinction with the same words in other wordlists, the names
of denotations are prepended with "Prefix_" in the documentation.
Actual names in the dictionary do not contain the prefix. Apart from
`Prefix_0'  , the vocabulary contains entries for all hex digits 1...9
and A...F.  Like `NUMBER'  always did, all denotations behave identical
in interpret and compile mode and they are not supposed to be postponed.

* Menu:



* Prefix_"  :den_quote
* Prefix_&  ::
* Prefix_+  ::
* Prefix_-  ::
* Prefix_0  :den_zero
* Prefix_7  :den_seven
* Prefix_B  :den_b
* Prefix_^  ::
* Prefix__TICK  :tick_denotation


File: ci86.lina.info,  Node: den_quote,  Next: Prefix_&,  Prev: DENOTATIONS,  Up: DENOTATIONS

Prefix_"
--------

Name: `Prefix_"'

Stackeffect: -- sc

Attributes: CI

Description: Parse a `"' delimited string and leave it on the stack.  A
`"' can be embedded in a string by doubling it.  This is a denotation:
during compilation this behaviour is compiled.


File: ci86.lina.info,  Node: Prefix_&,  Next: Prefix_+,  Prev: den_quote,  Up: DENOTATIONS

Prefix_&
--------

Name: `Prefix_&'

Stackeffect: -- c

Attributes: CI

Description: Leave `c' the non blank char that follows.  Skip another
blank character.  This is a denotation: during compilation this
behaviour is compiled.

See also: `^'


File: ci86.lina.info,  Node: Prefix_+,  Next: Prefix_-,  Prev: Prefix_&,  Up: DENOTATIONS

Prefix_+
--------

Name: `Prefix_+'

Stackeffect: -- s/d

Attributes: CI

Description: Implements `NUMBER'  for numbers that start with `+' .


File: ci86.lina.info,  Node: Prefix_-,  Next: den_zero,  Prev: Prefix_+,  Up: DENOTATIONS

Prefix_-
--------

Name: `Prefix_-'

Stackeffect: -- s/d

Attributes: CI

Description: Implements `NUMBER'  for numbers that start with `-' .


File: ci86.lina.info,  Node: den_zero,  Next: den_seven,  Prev: Prefix_-,  Up: DENOTATIONS

Prefix_0
--------

Name: `Prefix_0'

Stackeffect: -- s/d

Attributes: CI

Description: Implements `NUMBER'  for numbers that start with `0' .
Similar words are present for all decimal and hex digits.   ISO
compatibility ony requires that denotators for decimal digits are
present, one can always use a leading zero.

See also: `B'  `7'


File: ci86.lina.info,  Node: den_seven,  Next: den_b,  Prev: den_zero,  Up: DENOTATIONS

Prefix_7
--------

Name: `Prefix_7'

Stackeffect: -- s/d

Attributes: CI

Description: Implements `NUMBER'  for numbers that start with `7' .
Similar words are present for all decimal and hex digits.

See also: `0'  `B'


File: ci86.lina.info,  Node: den_b,  Next: Prefix_^,  Prev: den_seven,  Up: DENOTATIONS

Prefix_B
--------

Name: `Prefix_B'

Stackeffect: -- s/d

Attributes: CI

Description: Implements `NUMBER'  for numbers that start with `B' .
Similar words are present for all decimal and hex digits.

See also: `0'  `7'


File: ci86.lina.info,  Node: Prefix_^,  Next: tick_denotation,  Prev: den_b,  Up: DENOTATIONS

Prefix_^
--------

Name: `Prefix_^'

Stackeffect: -- b

Attributes: CI

Description: Leave `b' the control character value of the char that
follows i.e. `^A' results in 1 and so on.  Skip another blank character.
This is a denotation: during compilation this behaviour is compiled.

See also: `&'


File: ci86.lina.info,  Node: tick_denotation,  Prev: Prefix_^,  Up: DENOTATIONS

Prefix__TICK
------------

Name: `Prefix__TICK'

Stackeffect: -- addr

Attributes: ISO,FIG,I,L0

Description: Used in the form:
     'nnnn
   In interpret mode it leaves the "execution token"  (equivalent to the
dictionary entry address) of dictionary word `nnnn'.  If the word is
not found after a search of the search order an appropriate error
message is given.  In ciforth it can be used in compilation mode too, it
then compiles the address as a literal.  It is recommended that one
never compiles or postpones it.  (Use a combination of `WORD'  and
`FIND'  or any form of explicit parsing and searching instead.)
Furthermore it is recommended that for non-portable code `''  is used
in its "denotation"  form without the space.   Note that if you
separate `''  by a space, the ISO-conforming version of  `''  is found.

See also: `CONTEXT'  `[']'  `PRESENT'  `>CFA'  `>DFA'  `>FFA'  `>LFA'
`>NFA'  `>SFA'


File: ci86.lina.info,  Node: DICTIONARY,  Next: DOUBLE,  Prev: DENOTATIONS,  Up: Glossary

DICTIONARY
==========

   The wordset `DICTIONARY' contains words that at a lower level than
the wordset `DEFINING' concern the memory area that is allocated to the
dictionary. They may add data to the dictionary at the expense of the
free space, one cell or one byte at a time, or allocate a buffer at
once. The dictionary space may also be shrunk, and the words that were
there are lost. The "dictionary entry address"  or "DEA"  represents a
word. It is the lowest address of a record with fields. Words to access
those fields also belong to this wordset.

* Menu:



* '  :tick_iso
* ,  :comma
* >BODY  ::
* ALLOT  ::
* BODY>  ::
* C,  :c_comma
* DP  ::
* FIND  ::
* FORGET  ::
* FOUND  ::
* HERE  ::
* ID.  ::
* IMMEDIATE  ::
* PAD  ::
* PREFIX  ::
* PRESENT  ::
* WORDS  ::
* [']  :bracket_tick_bracket
* (FIND)  :paren_find
* >CFA  ::
* >DFA  ::
* >FFA  ::
* >LFA  ::
* >NFA  ::
* >PHA  ::
* >SFA  ::
* >VFA  ::
* >WID  ::
* >XFA  ::
* CFA>  ::
* FENCE  ::
* FOR-VOCS  ::
* FOR-WORDS  ::
* FORGET-VOC  ::
* HIDDEN  ::
* OPT  :optimiser
* ~MATCH  :unmatch


File: ci86.lina.info,  Node: tick_iso,  Next: comma,  Prev: DICTIONARY,  Up: DICTIONARY

' (This addition because texinfo won't accept a single quote)
-------------------------------------------------------------

Name: `''

Stackeffect: -- addr

Attributes: ISO,FIG,I,L0

Description: Used in the form:
     ' nnnn
   It leaves the "execution token"  (equivalent to the dictionary entry
address) of dictionary word `nnnn'.  If the word is not found after a
search of the search order an appropriate error message is given.  If
compiled the searching is done while the word being compiled is
executed.  Because this is so confusing, it is recommended that one
never compiles or postpones `'' .  (Use a combination of `WORD'  and
`FIND'  or any form of explicit parsing and searching instead.)
Furthermore it is recommended that for non-portable code `''  is used
in its "denotation"  form without the space.

See also: `[']'  `FOUND'  `>CFA'  `>DFA'  `>FFA'  `>LFA'  `>NFA'  `>SFA'
`>XFA'


File: ci86.lina.info,  Node: comma,  Next: >BODY,  Prev: tick_iso,  Up: DICTIONARY

,
-

Name: `,'

Stackeffect: n --

Attributes: ISO,FIG,L0

Description: Store `n' into the next available dictionary memory cell,
advancing the "dictionary pointer" .

See also: `DP'  `C,'


File: ci86.lina.info,  Node: >BODY,  Next: ALLOT,  Prev: comma,  Up: DICTIONARY

>BODY
-----

Name: `>BODY'

Stackeffect: dea -- addr

Attributes: ISO

Description: Given the "dictionary entry address"  `dea' of a
definition created with a `CREATE'  / `DOES>'  construct, return its
"data"  field (in the ISO sense) `addr'.

See also: `''  `>CFA'  `>DFA'  `>PHA'  `BODY>'


File: ci86.lina.info,  Node: ALLOT,  Next: BODY>,  Prev: >BODY,  Up: DICTIONARY

ALLOT
-----

Name: `ALLOT'

Stackeffect: n --

Attributes: ISO,FIG,L0

Description: Add the signed number to the "dictionary pointer"  `DP'  .
May be used to reserve dictionary space or re-origin memory. As the
Pentium is a byte-addressable machine `n' counts bytes.

See also: `CELL+'


File: ci86.lina.info,  Node: BODY>,  Next: c_comma,  Prev: ALLOT,  Up: DICTIONARY

BODY>
-----

Name: `BODY>'

Stackeffect: addr -- dea

Attributes:

Description: Convert the data field `addr' of a definition created with
a `CREATE'  / `DOES>'  construct to its `dea'. Where `>BODY'  keeps
working after "revectoring"  , `BODY>'  does not.   There is some logic
to this, because the "DEA"  to which the body belongs is no longer
unique.

See also: `''  `>BODY'


File: ci86.lina.info,  Node: c_comma,  Next: DP,  Prev: BODY>,  Up: DICTIONARY

C,
--

Name: `C,'

Stackeffect: b --

Attributes: ISO,FIG

Description: Store 8 bits of `b' into the next available dictionary
byte, advancing the "dictionary pointer" .

See also: `DP'  `,'


File: ci86.lina.info,  Node: DP,  Next: FIND,  Prev: c_comma,  Up: DICTIONARY

DP
--

Name: `DP'

Stackeffect: --- addr

Attributes: FIG,U,L

Description: A user variable, the "dictionary pointer" , which contains
the address of the next free memory above the dictionary. The value may
be read by `HERE'  and altered by `ALLOT'  .


File: ci86.lina.info,  Node: FIND,  Next: FORGET,  Prev: DP,  Up: DICTIONARY

FIND
----

Name: `FIND'

Stackeffect: addr --xt 1/xt -1/addr 0

Attributes: ISO

Description: For the "old fashioned string"  (stored with a preceding
character count) at `addr' find a Forth word in the current search
order.  Return its execution token `xt'. If the word is immediate, also
return 1, otherwise also return -1. If it is not found, leave the
original `addr' and a zero.

See also: `CONTEXT'  `PRESENT'  `(FIND)'


File: ci86.lina.info,  Node: FORGET,  Next: FOUND,  Prev: FIND,  Up: DICTIONARY

FORGET
------

Name: `FORGET'

No stackeffect

Attributes: ISO,FIG,E,L0

Description: Executed in the form:                `FORGET'  `cccc'
Deletes definition named `cccc' from the dictionary with all entries
physically following it. Recover the space that was in use.

See also: `FENCE'  `FORGET-VOC'


File: ci86.lina.info,  Node: FOUND,  Next: HERE,  Prev: FORGET,  Up: DICTIONARY

FOUND
-----

Name: `FOUND'

Stackeffect: sc -- dea

Attributes:

Description:  Look up the string `sc' in the dictionary observing the
current search order. If found, leave the dictionary entry address
`dea' of the first entry found, else leave a "nil pointer". If the
first part of the string matches a "denotation"  word, that word is
found, whether the denotation is correct or not.

See also: `PRESENT'  `CONTEXT'  `FIND'  `(FIND)'  `VOCABULARY'


File: ci86.lina.info,  Node: HERE,  Next: ID.,  Prev: FOUND,  Up: DICTIONARY

HERE
----

Name: `HERE'

Stackeffect: -- addr

Attributes: ISO,FIG,L0

Description: Leave the address `addr' of the next available dictionary
location.

See also: `DP'


File: ci86.lina.info,  Node: ID.,  Next: IMMEDIATE,  Prev: HERE,  Up: DICTIONARY

ID.
---

Name: `ID.'

Stackeffect: dea --

Attributes:

Description: Print a definition's name from its dictionary entry
address.  For dummy entries print nothing.

See also: `''  `>FFA'  `>NFA'


File: ci86.lina.info,  Node: IMMEDIATE,  Next: PAD,  Prev: ID.,  Up: DICTIONARY

IMMEDIATE
---------

Name: `IMMEDIATE'

No stackeffect

Attributes:

Description: Mark the most recently made definition so that when
encountered at compile time, it will be executed rather than being
compiled, i.e.  the immediate bit in its header is set.  This method
allows definitions to handle unusual compiling situations, rather than
build them into the fundamental compiler.  The user may force
compilation of an immediate definition by preceding it with `POSTPONE'
.


File: ci86.lina.info,  Node: PAD,  Next: PREFIX,  Prev: IMMEDIATE,  Up: DICTIONARY

PAD
---

Name: `PAD'

Stackeffect: -- addr

Attributes: ISO,FIG,L0

Description: Leave the address of the text output buffer, which is a
fixed offset above `HERE' . The area growing downword from `PAD'  is
used for numeric conversion.


File: ci86.lina.info,  Node: PREFIX,  Next: PRESENT,  Prev: PAD,  Up: DICTIONARY

PREFIX
------

Name: `PREFIX'

No stackeffect

Attributes:

Description: Mark the most recently made definition a "prefix" .  If
searching the wordlists for a name that starts with the prefix, the
prefix is a match for that name.  This method allows to define numbers,
and other "denotations"  such as strings, in a modular and extensible
fashion.  A prefix word finds the interpreter pointer pointing to the
remainder of the name (or number) sought for, and must compile that
remainder.  Prefix words are most mostly both immediate and "smart" ,
i.e. they behave differently when compiled, than interpreted.  The
result is that the compiled code looks the same and behaves the same
than the interpreted code.   It is recommended that the only smart
words present are  prefix words.

See also: `IMMEDIATE'


File: ci86.lina.info,  Node: PRESENT,  Next: WORDS,  Prev: PREFIX,  Up: DICTIONARY

PRESENT
-------

Name: `PRESENT'

Stackeffect: sc -- dea

Attributes:

Description:  If the string `sc' is present as a word name in the
current search order, return its `dea', else leave a "nil pointer" .
For a a "denotation"  word, the name must match `sc' exactly.

See also: `FOUND'  `CONTEXT'  `FIND'  `(FIND)'  `VOCABULARY'


File: ci86.lina.info,  Node: WORDS,  Next: bracket_tick_bracket,  Prev: PRESENT,  Up: DICTIONARY

WORDS
-----

Name: `WORDS'

No stackeffect

Attributes: ISO

Description: List the names of the definitions in the topmost word list
of the search order.

See also: `CONTEXT'


File: ci86.lina.info,  Node: bracket_tick_bracket,  Next: paren_find,  Prev: WORDS,  Up: DICTIONARY

[']
---

Name: `[']'

Stackeffect: -- addr

Attributes: ISO,I

Description: Used in the form:
     ['] nnnn
   In compilation mode it leaves the "execution token"  (equivalent to
the dictionary entry address) of dictionary word `nnnn'. So as a
compiler directive it compiles the address as a literal. If the word is
not found after a search of the search order an appropriate error
message is given.  It is recommended that where you can't use a
"denotation"

See also: `FOUND'  `''  `EXECUTE '


File: ci86.lina.info,  Node: paren_find,  Next: >CFA,  Prev: bracket_tick_bracket,  Up: DICTIONARY

(FIND)
------

Name: `(FIND)'

Stackeffect: sc wid -- sc dea

Attributes:

Description: Search down from the "WID"  `wid' for a word with name
`sc'.  A "WID"  is mostly a dummy "DEA"  found in the data field of a
vocabulary, fetched from `CURRENT'  or an other wid in the "search
order"  . Leave the dictionary entry address `dea' of the first entry
found, else leave a zero.  Do not consume the string `sc', as this is a
repetitive action.

See also: `~MATCH'  `FIND'  `PRESENT'  `>WID'


File: ci86.lina.info,  Node: >CFA,  Next: >DFA,  Prev: paren_find,  Up: DICTIONARY

>CFA
----

Name: `>CFA'

Stackeffect: dea -- addr

Attributes:

Description: Given a dictionary entry addres `dea' return its "code
field address"  `addr'. By jumping indirectly via this address the
definition `dea' is executed. This is the address that is compiled
within high level definitions, so it serves as an execution token.  In
ciforth it has offset 0, so it is actually the same as the "DEA" .

See also: `''  `CFA>'  `>DFA'  `>FFA'  `>LFA'  `>NFA'  `>SFA'  `>PHA'


File: ci86.lina.info,  Node: >DFA,  Next: >FFA,  Prev: >CFA,  Up: DICTIONARY

>DFA
----

Name: `>DFA'

Stackeffect: dea -- addr

Attributes:

Description: Given a dictionary entry addres return its "data field
address"  `addr' . This points to the code for a code word, to the high
level code for a colon-definition, and to the `DOES>'  pointer for a
word build using `CREATE' . Normally this is the area behind the
header, found via `>PHA'  .

See also: `''  `>BODY'  `>CFA'  `>FFA'  `>LFA'  `>NFA'  `>SFA'  `>PHA'


File: ci86.lina.info,  Node: >FFA,  Next: >LFA,  Prev: >DFA,  Up: DICTIONARY

>FFA
----

Name: `>FFA'

Stackeffect: dea -- addr

Attributes:

Description: Given a dictionary entry addres return its "flag field
address"  `addr' .

See also: `''  `>CFA'  `>DFA'  `>LFA'  `>NFA'


File: ci86.lina.info,  Node: >LFA,  Next: >NFA,  Prev: >FFA,  Up: DICTIONARY

>LFA
----

Name: `>LFA'

Stackeffect: dea -- addr

Attributes:

Description: Given a dictionary entry addres return its "link field
address"  `addr'. It contains the DEA of the previous word.

See also: `''  `>CFA'  `>DFA'  `>FFA'  `>NFA'  `>PHA'  `>SFA'


File: ci86.lina.info,  Node: >NFA,  Next: >PHA,  Prev: >LFA,  Up: DICTIONARY

>NFA
----

Name: `>NFA'

Stackeffect: dea -- nfa

Attributes:

Description: Given a dictionary entry addres return the  "name field
address" .

See also: `''  `>CFA'  `>DFA'  `>FFA'  `>LFA'  `>SFA'


File: ci86.lina.info,  Node: >PHA,  Next: >SFA,  Prev: >NFA,  Up: DICTIONARY

>PHA
----

Name: `>PHA'

Stackeffect: dea -- addr

Attributes:

Description: Given a dictionary entry addres return the "past header
address" . Here starts the area that no longer belongs to the header of
a dictionary entry, but most often it is owned by it.

See also: `''  `>CFA'  `>BODY'


File: ci86.lina.info,  Node: >SFA,  Next: >VFA,  Prev: >PHA,  Up: DICTIONARY

>SFA
----

Name: `>SFA'

Stackeffect: dea -- addr

Attributes:

Description: Given a dictionary entry addres return the  "source field
address"  `addr' .

See also: `''  `>CFA'  `>DFA'  `>FFA'  `>LFA'  `>NFA'


File: ci86.lina.info,  Node: >VFA,  Next: >WID,  Prev: >SFA,  Up: DICTIONARY

>VFA
----

Name: `>VFA'

Stackeffect: dea -- cfa

Attributes:

Description: Given the dictionary entry addres of a vocabulary return
the address of the link to the next vocabulary.

See also: `VOCABULARY'  `>CFA'  `>WID'


File: ci86.lina.info,  Node: >WID,  Next: >XFA,  Prev: >VFA,  Up: DICTIONARY

>WID
----

Name: `>WID'

Stackeffect: dea -- wid

Attributes:

Description: Given the dictionary entry addres `dea' of a vocabulary
return its "WID"  `wid', a dummy DEA that serves as the start of a
dictionary search.

See also: `VOCABULARY'  `>CFA'  `(FIND)'


File: ci86.lina.info,  Node: >XFA,  Next: CFA>,  Prev: >WID,  Up: DICTIONARY

>XFA
----

Name: `>XFA'

Stackeffect: dea -- addr

Attributes:

Description: Given a dictionary entry addres return the  "extra field
address"  `addr' .

See also: `''  `>CFA'  `>DFA'  `>FFA'  `>LFA'  `>NFA'


File: ci86.lina.info,  Node: CFA>,  Next: FENCE,  Prev: >XFA,  Up: DICTIONARY

CFA>
----

Name: `CFA>'

Stackeffect: cfa -- dea

Attributes:

Description: Convert the code field address of a definition to its
"dictionary entry address"  `dea'.

See also: `''  `>CFA'


File: ci86.lina.info,  Node: FENCE,  Next: FOR-VOCS,  Prev: CFA>,  Up: DICTIONARY

FENCE
-----

Name: `FENCE'

Stackeffect: --  addr

Attributes: FIG,U

Description: A user variable containing an address below which `FORGET'
ting is trapped. To forget below this point the user must alter the
contents of `FENCE'  .


File: ci86.lina.info,  Node: FOR-VOCS,  Next: FOR-WORDS,  Prev: FENCE,  Up: DICTIONARY

FOR-VOCS
--------

Name: `FOR-VOCS'

Stackeffect: x1..xn xt -- x1...xn

Attributes:

Description: For all vocabularies execute `xt'  with as data the "DEA"
of those words. `xt' must have the stack diagram `x1..xn dea --- x1..xn'

See also: `FOR-WORDS'  `EXECUTE'


File: ci86.lina.info,  Node: FOR-WORDS,  Next: FORGET-VOC,  Prev: FOR-VOCS,  Up: DICTIONARY

FOR-WORDS
---------

Name: `FOR-WORDS'

Stackeffect: x1...xn xt wid -x1...xn

Attributes:

Description: For all words from a word list identified by `wid' execute
`xt'  with as data `x1..xn' plus the "DEA"  of those words.         `xt'
must have the stack diagram `x1..xn dea --- x1..xn'.  Note that you can
use the DEA of any word as a WID and the remainder of the word list
will be searched.

See also: `FOR-VOCS'  `EXECUTE'


File: ci86.lina.info,  Node: FORGET-VOC,  Next: HIDDEN,  Prev: FOR-WORDS,  Up: DICTIONARY

FORGET-VOC
----------

Name: `FORGET-VOC'

Stackeffect: addr wid - addr

Attributes:

Description: Remove all words whose DEA is greater (later defined) than
`addr' from a wordlist given by `wid' .  This works too if links have
been redirected, such that some earlier words point back to later
defined words.  Leave `addr' (as `FORGET-VOC'  is intended to be used
with `FOR-VOCS' ) . If any whole vocabulary is removed, the search
order is reset to `ONLY FORTH'. The space freed is not recovered.

See also: `FORGET'


File: ci86.lina.info,  Node: HIDDEN,  Next: optimiser,  Prev: FORGET-VOC,  Up: DICTIONARY

HIDDEN
------

Name: `HIDDEN'

Stackeffect: dea --

Attributes:

Description: Make the word with dictionary entry address `dea'
unfindable, by toggling the "smudge bit" in a definitions' flag field.
If however it was the `dea' of an unfindable word, it is made findable
again.  Used during the definition of a colon word to prevents an
uncompleted definition from being found during dictionary searches,
until compiling is completed without error. It also prevents that a
word can be used recursively.

See also: `IMMEDIATE'  `RECURSE'


File: ci86.lina.info,  Node: optimiser,  Next: unmatch,  Prev: HIDDEN,  Up: DICTIONARY

OPT
---

Name: `OPT'

Stackeffect: sc dea -- sc dea1

Attributes:

Description: Search down from the "DEA"  `dea' for a word with name
`sc'.  Replace `dea' with `dea1' if the dictionary part between both
could not contain the name searched for.  `dea1' being a null pointer
means that the dictionary doesn't contain the name.  This is an vector
in behalf of optimisation, that starts as a noop, and can be filled in
if the extra field is used for optimisation.

See also: `~MATCH'  `FIND'  `>XFA'


File: ci86.lina.info,  Node: unmatch,  Prev: optimiser,  Up: DICTIONARY

~MATCH
------

Name: `~MATCH'

Stackeffect: sc dea -- sc dea n

Attributes:

Description: Intended to cooperate with `(FIND)'  . Compares the
"string constant"  `sc' with the dea `dea'.  Returns into `n' the
difference between the first characters that compare unequal, or zero
if the strings are the same up to the smallest length.  It is required
that the dea has a non-zero name field.

See also: `FIND'  `CORA'


File: ci86.lina.info,  Node: DOUBLE,  Next: ENVIRONMENTS,  Prev: DICTIONARY,  Up: Glossary

DOUBLE
======

   The wordset `DOUBLE' contains words that manipulate "double" 's.  In
this 32 Forth you would hardly need doubles if it weren't for the
NUMBER formatting wordset that uses them exclusively.

* Menu:



* D+  ::
* DABS  ::
* DNEGATE  ::
* S>D  ::


File: ci86.lina.info,  Node: D+,  Next: DABS,  Prev: DOUBLE,  Up: DOUBLE

D+
--

Name: `D+'

Stackeffect: d1 d2 -- dsum

Attributes: ISO,FIG

Description: Leave the double number `dsum': the sum of two double
numbers `d1' and `d2' .

See also: `DNEGATE'  `+'


File: ci86.lina.info,  Node: DABS,  Next: DNEGATE,  Prev: D+,  Up: DOUBLE

DABS
----

Name: `DABS'

Stackeffect: d -- ud

Attributes: ISO,FIG

Description: Leave the absolute value `ud' of a double number `d' .

See also: `DNEGATE'  `ABS'


File: ci86.lina.info,  Node: DNEGATE,  Next: S>D,  Prev: DABS,  Up: DOUBLE

DNEGATE
-------

Name: `DNEGATE'

Stackeffect: d1 -- d2

Attributes: ISO

Description: `d2' is the negation of `d1'.

See also: `D+'


File: ci86.lina.info,  Node: S>D,  Prev: DNEGATE,  Up: DOUBLE

S>D
---

Name: `S>D'

Stackeffect: n -- d

Attributes: ISO

Description: Sign extend a single number to form a double number.


File: ci86.lina.info,  Node: ENVIRONMENTS,  Next: ERRORS,  Prev: DOUBLE,  Up: Glossary

ENVIRONMENTS
============

   The wordset `ENVIRONMENTS' contains all words of the `ENVIRONMENT'
vocabulary and those words needed to recognize them as Forth
environment queries.  Note that these are not environment variables in
the sense that are passed from an operating system to a program.

* Menu:



* CORE  ::
* CPU  ::
* ENVIRONMENT?  ::
* NAME  ::
* SUPPLIER  ::
* VERSION  ::


File: ci86.lina.info,  Node: CORE,  Next: CPU,  Prev: ENVIRONMENTS,  Up: ENVIRONMENTS

CORE
----

Name: `CORE'

Stackeffect: -- ff

Attributes: ISO

Description: An environment query whether the CORE wordset is present.

See also: `ENVIRONMENT?'


File: ci86.lina.info,  Node: CPU,  Next: ENVIRONMENT?,  Prev: CORE,  Up: ENVIRONMENTS

CPU
---

Name: `CPU'

Stackeffect: -- d

Attributes: CI

Description: An environment query returning the cpu-type to be printed
as a base-36 number.

See also: `ENVIRONMENT?'


File: ci86.lina.info,  Node: ENVIRONMENT?,  Next: NAME,  Prev: CPU,  Up: ENVIRONMENTS

ENVIRONMENT?
------------

Name: `ENVIRONMENT?'

Stackeffect: sc -- i*x true/false

Attributes: ISO

Description: If the string `sc' is a known environment attribute, leave
into `i*x' the information about that attribute and a true flag, else
leave a false flag. In fact the flag indicates whether the words is
present in the `ENVIRONMENT'  vocabulary and `i*x' is what is left by
the word if executed.

See also: `VOCABULARY'


File: ci86.lina.info,  Node: NAME,  Next: SUPPLIER,  Prev: ENVIRONMENT?,  Up: ENVIRONMENTS

NAME
----

Name: `NAME'

Stackeffect: -- sc

Attributes: CI

Description: An environment query giving the name of this Forth as a
"string constant".

See also: `ENVIRONMENT?'


File: ci86.lina.info,  Node: SUPPLIER,  Next: VERSION,  Prev: NAME,  Up: ENVIRONMENTS

SUPPLIER
--------

Name: `SUPPLIER'

Stackeffect: -- sc

Attributes: CI

Description: An environment query giving the SUPPLIER of this Forth as
a "string constant".

See also: `ENVIRONMENT?'


File: ci86.lina.info,  Node: VERSION,  Prev: SUPPLIER,  Up: ENVIRONMENTS

VERSION
-------

Name: `VERSION'

Stackeffect: -- sc

Attributes: CI

Description: An environment query giving the version of this Forth as a
"string constant".

See also: `ENVIRONMENT?'


File: ci86.lina.info,  Node: ERRORS,  Next: FILES,  Prev: ENVIRONMENTS,  Up: Glossary

ERRORS
======

   The wordset `ERRORS' contains words to handle errors and exceptions.

* Menu:



* ?ERROR  ::
* ?ERRUR  ::
* ABORT"  :abort_quote
* CATCH  ::
* ERROR  ::
* ERRSCR  ::
* MESSAGE  ::
* THROW  ::
* WARNING  ::
* WHERE  ::
* (ABORT")  :paren_abort_quote
* HANDLER  ::


File: ci86.lina.info,  Node: ?ERROR,  Next: ?ERRUR,  Prev: ERRORS,  Up: ERRORS

?ERROR
------

Name: `?ERROR'

Stackeffect: f n --

Attributes:

Description:

   If the boolean flag is true, "signal an error"  with number `n'.
This means that an exception is thrown, and it is remembered that this
is the original place where the exception originated.  If the exception
is never caught, an error message is displayed using `ERROR'  .  All
errors signalled by the kernel go through this word, allowing to catch
e.g. errors in accessing the block file.

See also: `ERROR'  `?ERRUR'


File: ci86.lina.info,  Node: ?ERRUR,  Next: abort_quote,  Prev: ?ERROR,  Up: ERRORS

?ERRUR
------

Name: `?ERRUR'

Stackeffect: n --

Attributes:

Description: Handle the possible error `n' in Unix fashion. If it is
zero or positive, this means okay. If it is negative, its value
identifies an error condition. This error is handled in the same way as
by `?ERROR'  .

See also: `ERROR'  `?ERROR'


File: ci86.lina.info,  Node: abort_quote,  Next: CATCH,  Prev: ?ERRUR,  Up: ERRORS

ABORT"
------

Name: `ABORT"'

Stackeffect: f --

Attributes: ISO,I

Description: Usage is `: <SOME> ... ABORT" <message>" ... ;'. If ABORT"
finds a non-zero `f' on the stack, the `<message>' is displayed and an
`ABORT'  is executed. Otherwise proceed with the words after
`<message>'. This word can only be used in compile mode.

See also: `?ERROR'


File: ci86.lina.info,  Node: CATCH,  Next: ERROR,  Prev: abort_quote,  Up: ERRORS

CATCH
-----

Name: `CATCH'

Stackeffect: ... xt -- ... tc

Attributes: ISO

Description: Execute `xt'. If it executes successfully, i.e. no `THROW'
is executed by `xt', leave a zero into `tc' in addition to any stack
effect `xt' itself might have. Otherwise in `tc' the non-zero throw
code is left, and the stack depth is restored. The values of the
parameters for `xt' could have been modified. In general, there is
nothing useful that can be done with those stack items. Since the stack
depth is known, the application may `DROP'  those items.

See also: `THROW'  `QUIT'  `HANDLER'


File: ci86.lina.info,  Node: ERROR,  Next: ERRSCR,  Prev: CATCH,  Up: ERRORS

ERROR
-----

Name: `ERROR'

Stackeffect: n --

Attributes:

Description: Notify the user that an uncaught exception or error with
number `n' has occurred.  The word that caused it is found using `WHERE'
and displayed .  Also `n' is passed to `MESSAGE'  in order to give a
description  of the error.  This word is executed by `THROW'  before
restarting the interpreter and can be revectored to give more elaborate
diagnostics.

See also: `?ERROR'  `WARNING'


File: ci86.lina.info,  Node: ERRSCR,  Next: MESSAGE,  Prev: ERROR,  Up: ERRORS

ERRSCR
------

Name: `ERRSCR'

Stackeffect: -- addr

Attributes:

Description: A variable containing the address of the number of the
screen from which messages are offset. Messages correspond with lines
and the offset may be positive or negative.  `0 MESSAGE' prints the
first line of this screen.  Traditionally this was screen 4, but the
negative Unix error numbers makes this unfeasible.

See also: `C/L'  `MESSAGE'


File: ci86.lina.info,  Node: MESSAGE,  Next: THROW,  Prev: ERRSCR,  Up: ERRORS

MESSAGE
-------

Name: `MESSAGE'

Stackeffect: n --

Attributes:

Description:  `MESSAGE'  is generally used to print error and warning
messages.  Print on the standard error channel the text of line `n'
relative to screen `ERRSCR'  . `n' may be positive or negative and
beyond just screen `ERRSCR' .  The messages with negative offset contain
the strings belonging to the return values for Linux system calls .  `0
MESSAGE' will print version information about the library file, the
messages sit in.  If `WARNING'  is zero (disc unavailable), the message
will simply be ignored.

See also: `ERROR'


File: ci86.lina.info,  Node: THROW,  Next: WARNING,  Prev: MESSAGE,  Up: ERRORS

THROW
-----

Name: `THROW'

Stackeffect: ... tc -- ... / ... tc

Attributes: ISO

Description: If `tc' is zero, it is merely discarded. If we are
executing under control of a `CATCH'  , see `CATCH'  for the effect of
a non-zero `tc'. If we are executing not under control of a `CATCH' , a
non-zero `tc' gives a message to the effect that this exception has
occurred and starts Forth anew.

See also: `CATCH'  `QUIT'  `HANDLER'  `?ERROR'  `ERROR'


File: ci86.lina.info,  Node: WARNING,  Next: WHERE,  Prev: THROW,  Up: ERRORS

WARNING
-------

Name: `WARNING'

Stackeffect: -- addr

Attributes: FIG,U

Description: A user variable containing a value controlling messages.
If it is 1, a library file is open, and messages are fetched from it.
If it is 0, messages will be presented by number only.  Don't set
`WARNING'  to 1 if there is no block system available, because the
error system will call itself recursively.  This may lead to a crash.

See also: `MESSAGE'  `ERROR'  `ERRSCR'


File: ci86.lina.info,  Node: WHERE,  Next: paren_abort_quote,  Prev: WARNING,  Up: ERRORS

WHERE
-----

Name: `WHERE'

Stackeffect: -- addr

Attributes: U

Description: A user variable pair which contains the start of the
source and the character position of the last error that was thrown by
`?ERROR'  ,so not of exceptions thrown.  The contents of `WHERE'  is
interpreted by `ERROR'  if the corresponding exception was never caught.

See also: `THROW'  `CATCH '


File: ci86.lina.info,  Node: paren_abort_quote,  Next: HANDLER,  Prev: WHERE,  Up: ERRORS

(ABORT")
--------

Name: `(ABORT")'

Stackeffect: f --

Attributes:

Description: The run time action of `ABORT"'  .


File: ci86.lina.info,  Node: HANDLER,  Prev: paren_abort_quote,  Up: ERRORS

HANDLER
-------

Name: `HANDLER'

Stackeffect: -- addr

Attributes:

Description: A user variable address containing a pointer to the last
exception intercepting frame activated by `CATCH'  .  It points into
the return stack.  If there is a `THROW' , the return stack is restored
from `HANDLER'  effecting a multiple level return.  It is called a
frame because more things are restored, such as the position of the
data stack top, and the previous value of `HANDLER'  .

See also: `CATCH'  `THROW'


File: ci86.lina.info,  Node: FILES,  Next: FORMATTING,  Prev: ERRORS,  Up: Glossary

FILES
=====

   The wordset `FILES' contains words to input and output to files, or
load words from files.  They are underlying the `BLOCKS' facilities.

* Menu:



* CLOSE-FILE  ::
* CREATE-FILE  ::
* DELETE-FILE  ::
* GET-FILE  ::
* INCLUDED  ::
* OPEN-FILE  ::
* PUT-FILE  ::
* READ-FILE  ::
* REPOSITION-FILE  ::
* WRITE-FILE  ::
* RW-BUFFER  ::


File: ci86.lina.info,  Node: CLOSE-FILE,  Next: CREATE-FILE,  Prev: FILES,  Up: FILES

CLOSE-FILE
----------

Name: `CLOSE-FILE'

Stackeffect: fileid -- ior

Attributes: ISO

Description: Close the file with file handle in `fileid'. Return a
result code into `ior'. The latter is the  Linux error code negated, to
be inspected using `MESSAGE' .

See also: `OPEN-FILE'  `READ-FILE'  `WRITE-FILE'  `CREATE-FILE'
`DELETE-FILE'


File: ci86.lina.info,  Node: CREATE-FILE,  Next: DELETE-FILE,  Prev: CLOSE-FILE,  Up: FILES

CREATE-FILE
-----------

Name: `CREATE-FILE'

Stackeffect: sc u -- fileid ior

Attributes: NISO

Description: for normal files this is just 0.  .  Create a file with
name `sc' and file access privileges `u'  If the file already exists,
it is truncated to zero length. Return a file handle into `fileid' and
a result code into `ior'.  The latter is the  `errno'  negated, to be
inspected using `MESSAGE'  .  The handle is open for READ_WRITE.

See also: `OPEN-FILE'  `READ-FILE'  `WRITE-FILE'  `CREATE-FILE'
`DELETE-FILE'


File: ci86.lina.info,  Node: DELETE-FILE,  Next: GET-FILE,  Prev: CREATE-FILE,  Up: FILES

DELETE-FILE
-----------

Name: `DELETE-FILE'

Stackeffect: sc -- ior

Attributes: ISO

Description: Delete the file with name `sc'. Return a result code into
`ior'.  The latter is the  `errno'  negated, to be inspected using
`MESSAGE'  .

See also: `OPEN-FILE'  `READ-FILE'  `WRITE-FILE'  `CREATE-FILE'
`DELETE-FILE'


File: ci86.lina.info,  Node: GET-FILE,  Next: INCLUDED,  Prev: DELETE-FILE,  Up: FILES

GET-FILE
--------

Name: `GET-FILE'

Stackeffect: sc1 -- sc2

Attributes:

Description: Get the content of the file with name `sc1'; leave it as a
string `sc2'. Any errors are thrown.

See also: `PUT-FILE'  `OPEN-FILE'  `THROW'


File: ci86.lina.info,  Node: INCLUDED,  Next: OPEN-FILE,  Prev: GET-FILE,  Up: FILES

INCLUDED
--------

Name: `INCLUDED'

Stackeffect: sc1 -- i*x

Attributes: ISO

Description: Interpret the content of the file with name `sc1' as if it
was typed from the console, leaving result `i*x'.

See also: `LOAD'


File: ci86.lina.info,  Node: OPEN-FILE,  Next: PUT-FILE,  Prev: INCLUDED,  Up: FILES

OPEN-FILE
---------

Name: `OPEN-FILE'

Stackeffect: sc fam -- fileid ior

Attributes: ISO

Description: Open the file with name `sc' and file access method `fam'.
Return a file handle into `fileid' and a result code into `ior'. The
latter is the  `errno' error code negated, to be inspected using
`MESSAGE' .   `fam' is one of 0=READ_ONLY, 1=WRITE_ONLY, 2=READ_WRITE.

See also: `OPEN-FILE'  `READ-FILE'  `WRITE-FILE'  `CREATE-FILE'
`DELETE-FILE'


File: ci86.lina.info,  Node: PUT-FILE,  Next: READ-FILE,  Prev: OPEN-FILE,  Up: FILES

PUT-FILE
--------

Name: `PUT-FILE'

Stackeffect: sc1 sc2 --

Attributes:

Description: Save the "string constant" `sc2' to a file with the name
`sc1'. Any errors are thrown.

See also: `GET-FILE'  `OPEN-FILE'  `THROW'


File: ci86.lina.info,  Node: READ-FILE,  Next: REPOSITION-FILE,  Prev: PUT-FILE,  Up: FILES

READ-FILE
---------

Name: `READ-FILE'

Stackeffect: addr n1 fd -- n2 ior

Attributes: ISO

Description: Read `n' characters to `addr' from current position of the
file that is open at `fd' .  `n2' is the number of characters
successfully read, this may be zero. `ior' is 0 for success, or
otherwise  `errno' error code negated, to be inspected using `MESSAGE' .

See also: `OPEN-FILE'  `WRITE-FILE'  `REPOSITION-FILE'  `R\W'


File: ci86.lina.info,  Node: REPOSITION-FILE,  Next: WRITE-FILE,  Prev: READ-FILE,  Up: FILES

REPOSITION-FILE
---------------

Name: `REPOSITION-FILE'

Stackeffect: ud fd -- ior

Attributes: ISO

Description: Position the file that is open at `fd' at position `ud'.
`ior' is 0 for success, or otherwise  `errno' negated . Information
about error codes can be found by `MESSAGE' .

See also: `OPEN-FILE'  `READ-FILE'  `WRITE-FILE'


File: ci86.lina.info,  Node: WRITE-FILE,  Next: RW-BUFFER,  Prev: REPOSITION-FILE,  Up: FILES

WRITE-FILE
----------

Name: `WRITE-FILE'

Stackeffect: addr n fd -- u1

Attributes: ISO

Description: Write `n' characters from `addr' to the file that is open
at `fd' , starting at its current position.  `u1' is 0 for success, or
otherwise  `errno' error code negated, to be inspected using `MESSAGE' .

See also: `OPEN-FILE'  `READ-FILE'  `REPOSITION-FILE'  `R\W'


File: ci86.lina.info,  Node: RW-BUFFER,  Prev: WRITE-FILE,  Up: FILES

RW-BUFFER
---------

Name: `RW-BUFFER'

Stackeffect: -- addr

Attributes:

Description: A constant that leaves the address of a disk buffer used by
file i/o words.

See also: `READ-FILE'  `OPEN-FILE'


File: ci86.lina.info,  Node: FORMATTING,  Next: INIT,  Prev: FILES,  Up: Glossary

FORMATTING
==========

   The wordset `FORMATTING' generates formatted output for numbers,
i.e. printing the digits in a field with a certain width, possibly with
sign etc.  This is possible in any "number base" . (Normally base 10 is
used, which means that digits are found as a remainder by dividing by
10).  Formatting in Forth is always based on "double"  numbers.  Single
numbers are handled by converting them to "double"  first.  This
requires some double precision operators to be present in the Forth
core.  *Note DOUBLE::, wordset. *Note MULTIPLYING::, wordset.

* Menu:



* #>  ::
* #S  ::
* #  ::
* <#  ::
* >NUMBER  ::
* BASE  ::
* DECIMAL  ::
* HEX  ::
* HOLD  ::
* SIGN  ::
* (NUMBER)  :paren_number
* DIGIT  ::
* DPL  ::
* FLD  ::
* HLD  ::
* NUMBER  ::


File: ci86.lina.info,  Node: #>,  Next: #S,  Prev: FORMATTING,  Up: FORMATTING

#>
--

Name: `#>'

Stackeffect: d -- sc

Attributes: ISO,FIG,L0

Description: Terminates numeric output conversion by dropping `d',
leaving the formatted string `sc' .

See also: `<#'


File: ci86.lina.info,  Node: #S,  Next: #,  Prev: #>,  Up: FORMATTING

#S
--

Name: `#S'

Stackeffect: d1 -- d2

Attributes: ISO,FIG,L0

Description: Generates ASCII text in the text output buffer, by the use
of `#' , until a zero double number `d2' results. Used between `<#'  and
`#>' .


File: ci86.lina.info,  Node: #,  Next: <#,  Prev: #S,  Up: FORMATTING

#
-

Name: `#'

Stackeffect: d1 -- d2

Attributes: ISO,FIG,L0

Description: Generate from a double number `d1', the next ASCII
character which is placed in an output string. Result `d2' is the
quotient after division by `BASE' , and is maintained for further
processing.  Used between `<#'  and `#>' .

See also: `#S'


File: ci86.lina.info,  Node: <#,  Next: >NUMBER,  Prev: #,  Up: FORMATTING

<#
--

Name: `<#'

No stackeffect

Attributes: ISO,FIG,L0

Description: Setup for pictured numeric output formatting using the
words: `<#'  `#'  `#S'

   `SIGN'  `#>'  The conversion is done on a double number producing
text growing down from `PAD'

   .

See also: `DPL'  `HLD'  `HOLD'  `FLD'


File: ci86.lina.info,  Node: >NUMBER,  Next: BASE,  Prev: <#,  Up: FORMATTING

>NUMBER
-------

Name: `>NUMBER'

Stackeffect: ud1 addr1 u1 -- ud2 addr2 u2

Attributes: ISO

Description:

   `ud2' is the result of converting the characters within the
character string specified by `addr1 u1' into digits, using the number
in `BASE'  , and adding each into ud1 after multiplying `ud1' by the
number in `BASE'  . Conversion continues until a character that is not
convertible is encountered or the string is entirely converted. `addr2'
is the location of the first unconverted character or the first
character past the end of the string if the string was entirely
converted.  `u2' is the number of unconverted characters in the string.
If `ud2' overflows, in ciforth `ud2' will be incorrect, but no crash
will result.  Both `-' and `+' are considered unconvertible character's
by `>NUMBER' .

See also: `NUMBER'  `DIGIT'


File: ci86.lina.info,  Node: BASE,  Next: DECIMAL,  Prev: >NUMBER,  Up: FORMATTING

BASE
----

Name: `BASE'

Stackeffect: -- addr

Attributes: ISO,FIG,U,L0

Description: A user variable containing the current number base used
for input and output conversion.

See also: `DECIMAL'  `HEX'  `<#'


File: ci86.lina.info,  Node: DECIMAL,  Next: HEX,  Prev: BASE,  Up: FORMATTING

DECIMAL
-------

Name: `DECIMAL'

No stackeffect

Attributes: ISO,FIG,L0

Description: Set the numeric conversion `BASE'  for decimal
input-output.

See also: `HEX'


File: ci86.lina.info,  Node: HEX,  Next: HOLD,  Prev: DECIMAL,  Up: FORMATTING

HEX
---

Name: `HEX'

No stackeffect

Attributes: ISO,FIG,L0

Description: Set the numeric conversion `BASE'  for hexadecimal (base
16) input-output.

See also: `DECIMAL'


File: ci86.lina.info,  Node: HOLD,  Next: SIGN,  Prev: HEX,  Up: FORMATTING

HOLD
----

Name: `HOLD'

Stackeffect: c --

Attributes: ISO,FIG

Description: Add the character `c' to the beginning of the output
string. It must be executed for numeric formatting inside a `<#'  and
`#>'  construct .

See also: `#'  `DIGIT'


File: ci86.lina.info,  Node: SIGN,  Next: paren_number,  Prev: HOLD,  Up: FORMATTING

SIGN
----

Name: `SIGN'

Stackeffect: n --

Attributes: ISO,FIG

Description: Stores an ASCII minus-sign `-' just before a converted
numeric output string in the text output buffer when `n' is negative.
Must be used between `<#'  and `#>'  .

See also: `HOLD'


File: ci86.lina.info,  Node: paren_number,  Next: DIGIT,  Prev: SIGN,  Up: FORMATTING

(NUMBER)
--------

Name: `(NUMBER)'

Stackeffect:  -- d1

Attributes:

Description: Convert the ASCII text at the "current input source"  with
regard to `BASE'  .  The new value is accumulated into double number
`d1' , being left. A decimal point, anywhere, signifies that the input
is to be considered as a double. ISO requires it to be at the end of the
number. ciforth allows any number of decimal points with the same
meaning. ciforth also allows any number of comma's that are just
ignored, to improve readability. If the first unconvertible digit is
not a blank, this is an error.

See also: `NUMBER'  `?BLANK'


File: ci86.lina.info,  Node: DIGIT,  Next: DPL,  Prev: paren_number,  Up: FORMATTING

DIGIT
-----

Name: `DIGIT'

Stackeffect: c n1 -- n2 true (ok) c n1 -- x false (bad)

Attributes:

Description: Converts the ASCII character `c' (using base `n1' ) to its
binary equivalent `n2' , accompanied by a true flag. If the conversion
is invalid, leaves only a don't care value and a false flag.


File: ci86.lina.info,  Node: DPL,  Next: FLD,  Prev: DIGIT,  Up: FORMATTING

DPL
---

Name: `DPL'

Stackeffect: --- addr

Attributes: FIG,U,L0

Description: A user variable containing the address of the decimal
point on double integer input, or a "nil pointer". It may also be used
to hold the output column location of a decimal point, in user
generated formating.

See also: `<#'  `FLD'  `HLD'


File: ci86.lina.info,  Node: FLD,  Next: HLD,  Prev: DPL,  Up: FORMATTING

FLD
---

Name: `FLD'

Stackeffect: -- addr

Attributes: FIG,U

Description: A user variable for control of number output field width.
Unused in the kernel of ciforth.


File: ci86.lina.info,  Node: HLD,  Next: NUMBER,  Prev: FLD,  Up: FORMATTING

HLD
---

Name: `HLD'

Stackeffect: -- addr

Attributes: FIG,L0

Description: A user variable that holds the address of the latest
character of text during numeric output conversion.

See also: `<#'  `DPL'  `FLD'


File: ci86.lina.info,  Node: NUMBER,  Prev: HLD,  Up: FORMATTING

NUMBER
------

Name: `NUMBER'

Stackeffect:  --  s/d

Attributes:

Description:

   This word is intended to be called from single character denotation
words, hence the parse pointer is decremented, to include this first
character.  Convert characters from the current input source into a
number, and compile or execute this number. If the string contains a
decimal point it is a double else a single integer number. If numeric
conversion is not possible, an error message will be given.

See also: `BASE'  `(NUMBER)'


File: ci86.lina.info,  Node: INIT,  Next: INPUT,  Prev: FORMATTING,  Up: Glossary

INIT
====

   The wordset `INIT' contains words to initialise, reinitialise or
configure Forth.

* Menu:



* +ORIGIN  ::
* ABORT  ::
* COLD  ::
* OK  ::
* OPTIONS  ::
* QUIT  ::
* WARM  ::


File: ci86.lina.info,  Node: +ORIGIN,  Next: ABORT,  Prev: INIT,  Up: INIT

+ORIGIN
-------

Name: `+ORIGIN'

Stackeffect: n -- addr

Attributes:

Description: Leave the memory address relative by `n' bytes to the area
from which the user variables are initialised, so one can access or
modify the boot-up parameters. During run time user variables are
fetched from the current user area, via a pointer at `0 +ORIGIN ' .
This can be swapped to get a fresh set of user variables, for
multi-asking. One can access or modify the boot-up parameters, prior to
saving a customised boot image. It will also change the initialisation
by `COLD' .

See also: `USER'


File: ci86.lina.info,  Node: ABORT,  Next: COLD,  Prev: +ORIGIN,  Up: INIT

ABORT
-----

Name: `ABORT'

No stackeffect

Attributes: ISO,FIG,L0

Description: Restart the system. In addition and before the actions of
`QUIT' , clear also the data stack and reset the search order, reset
the exception mechanism and set the numeric base to default.  As
required by ISO it is silent. This may be confusing at times, because
you can't tell the difference between a word that is still busy or that
has aborted.

See also: `WARM'


File: ci86.lina.info,  Node: COLD,  Next: OK,  Prev: ABORT,  Up: INIT

COLD
----

Name: `COLD'

No stackeffect

Attributes: FIG

Description: Reinitialise the system. Clear all block buffers.
Reinitialise all user variables to their boot up values values, i.a. the
stacks and the "dictionary pointer" . Opens the file that contains the
blocks. Restart via `ABORT'  .  May be called from the terminal to
remove application programs and restart, as long as there are no new
vocabularies with definitions.  But it is better to say `BYE'  to Forth
and start again.

See also: `WARM'  `BLOCK'  `LIST'


File: ci86.lina.info,  Node: OK,  Next: OPTIONS,  Prev: COLD,  Up: INIT

OK
--

Name: `OK'

No stackeffect

Attributes: ISO,FIG

Description: Takes care of printing the okay-message, after interpreting
a line. Default it prints "OK" only for an interactive session in
interpret `STATE' .

See also: `QUIT'  `COLD'


File: ci86.lina.info,  Node: OPTIONS,  Next: QUIT,  Prev: OK,  Up: INIT

OPTIONS
-------

Name: `OPTIONS'

Stackeffect: f1 - f2

Attributes: FIG L0

Description: Handle command line options, i.e. execute the screen
corresponding to the option letter. Accept and return a flag `f'
whether the signon message must be displayed. By redefining this as a
`NOOP', the handling of options during cold boot is suppressed, useful
for turnkey applications. By redefining as `DROP 0', execution and
signon are suppressed.

See also: `COLD'


File: ci86.lina.info,  Node: QUIT,  Next: WARM,  Prev: OPTIONS,  Up: INIT

QUIT
----

Name: `QUIT'

No stackeffect

Attributes: ISO,FIG

Description: Restart the interpreter. Clear the return stack, stop
compilation, and return control to the operators terminal, or to the
redirected input stream.  This means `(ACCEPT)'  user input to
somewhere in the terminal input buffer, and then `INTERPRET'  with that
as a `SOURCE'  .  No message is given.

See also: `TIB'  `ABORT'


File: ci86.lina.info,  Node: WARM,  Prev: QUIT,  Up: INIT

WARM
----

Name: `WARM'

No stackeffect

Attributes: FIG L0

Description: Perform a so called "warm" start. In addition and before
the actions of `ABORT' , discard blocks; they may not be written back
to mass storage. Display the sign on message.

See also: `ABORT'


File: ci86.lina.info,  Node: INPUT,  Next: JUGGLING,  Prev: INIT,  Up: Glossary

INPUT
=====

   The wordset `INPUT' contains words to get input from the terminal
and such.  *Note FILES::, for disk I/O.  *Note BLOCKS::, for access of
blocks.

* Menu:



* (ACCEPT)  :paren_accept
* >IN  ::
* ACCEPT  ::
* IN  ::
* KEY?  ::
* KEY  ::
* RUBOUT  ::
* TIB  ::
* (>IN)  :paren_iso_in
* REFILL-TIB  ::
* REMAINDER  ::
* SET-TERM  ::
* TERMIO  ::


File: ci86.lina.info,  Node: paren_accept,  Next: >IN,  Prev: INPUT,  Up: INPUT

(ACCEPT)
--------

Name: `(ACCEPT)'

Stackeffect:  -- sc

Attributes:

Description: Accept characters from the terminal, until a `RET' is
received and return the result as a constant string `sc'.  It doesn't
contain any line ending, but the buffer still does and after `1+'  the
string ends in a `LF'.  The editing functions are the same as with
`ACCEPT'  .  This is lighter on the system and sometimes easier to use
than `ACCEPT'

See also: `KEY'  `KEY?'  `ACCEPT'


File: ci86.lina.info,  Node: >IN,  Next: ACCEPT,  Prev: paren_accept,  Up: INPUT

>IN
---

Name: `>IN'

Stackeffect: -- addr

Attributes: ISO

Description: Return a variable that contains the offset from the start
within the current input text buffer (terminal or disc) from which the
next text will be accepted. All parsing words use and move the value of
`IN' . The variable `>IN'  is not actually used and its content must be
fetched immediately.

See also: `(>IN)'  `IN'


File: ci86.lina.info,  Node: ACCEPT,  Next: IN,  Prev: >IN,  Up: INPUT

ACCEPT
------

Name: `ACCEPT'

Stackeffect: addr count -- n

Attributes: ISO

Description: Transfer at most `count' characters from the terminal to
address, until a `RET' is received. The simple tty editing functions of
Linux are observed, i.e. the "erase" (delete a character) and "kill"
(delete a line) characters. Typically these are the backspace key and
^U. Note that excess characters after `count' are ignored.  The number
of characters not including the `RET' is returned into `n'.

See also: `(ACCEPT)'  `KEY'  `KEY?'  `(ACCEPT)'


File: ci86.lina.info,  Node: IN,  Next: KEY?,  Prev: ACCEPT,  Up: INPUT

IN
--

Name: `IN'

Stackeffect: -- addr

Attributes:

Description: A user variable containing a pointer within the current
input text buffer (terminal or disc) from which the next text will be
accepted. All parsing words use and move the value of `IN'  .

See also: `>IN'  `WORD'  `(WORD)'  `NUMBER'  `(PARSE)'  `IN[]'


File: ci86.lina.info,  Node: KEY?,  Next: KEY,  Prev: IN,  Up: INPUT

KEY?
----

Name: `KEY?'

Stackeffect: -- ff

Attributes: ISO

Description: Return into `ff' return whether a character is available.
The next execution of `KEY'  will return the character immediately.

See also: `KEY'  `ACCEPT'  `KEY?'


File: ci86.lina.info,  Node: KEY,  Next: RUBOUT,  Prev: KEY?,  Up: INPUT

KEY
---

Name: `KEY'

Stackeffect: -- c

Attributes: ISO FIG L0

Description: Leave the ASCII value of the next terminal key struck.

See also: `ACCEPT'  `KEY?'


File: ci86.lina.info,  Node: RUBOUT,  Next: TIB,  Prev: KEY,  Up: INPUT

RUBOUT
------

Name: `RUBOUT'

Stackeffect: -- c

Attributes:

Description: A user variable, leaving the key code that must delete the
last character from the input buffer.  In this ciforth it is not used,
as the terminal input editing is left to the host operating system.

See also: `USER'


File: ci86.lina.info,  Node: TIB,  Next: paren_iso_in,  Prev: RUBOUT,  Up: INPUT

TIB
---

Name: `TIB'

Stackeffect: -- addr

Attributes: ISO,FIG,U

Description: A user variable containing the address of the terminal
input buffer.

See also: `QUIT'


File: ci86.lina.info,  Node: paren_iso_in,  Next: REFILL-TIB,  Prev: TIB,  Up: INPUT

(>IN)
-----

Name: `(>IN)'

Stackeffect: -- addr

Attributes:

Description: If the standard word `>IN'  is used, this variable
contains the offset from the start within the current input text buffer
(terminal or disc) from which the next text will be accepted. All
parsing words use and move the value of `IN'  .

See also: `>IN'  `IN'


File: ci86.lina.info,  Node: REFILL-TIB,  Next: REMAINDER,  Prev: paren_iso_in,  Up: INPUT

REFILL-TIB
----------

Name: `REFILL-TIB'

Stackeffect:  --

Attributes:

Description: Accept characters from the terminal input stream such as to
fill up `TIB'  . Normally this means until a `RET'.  It is now
consumable by `ACCEPT'  or after `SET-SRC'

   by Forth parsing words like `WORD'  .  The editing functions are
those described by `ACCEPT' .  Immediately, after `REFILL-TIB'
`REMAINDER 2@' defines the characters ready in the input buffer. All
characters are retained including the `RET'.

   If the input is redirected (such that reading after a `RET' occurs)
`REMAINDER 2@' contains the part of `TIB'  that is not yet consumed by
`(ACCEPT)'  , and outside the reach of `SRC'  .

   All system call errors result in an exception.  For redirected I/O
this word may generate an end-of-pipe exception.

See also: `ACCEPT'  `(ACCEPT)'


File: ci86.lina.info,  Node: REMAINDER,  Next: SET-TERM,  Prev: REFILL-TIB,  Up: INPUT

REMAINDER
---------

Name: `REMAINDER'

Stackeffect: -- addr

Attributes:

Description: A pointer to a constant string that contains the balance of
characters fetched into the input buffer, but not yet consumed.  Used
as in `REMAINDER 2@' .

See also: `REFILL-TIB'


File: ci86.lina.info,  Node: SET-TERM,  Next: TERMIO,  Prev: REMAINDER,  Up: INPUT

SET-TERM
--------

Name: `SET-TERM'

Stackeffect: len b --

Attributes:

Description: Set the terminal length to `len' and toggle the c_lflag
field with `b' in the termio structure `TERMIO'  .  In particular
toggling with 0x0A makes that the terminal doesn't wait for a `RET'.
This word is invalid for pipes, and is replaced by a `2DROP'  in that
case.

See also: `SET-TERM'


File: ci86.lina.info,  Node: TERMIO,  Prev: SET-TERM,  Up: INPUT

TERMIO
------

Name: `TERMIO'

Stackeffect: -- addr

Attributes:

Description: Leave the address of the terminal description, this has
the layout of a c-structure `termio' .

See also: `SET-TERM'


File: ci86.lina.info,  Node: JUGGLING,  Next: LOGIC,  Prev: INPUT,  Up: Glossary

JUGGLING
========

   The wordset `JUGGLING' contains words that change order of data on
the "data stack"  .  The necessity for this arise, because the data you
want to feed to a Forth word is not directly accessible, i.e. on top of
the stack.  It is also possible that  you need the same data twice,
because you have to feed it to two different words's.  Design your word
such that you need them as little as possible, because they are
confusing.

* Menu:



* 2DROP  ::
* 2DUP  ::
* 2OVER  ::
* 2SWAP  ::
* ?DUP  ::
* DROP  ::
* DUP  ::
* OVER  ::
* ROT  ::
* SWAP  ::


File: ci86.lina.info,  Node: 2DROP,  Next: 2DUP,  Prev: JUGGLING,  Up: JUGGLING

2DROP
-----

Name: `2DROP'

Stackeffect: n1 n2 --

Attributes: ISO

Description: Drop the topmost two numbers (or one double number)  from
the stack.

See also: `DROP'  `2DUP'


File: ci86.lina.info,  Node: 2DUP,  Next: 2OVER,  Prev: 2DROP,  Up: JUGGLING

2DUP
----

Name: `2DUP'

Stackeffect: d -- d d

Attributes: ISO

Description: Duplicate the double number on the stack.

See also: `OVER'


File: ci86.lina.info,  Node: 2OVER,  Next: 2SWAP,  Prev: 2DUP,  Up: JUGGLING

2OVER
-----

Name: `2OVER'

Stackeffect: d1 d2 -- d1 d2 d1

Attributes: ISO

Description: Copy the second stack double, placing it as the new top.

See also: `2DUP'


File: ci86.lina.info,  Node: 2SWAP,  Next: ?DUP,  Prev: 2OVER,  Up: JUGGLING

2SWAP
-----

Name: `2SWAP'

Stackeffect: d1 d2 -- d2 d1

Attributes: ISO

Description: Exchange the top doubles on the stack.

See also: `ROT'


File: ci86.lina.info,  Node: ?DUP,  Next: DROP,  Prev: 2SWAP,  Up: JUGGLING

?DUP
----

Name: `?DUP'

Stackeffect: n1 -- n1 (if zero) / n1 -- n1 n1 (non-zero)

Attributes: ISO,FIG,L0

Description: Reproduce `n1' only if it is non-zero. This is usually
used to copy a value just before `IF'  , to eliminate the need for an
`ELSE'  part to drop it.

See also: `DUP'  `_'


File: ci86.lina.info,  Node: DROP,  Next: DUP,  Prev: ?DUP,  Up: JUGGLING

DROP
----

Name: `DROP'

Stackeffect: n --

Attributes: ISO,FIG,L0

Description: Drop the number from the stack.

See also: `DUP'


File: ci86.lina.info,  Node: DUP,  Next: OVER,  Prev: DROP,  Up: JUGGLING

DUP
---

Name: `DUP'

Stackeffect: n -- n n

Attributes: ISO,FIG,L0

Description: Duplicate the value on the stack.

See also: `OVER'


File: ci86.lina.info,  Node: OVER,  Next: ROT,  Prev: DUP,  Up: JUGGLING

OVER
----

Name: `OVER'

Stackeffect: nl n2 -- nl n2 n1

Attributes: ISO,FIG,L0

Description: Copy the second stack value, placing it as the new top.

See also: `DUP'


File: ci86.lina.info,  Node: ROT,  Next: SWAP,  Prev: OVER,  Up: JUGGLING

ROT
---

Name: `ROT'

Stackeffect: nl n2 n3 -- n2 n3 nl

Attributes: ISO,FIG,L0

Description: Rotate the top three values on the stack, bringing the
third to the top.

See also: `SWAP'


File: ci86.lina.info,  Node: SWAP,  Prev: ROT,  Up: JUGGLING

SWAP
----

Name: `SWAP'

Stackeffect: n1 n2 -- n2 n1

Attributes: ISO,FIG,L0

Description: Exchange the top two values on the stack.

See also: `ROT'


File: ci86.lina.info,  Node: LOGIC,  Next: MEMORY,  Prev: JUGGLING,  Up: Glossary

LOGIC
=====

   The wordset `LOGIC' contains logic operators and comparison
operators.  A comparison operator (such as `='  ) delivers a "Forth
flag" , -1 for true, 0 for false, representing a condition (such as
equality of two numbers).  The number -1 has all bits set to one.  The
logical operators ( `AND'  etc.)  work on all 32 bits, one by one.  In
this way they are useful for mask operations, as well as for combining
conditions represented as flag's.  But beware that `IF'  only cares
whether the top of the stack is non-zero, such that `-'  can mean
non-equal to `IF' .  Such conditions (often named just "flag" 's)
cannot be directly combined using logical operators, but `0= 0=' can
help.

* Menu:



* 0<  ::
* 0=  ::
* <>  ::
* <  ::
* =  ::
* >  ::
* AND  ::
* INVERT  ::
* OR  ::
* U<  ::
* XOR  ::


File: ci86.lina.info,  Node: 0<,  Next: 0=,  Prev: LOGIC,  Up: LOGIC

0<
--

Name: `0<'

Stackeffect: n -- ff

Attributes: ISO,FIG,L0

Description: Leave a true flag if the number is less than zero
(negative), otherwise leave a false flag.

See also: `<'


File: ci86.lina.info,  Node: 0=,  Next: <>,  Prev: 0<,  Up: LOGIC

0=
--

Name: `0='

Stackeffect: n -- ff

Attributes: ISO,FIG,L0

Description: Leave a true flag `ff' is the number `n' is equal to zero,
otherwise leave a false flag.

See also: `='


File: ci86.lina.info,  Node: <>,  Next: <,  Prev: 0=,  Up: LOGIC

<>
--

Name: `<>'

Stackeffect: n1 n2 -- ff

Attributes: ISO,L0

Description: Leave a true flag if `n1' is not equal than `n2' ;
otherwise leave a false flag.

See also: `>'  `='  `0<'


File: ci86.lina.info,  Node: <,  Next: =,  Prev: <>,  Up: LOGIC

<
-

Name: `<'

Stackeffect: n1 n2 -- ff

Attributes: L0,ISO

Description: Leave a true flag if `n1' is less than `n2' ; otherwise
leave a false flag.

See also: `='  `>'  `0<'


File: ci86.lina.info,  Node: =,  Next: >,  Prev: <,  Up: LOGIC

=
-

Name: `='

Stackeffect: n1 n2 -- ff

Attributes: ISO,FIG,L0

Description: Leave a true flag if `n1=n2' ; otherwise leave a false
flag.

See also: `<'  `>'  `0='  `-'


File: ci86.lina.info,  Node: >,  Next: AND,  Prev: =,  Up: LOGIC

>
-

Name: `>'

Stackeffect: n1 n2 -- ff

Attributes: ISO,L0

Description: Leave a true flag if `n1' is greater than `n2' ; otherwise
leave a false flag.

See also: `<'  `='  `0<'


File: ci86.lina.info,  Node: AND,  Next: INVERT,  Prev: >,  Up: LOGIC

AND
---

Name: `AND'

Stackeffect: n1 n2 -- n3

Attributes: ISO,FIG,L0

Description: Leave the bitwise logical and of `n1' and `n2' as `n3' .

See also: `XOR'  `OR'


File: ci86.lina.info,  Node: INVERT,  Next: OR,  Prev: AND,  Up: LOGIC

INVERT
------

Name: `INVERT'

Stackeffect: n1 -- n2

Attributes: ISO,L1

Description: Invert all bits of `n1' leaving `n2' .  For pure flags (0
or -1) this is the "logical not"  operator.

See also: `AND'  `OR'


File: ci86.lina.info,  Node: OR,  Next: U<,  Prev: INVERT,  Up: LOGIC

OR
--

Name: `OR'

Stackeffect: n1 n2 -- n3

Attributes: ISO,FIG,L0

Description: Leave the bit-wise logical or of two 32-bit values.

See also: `AND'  `XOR'


File: ci86.lina.info,  Node: U<,  Next: XOR,  Prev: OR,  Up: LOGIC

U<
--

Name: `U<'

Stackeffect: u1 u2 -- ff

Attributes: ISO,L0

Description: Leave a true flag if `u1' is less than `u2' ; otherwise
leave a false flag.(Interpreted as unsigned numbers).

See also: `<'


File: ci86.lina.info,  Node: XOR,  Prev: U<,  Up: LOGIC

XOR
---

Name: `XOR'

Stackeffect: nl n2 -- n3

Attributes: L1

Description: Leave the bitwise logical exclusive or of two  32-bit
values.

See also: `AND'  `OR'


File: ci86.lina.info,  Node: MEMORY,  Next: MISC,  Prev: LOGIC,  Up: Glossary

MEMORY
======

   The wordset `MEMORY' contains words to fetch and store numbers from
"double" s, "cell" s or bytes in memory.  There are also words to copy
blocks of memory or fill them, and words that fetch a "cell" , operate
on it and store it back.

* Menu:



* !  ::
* +!  ::
* 2!  ::
* 2@  :two_fetch
* @  :fetch
* ALIGNED  ::
* ALIGN  ::
* BLANK  ::
* BM  ::
* C!  ::
* C@  :c_fetch
* CELL+  ::
* CELLS  ::
* CHAR+  ::
* CHARS  ::
* CMOVE  ::
* CORA  ::
* EM  ::
* ERASE  ::
* FARMOVE  ::
* FILL  ::
* L!  ::
* L@  :long_fetch
* MOVE  ::
* P!  ::
* P@  :port_fetch
* PC!  ::
* PC@  :port_char_fetch
* TOGGLE  ::
* WITHIN  ::


File: ci86.lina.info,  Node: !,  Next: +!,  Prev: MEMORY,  Up: MEMORY

!
-

Name: `!'

Stackeffect: n addr --

Attributes: ISO,FIG,L0

Description: Store all 32 bits of n at `addr' .

See also: `@'  `C!'  `2!'  `L!'  `P!'  `PC!'


File: ci86.lina.info,  Node: +!,  Next: 2!,  Prev: !,  Up: MEMORY

+!
--

Name: `+!'

Stackeffect: n addr --

Attributes: ISO,FIG,L0

Description:  Add `n' to the value `addr'.

See also: `TOGGLE'  `!'


File: ci86.lina.info,  Node: 2!,  Next: two_fetch,  Prev: +!,  Up: MEMORY

2!
--

Name: `2!'

Stackeffect: addr-- x1 x2

Attributes: ISO

Description: Store a pair of 32 bits values `x1' `x2' to consecutive
cells at `addr' .  `x2' is stored at the lowest address.

See also: `2@'  `!'  `C!'


File: ci86.lina.info,  Node: two_fetch,  Next: fetch,  Prev: 2!,  Up: MEMORY

2@
--

Name: `2@'

Stackeffect: addr-- x1 x2

Attributes: ISO

Description: Leave a pair of 32 bits values `x1' `x2' from consequitive
cells at `addr' . `x2' is fetched from the lowest address.

See also: `2!'  `@'  `C@'


File: ci86.lina.info,  Node: fetch,  Next: ALIGNED,  Prev: two_fetch,  Up: MEMORY

@
-

Name: `@'

Stackeffect: addr -- n

Attributes: ISO,FIG,L0

Description: Leave the 32 bit contents `n' of `addr' .

See also: `!'  `C@'  `2@'  `P@'  `PC@'  `L@'


File: ci86.lina.info,  Node: ALIGNED,  Next: ALIGN,  Prev: fetch,  Up: MEMORY

ALIGNED
-------

Name: `ALIGNED'

Stackeffect: addr1 -- addr2

Attributes: ISO

Description: Make sure that `addr1' is "aligned"  by advancing it if
necessary to `addr2'.

See also: `ALIGN'


File: ci86.lina.info,  Node: ALIGN,  Next: BLANK,  Prev: ALIGNED,  Up: MEMORY

ALIGN
-----

Name: `ALIGN'

Stackeffect:  --

Attributes: ISO

Description: Make sure that `HERE'  is "aligned"  by advancing it if
necessary.  This means that data of any size can be fetched from that
address efficiently.

See also: `ALIGNED'


File: ci86.lina.info,  Node: BLANK,  Next: BM,  Prev: ALIGN,  Up: MEMORY

BLANK
-----

Name: `BLANK'

Stackeffect: addr count --

Attributes: ISO

Description: This is shorthand for "`BL'  `FILL' ".


File: ci86.lina.info,  Node: BM,  Next: C!,  Prev: BLANK,  Up: MEMORY

BM
--

Name: `BM'

Stackeffect: --- addr

Attributes:

Description: A constant leaving the address of the lowest memory in use
by Forth.

See also: `DP'  `EM'


File: ci86.lina.info,  Node: C!,  Next: c_fetch,  Prev: BM,  Up: MEMORY

C!
--

Name: `C!'

Stackeffect: b addr --

Attributes: ISO

Description: Store 8 bits of `b' at `addr' .  In ciforth , running on
the Intel architectures there are no restrictions regarding byte
addressing.

See also: `C@'  `!'


File: ci86.lina.info,  Node: c_fetch,  Next: CELL+,  Prev: C!,  Up: MEMORY

C@
--

Name: `C@'

Stackeffect: addr -- b

Attributes: ISO

Description: Leave the 8 bit contents of memory address.  In ciforth ,
running on the Intel architectures there are no restrictions regarding
byte addressing.

See also: `C!'  `@'  `2@'


File: ci86.lina.info,  Node: CELL+,  Next: CELLS,  Prev: c_fetch,  Up: MEMORY

CELL+
-----

Name: `CELL+'

Stackeffect: n1 -- n2

Attributes: ISO

Description: Advance the memory pointer `n1' by one (in this case  32
bits) cell to `n2'. This is invaluable for writing portable code. Much
of the library code of ciforth runs on both 16 and 32 bits systems,
thanks to this.


File: ci86.lina.info,  Node: CELLS,  Next: CHAR+,  Prev: CELL+,  Up: MEMORY

CELLS
-----

Name: `CELLS'

Stackeffect: n1 -- n2

Attributes: ISO

Description: Return the equivalent of `n1' cells in bytes: `n2'. This
is invaluable for writing portable code. Much of the library code of
ciforth runs on both 16 and 32 bits systems, thanks to this.

See also: `CELL+'


File: ci86.lina.info,  Node: CHAR+,  Next: CHARS,  Prev: CELLS,  Up: MEMORY

CHAR+
-----

Name: `CHAR+'

Stackeffect: n1 -- n2

Attributes: ISO

Description: Advance the memory pointer `n1' by one character to `n2'.
In ciforth this means one byte. Bytes are the address units ISO is
talking about. Unfortunately the ISO standard has no way to address
bytes.

See also: `CELL+'


File: ci86.lina.info,  Node: CHARS,  Next: CMOVE,  Prev: CHAR+,  Up: MEMORY

CHARS
-----

Name: `CHARS'

Stackeffect: n1 -- n2

Attributes: ISO

Description: Return the equivalent of `n1' chars in bytes: `n2'. In
ciforth this is a NOOP.  Unfortunately the ISO standard has no way to
address bytes.

See also: `CELLS'


File: ci86.lina.info,  Node: CMOVE,  Next: CORA,  Prev: CHARS,  Up: MEMORY

CMOVE
-----

Name: `CMOVE'

Stackeffect: from to count --

Attributes:

Description: Move the specified quantity of characters beginning at
address  `from' to address `to' . The contents of address from is moved
first proceeding toward high memory, such that memory propagation
occurs. As the Intel 86-family is byte-addressing there are no
restrictions in ciforth.


File: ci86.lina.info,  Node: CORA,  Next: EM,  Prev: CMOVE,  Up: MEMORY

CORA
----

Name: `CORA'

Stackeffect: addr1 addr2 len  - n

Attributes: CIF

Description: Compare the memory areas at `addr1' and `addr2' over a
length `len' .  For the first bytes that differ, return -1 if the byte
from `addr1' is less (unsigned) than the one from `addr2', and 1 if it
is greater.  If all `len' bytes are equal, return zero.  This is an
abbreviation of `COMPARE-AREA' .  It would have been named `COMPARE' ,
if that were not taken by ISO.


File: ci86.lina.info,  Node: EM,  Next: ERASE,  Prev: CORA,  Up: MEMORY

EM
--

Name: `EM'

Stackeffect: --- addr

Attributes:

Description: A constant leaving the address just above the highest
memory in use by Forth.

See also: `DP'  `BM'


File: ci86.lina.info,  Node: ERASE,  Next: FARMOVE,  Prev: EM,  Up: MEMORY

ERASE
-----

Name: `ERASE'

Stackeffect: addr n --

Attributes: ISO

Description: This is shorthand for `0 FILL'.

See also: `BLANK'  `FILL'


File: ci86.lina.info,  Node: FARMOVE,  Next: FILL,  Prev: ERASE,  Up: MEMORY

FARMOVE
-------

Name: `FARMOVE'

Stackeffect: faraddr1 faraddr2 count --

Attributes:

Description: Move `count' bytes beginning at `faraddr1' to `faraddr2'.
Segments that are zero are replaced by defaults: data segment selector
for source, extra segment selector for destination.  Copying is done
from low to high offset, so there may be memory propagating. This is
not easily seen from the selector 's, particularly not so in protected
mode.  As the Intel 86-family is byte-addressing there are no
restrictions.

See also: `MOVE'  `CMOVE'


File: ci86.lina.info,  Node: FILL,  Next: L!,  Prev: FARMOVE,  Up: MEMORY

FILL
----

Name: `FILL'

Stackeffect: addr u b --

Attributes: ISO,FIG,L0

Description:  If `u' is not zero, store `b' in each of `u' consecutive
bytes of memory beginning at `addr' .

See also: `BLANK'  `ERASE'


File: ci86.lina.info,  Node: L!,  Next: long_fetch,  Prev: FILL,  Up: MEMORY

L!
--

Name: `L!'

Stackeffect: n faraddr --

Attributes:

Description: Store 32 bits of `n' at segment address pair `faraddr'.

See also: `L@'  `!'  `C!'  `2!'


File: ci86.lina.info,  Node: long_fetch,  Next: MOVE,  Prev: L!,  Up: MEMORY

L@
--

Name: `L@'

Stackeffect: faraddr -- n

Attributes:

Description: Leave the 32 bit contents of segment address pair
`faraddr'.

See also: `L!'  `@'  `C@'  `2@'


File: ci86.lina.info,  Node: MOVE,  Next: P!,  Prev: long_fetch,  Up: MEMORY

MOVE
----

Name: `MOVE'

Stackeffect: from to count --

Attributes:

Description: Move the `count' bytes beginning at address `from' to
address `to', such that the destination area contains what the source
area contained, regardless of overlaps.  As the Intel 86-family is
byte-addressing there are no restrictions.


File: ci86.lina.info,  Node: P!,  Next: port_fetch,  Prev: MOVE,  Up: MEMORY

P!
--

Name: `P!'

Stackeffect: n port --

Attributes:

Description: Store the 32 bit data `n' to the port address `port'.  In
practice on a IBM PC architecture a port address is 10 bits. You can
use ports only after asking permission (using e.g. `ioperm' ) and being
super user.

See also: `P@'  `PC!'  `PC@'  `!'


File: ci86.lina.info,  Node: port_fetch,  Next: PC!,  Prev: P!,  Up: MEMORY

P@
--

Name: `P@'

Stackeffect: port -- n

Attributes:

Description: Fetch the 32 bit contents `n' from the port address
`port'. A port address is always 16 bits.  In practice on a IBM PC
architecture a port address is 10 bits. You can use ports only after
asking permission (using e.g. `ioperm' ) and being super user.

See also: `P!'  `PC@'  `PC!'  `@'


File: ci86.lina.info,  Node: PC!,  Next: port_char_fetch,  Prev: port_fetch,  Up: MEMORY

PC!
---

Name: `PC!'

Stackeffect: b port --

Attributes:

Description: Store a byte `b' to the port address `port'.  A port
address is always 16 bits.  In practice on a IBM PC architecture a port
address is 10 bits. You can use ports only after asking permission
(using e.g. `ioperm' ) and being super user.

See also: `PC@'  `P!'  `P@'  `!'


File: ci86.lina.info,  Node: port_char_fetch,  Next: TOGGLE,  Prev: PC!,  Up: MEMORY

PC@
---

Name: `PC@'

Stackeffect: port -- b

Attributes:

Description: Fetch a byte `b' from the port address `port'. A port
address is always 16 bits.  In practice on a IBM PC architecture a port
address is 10 bits. You can use ports only after asking permission
(using e.g. `ioperm' ) and being super user.

See also: `PC!'  `P@'  `P!'  `@'


File: ci86.lina.info,  Node: TOGGLE,  Next: WITHIN,  Prev: port_char_fetch,  Up: MEMORY

TOGGLE
------

Name: `TOGGLE'

Stackeffect: addr b --

Attributes: NFIG

Description: Complement the contents of `addr' by the bit pattern `b' .

See also: `XOR'  `+! '


File: ci86.lina.info,  Node: WITHIN,  Prev: TOGGLE,  Up: MEMORY

WITHIN
------

Name: `WITHIN'

Stackeffect: n1 n2 n3 -- ff

Attributes: ISO

Description: Return a flag indicating that `n1' is in the range `n2'
(inclusive) to `n3' (non-inclusive).  This works for signed as well as
unsigned numbers.  This is shorthand for: `OVER - >R - R U<'

See also: `<'  `U<'


File: ci86.lina.info,  Node: MISC,  Next: MULTIPLYING,  Prev: MEMORY,  Up: Glossary

MISC
====

   The wordset `MISC' contains words that defy categorisation.

* Menu:



* .SIGNON  :dot_cpu
* EXECUTE  ::
* NOOP  ::
* TASK  ::
* U0  ::
* _  ::


File: ci86.lina.info,  Node: dot_cpu,  Next: EXECUTE,  Prev: MISC,  Up: MISC

.SIGNON
-------

Name: `.SIGNON'

Stackeffect: --

Attributes:

Description: Print a message identifying the version of this Forth.
The name of the processor known from the environment query `CPU'  is
printed using the bizarre convention of a base-36 number. This is a
tribute to those FIG-pioneers.

See also: `ABORT'  `COLD'


File: ci86.lina.info,  Node: EXECUTE,  Next: NOOP,  Prev: dot_cpu,  Up: MISC

EXECUTE
-------

Name: `EXECUTE'

Stackeffect: xt --

Attributes: ISO,FIG,L0

Description: Execute the definition whose "execution token"  is given
by `xt' . The "code field address"  serves as an execution token.  (It
even has offset 0, but one should not assume that a "DEA"  is an
execution token in portable code.)

See also: `''  `>CFA'


File: ci86.lina.info,  Node: NOOP,  Next: TASK,  Prev: EXECUTE,  Up: MISC

NOOP
----

Name: `NOOP'

No stackeffect

Attributes:

Description: Do nothing. Primarily useful as a placeholder.


File: ci86.lina.info,  Node: TASK,  Next: U0,  Prev: NOOP,  Up: MISC

TASK
----

Name: `TASK'

No stackeffect

Attributes:

Description: A no-operation word which marks the boundary between the
forth system and applications.

See also: `COLD'


File: ci86.lina.info,  Node: U0,  Next: _,  Prev: TASK,  Up: MISC

U0
--

Name: `U0'

Stackeffect: -- addr

Attributes:

Description: A user variable, leaving the start address of the user
area. This is for reference only. What is taken into account by user
variables is the initialisation variable at `0 +ORIGIN' .  This might
be used for task switching.

See also: `USER'  `+ORIGIN'


File: ci86.lina.info,  Node: _,  Prev: U0,  Up: MISC

_
-

Name: `_'

Stackeffect: -- x

Attributes:

Description: Leave an undefined value `x'.  Presumably it is to be
dropped at some time, or it is a place holder.


File: ci86.lina.info,  Node: MULTIPLYING,  Next: OPERATINGSYSTEM,  Prev: MISC,  Up: Glossary

MULTIPLYING
===========

   The original 16 bits Forth's have problems with overflow (*note
OPERATOR::).  Operators with intermediate results of double precision,
mostly scaling operators, solve this and are present in the
`MULTIPLYING' wordset. In this 32-bit Forth you will have less need.
Formatting is done with "double" 's exclusively, and relies on this
wordset. Operators with mixed precision and unsigned operators allow to
build arbitrary precision operators from them in "high level"  code.

* Menu:



* */MOD  ::
* */  ::
* FM/MOD  ::
* M*  ::
* M/MOD  ::
* SM/REM  ::
* UM*  ::
* UM/MOD  ::


File: ci86.lina.info,  Node: */MOD,  Next: */,  Prev: MULTIPLYING,  Up: MULTIPLYING

*/MOD
-----

Name: `*/MOD'

Stackeffect: n1 n2 n3 -- n4 n5

Attributes: ISO,FIG,L0

Description: Leave the quotient `n5' and remainder `n4' of the
operation `n1*n2/n3' (using "symmetric division" ).  A double precision
intermediate product is used giving correct results, unless `n4' or
`n5' overflows.   `n1 n2 * n3 /' gives an incorrect answer as soon as
`n1 n2 *' overflows.

See also: `*/'  `/MOD'


File: ci86.lina.info,  Node: */,  Next: FM/MOD,  Prev: */MOD,  Up: MULTIPLYING

*/
--

Name: `*/'

Stackeffect: n1 n2 n3 -- n4

Attributes: ISO,FIG,L0

Description: Leave the ratio `n4 = n1*n2/n3' where all are signed
numbers(using "symmetric division" ).  A double precision intermediate
product is used giving correct results, unless `n4' overflows.

See also: `*/MOD'  `/MOD'


File: ci86.lina.info,  Node: FM/MOD,  Next: M*,  Prev: */,  Up: MULTIPLYING

FM/MOD
------

Name: `FM/MOD'

Stackeffect: d n1 -- n2 n3

Attributes: ISO

Description: A mixed magnitude math operator which leaves the signed
remainder `n2' and signed quotient `n3' from a double number dividend
`d' and divisor `n1'. This is floored division, i.e.  the remainder
takes its sign from the divisor.

See also: `SM/REM'  `M/MOD'  `/'  `M*'


File: ci86.lina.info,  Node: M*,  Next: M/MOD,  Prev: FM/MOD,  Up: MULTIPLYING

M*
--

Name: `M*'

Stackeffect: n1 n2 -- d

Attributes: ISO,FIG,L0

Description: A mixed magnitude math operation which leaves the double
number `d' : the signed product of two signed number `n1' and `n2' .

See also: `M/MOD'  `SM/REM'  `*'


File: ci86.lina.info,  Node: M/MOD,  Next: SM/REM,  Prev: M*,  Up: MULTIPLYING

M/MOD
-----

Name: `M/MOD'

Stackeffect: ud1 u2 -- u3 ud4

Attributes: CIF,FIG

Description: An unsigned mixed magnitude math operation which leaves a
double quotient `ud4' and remainder `u3' , from a double dividend `ud1'
and single divisor `u2'.

See also: `UM/MOD'  `SM/REM'  `M*'


File: ci86.lina.info,  Node: SM/REM,  Next: UM*,  Prev: M/MOD,  Up: MULTIPLYING

SM/REM
------

Name: `SM/REM'

Stackeffect: d n1 -- n2 n3

Attributes: ISO

Description: A mixed magnitude math operator which leaves the signed
remainder `n2' and signed quotient `n3' from a double number dividend
`d' and divisor `n1'. This is a symmetric division, i.e.  the remainder
takes its sign from the dividend.

See also: `M/MOD'  `/'  `M*'


File: ci86.lina.info,  Node: UM*,  Next: UM/MOD,  Prev: SM/REM,  Up: MULTIPLYING

UM*
---

Name: `UM*'

Stackeffect: u1 u2 -- ud

Attributes: ISO

Description: A mixed magnitude math operation which leaves the double
number `ud' : the unsigned product of two unsigned numbers `u1' and
`u2' .

See also: `UM/MOD'  `M*'  `*'


File: ci86.lina.info,  Node: UM/MOD,  Prev: UM*,  Up: MULTIPLYING

UM/MOD
------

Name: `UM/MOD'

Stackeffect: ud u1 -- u2 u3

Attributes: ISO

Description: Leave the unsigned remainder `u2' and unsigned quotient
`u3' from the unsigned double dividend `ud' and unsigned divisor `u1' .

See also: `UM*'  `SM/REM'  `/'


File: ci86.lina.info,  Node: OPERATINGSYSTEM,  Next: OPERATOR,  Prev: MULTIPLYING,  Up: Glossary

OPERATINGSYSTEM
===============

   The wordset `OPERATINGSYSTEM' contains words that call the
underlying operating system or functions available in the BIOS-rom.

* Menu:



* ARGS  ::
* BYE  ::
* EXIT-CODE  ::
* LINOS5  ::
* LINOS  ::
* MS  ::
* SHELL  ::
* SYSTEM  ::
* ZEN  ::


File: ci86.lina.info,  Node: ARGS,  Next: BYE,  Prev: OPERATINGSYSTEM,  Up: OPERATINGSYSTEM

ARGS
----

Name: `ARGS'

Stackeffect: -- addr

Attributes:

Description:  Return the addr of `ARGS'  a user variable that contains
a system dependant pointer to any arguments that are passed from the
operating system to ciforth during startup.

   In this ciforth it points to an area with the argument count,
followed by a a null ended array of arguments strings, then by a null
ended array of environment strings.

See also: `SYSTEM'


File: ci86.lina.info,  Node: BYE,  Next: EXIT-CODE,  Prev: ARGS,  Up: OPERATINGSYSTEM

BYE
---

Name: `BYE'

Stackeffect: --

Attributes: ISO

Description: Return to the host environment Linux.

See also: `COLD'  `EXIT-CODE'


File: ci86.lina.info,  Node: EXIT-CODE,  Next: LINOS5,  Prev: BYE,  Up: OPERATINGSYSTEM

EXIT-CODE
---------

Name: `EXIT-CODE'

Stackeffect: addr --

Attributes:

Description: Return `addr' the address of a variable with the exit
code. Its content is passed to the host environment while going `BYE'
. It is custom to return zero if there are no errors.  Linux allows
only single byte return codes.

See also: `BYE'


File: ci86.lina.info,  Node: LINOS5,  Next: LINOS,  Prev: EXIT-CODE,  Up: OPERATINGSYSTEM

LINOS5
------

Name: `LINOS5'

Stackeffect: n1 n2 n3 n4 n5 n--ret

Attributes:

Description:  Do a Linux system call `n' (man 2) with parameters `n1 n2
n3 n4 n5'. `ret' is the return value of the call. If it is negative, it
is mostly an error, such as known by `errno' . This makes available all
facilities present in Linux.

See also: `?ERRUR'


File: ci86.lina.info,  Node: LINOS,  Next: MS,  Prev: LINOS5,  Up: OPERATINGSYSTEM

LINOS
-----

Name: `LINOS'

Stackeffect: n1 n2 n3 n--ret

Attributes:

Description:  Do a Linux system call `n' (man 2) with parameters `n1 n2
n3'.  `ret' is the return value of the call. If it is negative, it is
mostly an error, such as known by `errno' . This makes available all
facilities present in Linux, except those with 4 or 5 parameters that
are handled by `LINOS5'  .

See also: `?ERRUR'


File: ci86.lina.info,  Node: MS,  Next: SHELL,  Prev: LINOS,  Up: OPERATINGSYSTEM

MS
--

Name: `MS'

Stackeffect: n --

Attributes: ISO

Description:  Wait for `n' milliseconds.

See also: `KEY?'


File: ci86.lina.info,  Node: SHELL,  Next: SYSTEM,  Prev: MS,  Up: OPERATINGSYSTEM

SHELL
-----

Name: `SHELL'

Stackeffect: --addr

Attributes:

Description: Leave the address `addr' of a counted string, the name of
a file that contains the command interpreter, or shell.  This name may
be changed an is used by the  `SYSTEM'  command.  The name may contain
a path and be at most 252 characters long.  The default name is
`/bin/sh' .   are reserved for a start up stack.)

See also: `SYSTEM'


File: ci86.lina.info,  Node: SYSTEM,  Next: ZEN,  Prev: SHELL,  Up: OPERATINGSYSTEM

SYSTEM
------

Name: `SYSTEM'

Stackeffect: sc --

Attributes: ISO

Description: Have the operating system execute the command contained in
the string `sc'.

See also: `BLOCK'  `?ERROR'  `?ERRUR'


File: ci86.lina.info,  Node: ZEN,  Prev: SYSTEM,  Up: OPERATINGSYSTEM

ZEN
---

Name: `ZEN'

Stackeffect: sc -- addr

Attributes:

Description: Leaves an address that contains a zero-ended (c-type)
equivalent of `sc'.  The same buffer is reused, such that this word is
not reentrant.  Use the word immediately, e.g. its intended used is
passing parameters to the operating system. In fact this is `RW-BUFFER'
.

See also: `OPEN-FILE'  `LINOS'  `LINOS5'


File: ci86.lina.info,  Node: OPERATOR,  Next: OUTPUT,  Prev: OPERATINGSYSTEM,  Up: Glossary

OPERATOR
========

   The wordset `OPERATOR' contains the familiar operators for addition,
multiplication etc.  The result of the operation is always an integer
number, so division can't be precise.  On ciforth all division
operations are compatible with "symmetric division" .

   The ISO standard require a Forth to choose between floored or
symmetric division for its standard operations.  Divisions involving
negative numbers have an interpretation problem.  In any case we want
the combination of `/'  and `MOD'  (remainder) to be such that you can
get the original `n' back from the two values left by `n m MOD' and  `n
m /' by performing `m * +' .  This is true for all Forth's.  On ciforth
the `/'  is a "symmetric division" , i.e.  `-n m /' give the same
result as `n m /', but negated.  The foregoing rule now has the
consequence that `m MOD' has `2|m|-1' possible outcomes instead of
`|m|' .  This is very worrysome for mathematicians, who stick to the
rule that `m MOD' has `|m|' outcomes: `0 ... |m|-1', or `-|m|+1 ... 0 '
for negative numbers. ("floored division" ).

* Menu:



* *  :star
* +  ::
* -  ::
* /MOD  ::
* /  ::
* ABS  ::
* LSHIFT  ::
* MAX  ::
* MIN  ::
* MOD  ::
* NEGATE  ::
* RSHIFT  ::


File: ci86.lina.info,  Node: star,  Next: +,  Prev: OPERATOR,  Up: OPERATOR

*
-

Name: `*'

Stackeffect: n1 n2 -- n3

Attributes: ISO,FIG,L0

Description: Leave the signed product `n3' of two signed numbers `n1'
and `n2' .

See also: `+'  `-'  `/'  `MOD'


File: ci86.lina.info,  Node: +,  Next: -,  Prev: star,  Up: OPERATOR

+
-

Name: `+'

Stackeffect: n1 n2 -- sum

Attributes: ISO,FIG,L0

Description: Leave the sum of `n1' and `n2' .

See also: `-'  `*'  `/'  `MOD'


File: ci86.lina.info,  Node: -,  Next: /MOD,  Prev: +,  Up: OPERATOR

-
-

Name: `-'

Stackeffect: n1 n2 -- diff

Attributes: ISO,FIG,L0

Description: Leave the difference of `n1' and `n2' .

See also: `NEGATE'  `+'  `*'  `/'  `MOD'


File: ci86.lina.info,  Node: /MOD,  Next: /,  Prev: -,  Up: OPERATOR

/MOD
----

Name: `/MOD'

Stackeffect: n1 n2 -- rem quot

Attributes: ISO,FIG,L0

Description: Leave the remainder and signed quotient of `n1' and `n2' .
The remainder has the sign of the dividend (i.e. "symmetric division" ).

See also: `*/MOD'  `*/'  `SM/REM'


File: ci86.lina.info,  Node: /,  Next: ABS,  Prev: /MOD,  Up: OPERATOR

/
-

Name: `/'

Stackeffect: n1 n2 -- quot

Attributes: ISO,FIG,L0

Description: Leave the signed quotient of `n1' and `n2' .  (using
"symmetric division" ).

See also: `+'  `-'  `*'  `MOD'  `*/MOD'


File: ci86.lina.info,  Node: ABS,  Next: LSHIFT,  Prev: /,  Up: OPERATOR

ABS
---

Name: `ABS'

Stackeffect: n -- u

Attributes: ISO,FIG,L0

Description: Leave the absolute value of `n' as `u' .

See also: `DABS'


File: ci86.lina.info,  Node: LSHIFT,  Next: MAX,  Prev: ABS,  Up: OPERATOR

LSHIFT
------

Name: `LSHIFT'

Stackeffect: u1 n -- u2

Attributes: ISO

Description: Perform a `logical shift ' of the bits of `u1' to the left
by `n' places.  Put zero into the places uncovered by the shift.

See also: `RSHIFT'  `2*'


File: ci86.lina.info,  Node: MAX,  Next: MIN,  Prev: LSHIFT,  Up: OPERATOR

MAX
---

Name: `MAX'

Stackeffect: n1 n2 -- max

Attributes: ISO,FIG,L0

Description: Leave the greater of two numbers.

See also: `MIN'


File: ci86.lina.info,  Node: MIN,  Next: MOD,  Prev: MAX,  Up: OPERATOR

MIN
---

Name: `MIN'

Stackeffect: n1 n2 -- min

Attributes: ISO,FIG,L0

Description: Leave the smaller of two numbers.

See also: `MAX'


File: ci86.lina.info,  Node: MOD,  Next: NEGATE,  Prev: MIN,  Up: OPERATOR

MOD
---

Name: `MOD'

Stackeffect: n1 n2 -- mod

Attributes: ISO,FIG,L0

Description: Leave the remainder of `n1' divided by `n2' , with the
same sign as `n1' (i.e. "symmetric division" ).

See also: `+'  `-'  `*'  `/'  `MOD'  `*/MOD'


File: ci86.lina.info,  Node: NEGATE,  Next: RSHIFT,  Prev: MOD,  Up: OPERATOR

NEGATE
------

Name: `NEGATE'

Stackeffect: n1 -- n2

Attributes: ISO,FIG,L0

Description: Leave the two's complement of a number, i.e.   `n2' is
`-n1'

See also: `-'


File: ci86.lina.info,  Node: RSHIFT,  Prev: NEGATE,  Up: OPERATOR

RSHIFT
------

Name: `RSHIFT'

Stackeffect: u1 n -- u2

Attributes: ISO

Description: Perform a `logical shift ' of the bits of `u1' to the
right by `n' places.  Put zero into the places uncovered by the shift.

See also: `LSHIFT'  `2/'


File: ci86.lina.info,  Node: OUTPUT,  Next: PARSING,  Prev: OPERATOR,  Up: Glossary

OUTPUT
======

   The wordset `OUTPUT' contains words to output to the terminal and
such.  *Note FILES::, for disk I/O.  *Note BLOCKS::, for blocks.

* Menu:



* (D.R)  :paren_d_dot_r
* ."  :dot_quote
* .(  :dot_paren
* .R  :dot_r
* .  :dot
* ?  ::
* CR  ::
* D.R  ::
* D.  ::
* EMIT  ::
* ETYPE  ::
* OUT  ::
* SPACES  ::
* SPACE  ::
* TYPE  ::
* U.  :u_dot


File: ci86.lina.info,  Node: paren_d_dot_r,  Next: dot_quote,  Prev: OUTPUT,  Up: OUTPUT

(D.R)
-----

Name: `(D.R)'

Stackeffect: d n --sc

Attributes: ISO,FIG

Description: Format a signed double number `d' right aligned in a field
`n' characters wide to the string `sc'.  Enlarge the field, if needed.
So a field length of 0 results effectively in free format.

See also: `OUT'  `D.'  `D.R'


File: ci86.lina.info,  Node: dot_quote,  Next: dot_paren,  Prev: paren_d_dot_r,  Up: OUTPUT

."
--

Name: `."'

No stackeffect

Attributes: ISO,FIG,I,L0

Description: Used in the form:   `." cccc"' In a definition it compiles
an in-line string `cccc' (as if the denotation `"cccc"'  was used)
followed by `TYPE'  .  In ciforth `."'  behaves the same way in
interpret mode.  In ciforth the number of characters has no limit.  In
ciforth `."'  always has an effect on `HERE'  during interpretation.
In ISO programs you may only use this word during compilation.  We
recommend that `." cccc"' is replaced by `"cccc" TYPE'.  )

See also: `OUT'


File: ci86.lina.info,  Node: dot_paren,  Next: dot_r,  Prev: dot_quote,  Up: OUTPUT

.(
--

Name: `.('

No stackeffect

Attributes: I,L0

Description:  In ciforth this is an alias for ." , except that the
string is closed with `') instead of parsed as per `"'  .  In ISO
programs you may only use this word while interpreting.  We recommend
that `.( cccc)' is replaced by `"cccc" TYPE'.

See also: `OUT'  `."'


File: ci86.lina.info,  Node: dot_r,  Next: dot,  Prev: dot_paren,  Up: OUTPUT

.R
--

Name: `.R'

Stackeffect: n1 n2 --

Attributes:

Description: Print a signed number `n1' right aligned in a field `n2'
characters wide. Enlarge the field, if needed.  So a field length of 0
results effectively in free format.

See also: `OUT'  `.'  `(D.R)'


File: ci86.lina.info,  Node: dot,  Next: ?,  Prev: dot_r,  Up: OUTPUT

.
-

Name: `.'

Stackeffect: n --

Attributes: ISO,FIG,L0

Description: Print the number `n1' observing the current `BASE' ,
followed by a blank.

See also: `OUT'  `U.'  `.R'  `D.R'  `D.'  `(D.R)'


File: ci86.lina.info,  Node: ?,  Next: CR,  Prev: dot,  Up: OUTPUT

?
-

Name: `?'

Stackeffect: addr --

Attributes: ISO,FIG,L0

Description: Print the value contained at the address `addr' observing
the current `BASE' , followed by a blank.

See also: `OUT'  `.'


File: ci86.lina.info,  Node: CR,  Next: D.R,  Prev: ?,  Up: OUTPUT

CR
--

Name: `CR'

No stackeffect

Attributes: ISO,FIG,L0

Description: Transmit character(s) to the terminal, that result in a
"carriage return" and a "line feed".  This means that the cursor is
positioned at the start of the next line, if needed the display is
scrolled.

See also: `OUT'


File: ci86.lina.info,  Node: D.R,  Next: D.,  Prev: CR,  Up: OUTPUT

D.R
---

Name: `D.R'

Stackeffect: d n --

Attributes: ISO,FIG

Description: Print a signed double number `d' right aligned in a field
`n' characters wide. Enlarge the field, if needed.  So a field length
of 0 results effectively in free format.

See also: `OUT'  `D.'  `(D.R)'


File: ci86.lina.info,  Node: D.,  Next: EMIT,  Prev: D.R,  Up: OUTPUT

D.
--

Name: `D.'

Stackeffect: d --

Attributes: ISO,FIG,L1

Description: Print the signed double number `d', observing the current
`BASE' , followed by a blank.

See also: `OUT'  `.'  `D.R'  `(D.R)'


File: ci86.lina.info,  Node: EMIT,  Next: ETYPE,  Prev: D.,  Up: OUTPUT

EMIT
----

Name: `EMIT'

Stackeffect: c --

Attributes: ISO FIG L0

Description: Transmit ASCII character `c' to the output device.  For
this ciforth all terminal I/O goes through `TYPE' .  In this ciforth
`EMIT'  maintains `OUT' .

See also: `TYPE'  `OUT'


File: ci86.lina.info,  Node: ETYPE,  Next: OUT,  Prev: EMIT,  Up: OUTPUT

ETYPE
-----

Name: `ETYPE'

Stackeffect: addr count --

Attributes:

Description: Transmit `count' characters from `addr' to the standard
error device.  It is high level so error output can be redirected, by
"revectoring"  it. Or you may use redirection by Linux. In this ciforth
strings may contain embedded `LF' 's with the effect of a new line at
that point in the output.

See also: `EMIT'  `TYPE'


File: ci86.lina.info,  Node: OUT,  Next: SPACES,  Prev: ETYPE,  Up: OUTPUT

OUT
---

Name: `OUT'

Stackeffect: -- addr

Attributes: U

Description: A user variable that reflects the position at the current
line of the output device where the next character transmitted will
appear. The first position is zero. Only an explicit `CR'  will reset
`OUT'  , not an `LF' embedded in a string that is `TYPE' d.

See also: `EMIT'  `TYPE'  `CR'


File: ci86.lina.info,  Node: SPACES,  Next: SPACE,  Prev: OUT,  Up: OUTPUT

SPACES
------

Name: `SPACES'

Stackeffect: n --

Attributes: ISO,FIG,L0

Description: If `n' is greater or equal to zero, display as much spaces.

See also: `SPACE'  `OUT'


File: ci86.lina.info,  Node: SPACE,  Next: TYPE,  Prev: SPACES,  Up: OUTPUT

SPACE
-----

Name: `SPACE'

No stackeffect

Attributes: ISO,FIG,L0

Description: Transmit an ASCII blank to the output device.

See also: `EMIT'  `OUT'


File: ci86.lina.info,  Node: TYPE,  Next: u_dot,  Prev: SPACE,  Up: OUTPUT

TYPE
----

Name: `TYPE'

Stackeffect: addr count --

Attributes: ISO FIG L0

Description: Transmit `count' characters from `addr' to the output
device. All terminal I/O goes through this word. It is high level so
terminal I/O can be redirected, by "revectoring"  it and the usual
redirection or `tee'-ing by Linux. In this ciforth strings may contain
embedded `LF' 's with the effect of a new line at that point in the
output, however in that case `OUT'  is not observed.

See also: `EMIT'  `OUT'  `ETYPE'


File: ci86.lina.info,  Node: u_dot,  Prev: TYPE,  Up: OUTPUT

U.
--

Name: `U.'

Stackeffect: u --

Attributes: ISO

Description: Print the unsigned number `u' observing the current `BASE'
, followed by a blank.

See also: `OUT'  `.'  `.R'  `D.R'  `D.'  `(D.R)'


File: ci86.lina.info,  Node: PARSING,  Next: SCREEN,  Prev: OUTPUT,  Up: Glossary

PARSING
=======

   The "outer interpreter"  is responsible for parsing, i.e. it gets a
word from the "current input source "  and interprets or compiles it,
advancing the `IN'   pointer.  The wordset `PARSING' contains the words
used by this interpreter and other words that consume characters from
the input source. In this way the outer interpreter need not be very
smart, because its capabilities can be extended by new words based on
those building blocks.

* Menu:



* (PARSE)  :paren_parse
* (WORD)  :paren_word
* (  :paren
* ?BLANK  ::
* CHAR  ::
* EVALUATE  ::
* INTERPRET  ::
* IN[]  :in_next
* SET-SRC  :set_source
* SOURCE  ::
* SRC  ::
* STATE  ::
* WORD  ::
* [CHAR]  :bracket_char_bracket
* [  :left_bracket
* \  :backslash
* ]  :righ_bracket


File: ci86.lina.info,  Node: paren_parse,  Next: paren_word,  Prev: PARSING,  Up: PARSING

(PARSE)
-------

Name: `(PARSE)'

Stackeffect:  c -- sc

Attributes:

Description: Scan the "current input source"  for the character `c' .
Return `sc': a string from the current position in the input stream,
ending before the first such character, or at the end of the current
input source if it isn't there. The character is consumed.  As it goes
with "string constant"s, you may not alter its content, nor assume
anything is appended.  So no leading delimiters are skipped.  The
difference with an ISO `PARSE' is that ISO considers control characters
a match for a blank.

See also: `WORD'  `(WORD)'


File: ci86.lina.info,  Node: paren_word,  Next: paren,  Prev: paren_parse,  Up: PARSING

(WORD)
------

Name: `(WORD)'

Stackeffect: -- sc

Attributes: CI L0

Description: Parse the "current input source"  for a word, i.e.
blank-delimited as per `?BLANK'  . Skip leading delimiters then advance
the input pointer to past the next delimiter or past the end of the
input source. Leave the word found as a string constant `sc'. As it
goes with string constants, you may not alter its content, nor assume
anything is appended. Note that this is more deserving of the name
"WORD" than what is in the ISO standard, that can be used to parse
lines.

See also: `BLK'  `WORD'  `IN'


File: ci86.lina.info,  Node: paren,  Next: ?BLANK,  Prev: paren_word,  Up: PARSING

(
-

Name: `('

No stackeffect

Attributes: ISO,FIG,I,L0

Description: Used in the form: `( cccc)'. Ignore a comment that will be
delimited by a right parenthesis that must be in the same input source,
i.e. on the same line for terminal input, or in the same string, block
or file, when that is the input. It is an immediate word, so colon
definitions can be commented too.  A blank after the word `('  is
required.

See also: `\'


File: ci86.lina.info,  Node: ?BLANK,  Next: CHAR,  Prev: paren,  Up: PARSING

?BLANK
------

Name: `?BLANK'

Stackeffect: c -- ff

Attributes:

Description: For the character `c' return whether this is considered to
be white space into the flag `ff' .  At least the space, ASCII null,
the tab and the carriage return and line feed characters are white
space.

See also: `BL'  `SPACE'


File: ci86.lina.info,  Node: CHAR,  Next: EVALUATE,  Prev: ?BLANK,  Up: PARSING

CHAR
----

Name: `CHAR'

Stackeffect: -- c

Attributes: ISO,I

Description: Parse a word and leave `c' the first non blank char of
that word in the input source.  If compiled the searching is done while
the word being compiled is executed.  Because this is so confusing, it
is recommended that one never compiles or postpones `CHAR' .

See also: `Prefix_&'  `[CHAR]'  `''


File: ci86.lina.info,  Node: EVALUATE,  Next: INTERPRET,  Prev: CHAR,  Up: PARSING

EVALUATE
--------

Name: `EVALUATE'

Stackeffect: sc -- ??

Attributes: ISO

Description: Interpret the content of `sc'. Afterwards return to the
"current input source"  .

See also: `LOAD'  `INCLUDE'  `SET-SRC'


File: ci86.lina.info,  Node: INTERPRET,  Next: in_next,  Prev: EVALUATE,  Up: PARSING

INTERPRET
---------

Name: `INTERPRET'

Stackeffect: ?? -- ??

Attributes:

Description: Repeatedly fetch the next text word from the `current
input source' and execute it (`STATE'  is not 1) or compile it (`STATE'
is 1). A word is blank-delimited and looked up in the vocabularies of
"search-order" .  Note that the denotations in the `ONLY'  wordlist
match numbers.  If it is not found at all, it is an `ERROR' .  A
"denotation"  is a number, a double number, a character or a string
etc. Denotations are handled respectively by the words `0'  ... `F'  `&'
`"'  and any other word of the `ONLY'  wordlist, depending on the first
character or characters.

   A number is converted according to the current base.  If a decimal
point is found as part of a number, the number value that is left is a
double number, otherwise it is a single number. Comma's are ignored in
ciforth.  )

See also: `WORD'  `NUMBER'  `BLK'  `DPL'


File: ci86.lina.info,  Node: in_next,  Next: set_source,  Prev: INTERPRET,  Up: PARSING

IN[]
----

Name: `IN[]'

Stackeffect:  --addr c

Attributes: CI L0

Description: Parse the "current input source"  leaving the next
character `c' and its address `addr' . If at the end of the input
source, leave a pointer past the end and a zero. Advance the input
pointer to the next character.

See also: `BLK'  `WORD'  `IN'


File: ci86.lina.info,  Node: set_source,  Next: SOURCE,  Prev: in_next,  Up: PARSING

SET-SRC
-------

Name: `SET-SRC'

Stackeffect: sc --

Attributes:

Description: Make the "string constant" `sc' the "current input source"
. This input is chained, i.e.  exhausting it has the same effect as
exhausting the input that called `SET-SRC' . In practice this word is
almost always followed by a call to `INTERPRET' .

See also: `EVALUATE'  `INTERPRET'


File: ci86.lina.info,  Node: SOURCE,  Next: SRC,  Prev: set_source,  Up: PARSING

SOURCE
------

Name: `SOURCE'

Stackeffect:  -- addr n1

Attributes: ISO

Description: Return the address and length of the "current input source"
.

See also: `SRC'  `SOURCE-ID'


File: ci86.lina.info,  Node: SRC,  Next: STATE,  Prev: SOURCE,  Up: PARSING

SRC
---

Name: `SRC'

Stackeffect: addr --

Attributes:

Description: Return the address `addr' of the "current input source"
specification, allocated in the user area. It consists of three cells:
the lowest and non-inclusive highest address of the parse area the
non-inclusive highest address of the parse area and a pointer to the
next character to be parsed.   Changing `SRC' takes immediate effect,
and must be atomic, by using `RESTORE-INPUT', or changing only the
third cell.  The third cell has the alias `IN' .

   Words like `>IN BLK SOURCE SOURCE-ID' are secondary, and return
their output by "second-guessing" `SRC' .

See also: `BLK'  `SOURCE-ID'


File: ci86.lina.info,  Node: STATE,  Next: WORD,  Prev: SRC,  Up: PARSING

STATE
-----

Name: `STATE'

Stackeffect: -- addr

Attributes: ISO,L0,U

Description: A user variable containing the compilation state. A
non-zero value indicates compilation.


File: ci86.lina.info,  Node: WORD,  Next: bracket_char_bracket,  Prev: STATE,  Up: PARSING

WORD
----

Name: `WORD'

Stackeffect: c --addr

Attributes: ISO,FIG,L0

Description: Parse the `current input source' using `c' for a delimiter.
Skip leading delimiters then advance the input pointer to past the next
delimiter or past the end of the input source.  Leave at `addr' a copy
of the string, that was surrounded by `c' in the input source.  This is
an oldfashioned string to be fetched by `COUNT'  , not `$@'  .  In
ciforth the character string is positioned at the dictionary buffer
`HERE'  .  `WORD'  leaves the character count in the first byte, the
characters, and ends with two or more blanks.

See also: `(WORD)'  `(PARSE)'  `BLK '  `IN'


File: ci86.lina.info,  Node: bracket_char_bracket,  Next: left_bracket,  Prev: WORD,  Up: PARSING

[CHAR]
------

Name: `[CHAR]'

Stackeffect: -- c

Attributes: ISO I

Description: A compiling word. Parse a word.  Add the run time
behaviour: leave `c', the first non blank char of that word in the
input source. In ciforth this word works also in interpret mode.

See also: `Prefix_&'  `CHAR'


File: ci86.lina.info,  Node: left_bracket,  Next: backslash,  Prev: bracket_char_bracket,  Up: PARSING

[
-

Name: `['

No stackeffect

Attributes: ISO,FIG,I,L1

Description: Used in a colon-definition in form:
     :  xxx    [  words   ]    more   ;
   Suspend compilation. The words after `['  are executed, not compiled.
This allows calculation or compilation exceptions before resuming
compilation with `]'

See also: `LITERAL '  `]'


File: ci86.lina.info,  Node: backslash,  Next: righ_bracket,  Prev: left_bracket,  Up: PARSING

\
-

Name: `\'

No stackeffect

Attributes: ISO,I,L0

Description: Used in the form: `\ cccc' Ignore a comment that will be
delimited by the end of the current line.  May occur during execution
or in a colon-definition.  Blank space after the word `\'  is required.

See also: `('


File: ci86.lina.info,  Node: righ_bracket,  Prev: backslash,  Up: PARSING

]
-

Name: `]'

No stackeffect

Attributes: ISO,FIG,L1

Description: Resume compilation, to the completion of a
colon-definition.

See also: `['


File: ci86.lina.info,  Node: SCREEN,  Next: SECURITY,  Prev: PARSING,  Up: Glossary

SCREEN
======

   Most of the "blocks" mass storage is used for "screen" 's that have
16 lines of 64 characters. They are used for source code and
documentation.  Each screen is one `BLOCK'  as required by ISO.  The
`SCREEN' wordset contains facilities to view screens, and "load"  them,
that is compiling them and thus extending the base system.  A system is
customized by loading source screens, possibly one of these extension
is a text editor for screens.

* Menu:



* (LINE)  :paren_line
* -->  :next_screen
* C/L  ::
* INDEX  ::
* LIST  ::
* LOAD  ::
* LOCK  ::
* R#  ::
* SCR  ::
* THRU  ::
* TRIAD  ::
* UNLOCK  ::
* (BLK)  :paren_blk
* BLK  ::


File: ci86.lina.info,  Node: paren_line,  Next: next_screen,  Prev: SCREEN,  Up: SCREEN

(LINE)
------

Name: `(LINE)'

Stackeffect: n1 n2 -- sc

Attributes:

Description: Convert the line number `n1' and the screen `n2' to a
string `sc' the content of the line (without the trailing new line).

See also: `LINE'


File: ci86.lina.info,  Node: next_screen,  Next: C/L,  Prev: paren_line,  Up: SCREEN

->
--

Name: `-->'

No stackeffect

Attributes: I,L0

Description: Continue interpretation with the next disc screen. If the
current input source is not from a block, a crash will ensue.  If this
new screen is left by throw of an exception, the screen may remain
locked until a `QUIT' , or any uncaught exception.

See also: `LOCK'  `CATCH'  `LOAD'


File: ci86.lina.info,  Node: C/L,  Next: INDEX,  Prev: next_screen,  Up: SCREEN

C/L
---

Name: `C/L'

Stackeffect: -- c

Attributes:

Description: A constant that leaves the number of characters on a line
of a standard screen: 64. The last character of each line is a `LF'.

See also: `LIST'  `LINE'


File: ci86.lina.info,  Node: INDEX,  Next: LIST,  Prev: C/L,  Up: SCREEN

INDEX
-----

Name: `INDEX'

Stackeffect: from to --

Attributes:

Description: Print the first line of each screen over the inclusive
range `from' , `to' . This is used to view the comment lines of an area
of text on disc screens.

See also: `LIST'


File: ci86.lina.info,  Node: LIST,  Next: LOAD,  Prev: INDEX,  Up: SCREEN

LIST
----

Name: `LIST'

Stackeffect: n --

Attributes: ISO,FIG,L0

Description: Display the ASCII text of "screen"  `n'.  The number of
the screen is always printed in decimal.  `SCR'  contains the screen
number during and after this process.

See also: `BLOCK'


File: ci86.lina.info,  Node: LOAD,  Next: LOCK,  Prev: LIST,  Up: SCREEN

LOAD
----

Name: `LOAD'

Stackeffect: n -- ??

Attributes: ISO,FIG,L0

Description: Interrupt the "current input source"  in order to
interpret screen `n' .  The stack changes in according with the words
executed.  At the end of the screen, barring errors or forced changes,
it continues with the interrupted input source.

See also: `BLOCK'  `#BUFF'  `THRU'  `QUIT'  `EXIT'  `-->'  `LIST'


File: ci86.lina.info,  Node: LOCK,  Next: R#,  Prev: LOAD,  Up: SCREEN

LOCK
----

Name: `LOCK'

Stackeffect:  n --

Attributes: CI

Description: Lock the block `n'.  Multiple locks are possible, and
require multiple unlocks.  Probably, because it is to become the
"current input source" .  The result is that its buffer will not be
reclaimed until an `UNLOCK'  occurs.

See also: `BLOCK'  `UNLOCK'  `#BUFF'


File: ci86.lina.info,  Node: R#,  Next: SCR,  Prev: LOCK,  Up: SCREEN

R#
--

Name: `R#'

Stackeffect: -- addr

Attributes: U

Description: A user variable which may contain the location of an
editing cursor, or other file related function.  Unused in the kernel
of ciforth.


File: ci86.lina.info,  Node: SCR,  Next: THRU,  Prev: R#,  Up: SCREEN

SCR
---

Name: `SCR'

Stackeffect: -- addr

Attributes: U

Description: A user variable containing the screen number most recently
reference by `LIST'  .

See also: `BLOCK'


File: ci86.lina.info,  Node: THRU,  Next: TRIAD,  Prev: SCR,  Up: SCREEN

THRU
----

Name: `THRU'

Stackeffect: n1 n2 -- ??

Attributes: ISO,FIG,L0

Description: Interrupt the "current input source"  in order to
interpret screen `n1' through `n2' (inclusive).  The stack changes in
according with the words executed.  At the end of the screens, barring
errors or forced changes, it continues with the interrupted input
source.

See also: `#BUFF'  `BLOCK'  `LOAD'  `QUIT'  `EXIT'  `-->'


File: ci86.lina.info,  Node: TRIAD,  Next: UNLOCK,  Prev: THRU,  Up: SCREEN

TRIAD
-----

Name: `TRIAD'

Stackeffect: scr --

Attributes:

Description: Display on the selected output device the three screens
which include that numbered `scr' , beginning with a screen evenly
divisible by three. Output is suitable for source text records, and
includes a reference line at the bottom taken from line 0 of the first
error screen.

See also: `MESSAGE'  `ERRSCR '


File: ci86.lina.info,  Node: UNLOCK,  Next: paren_blk,  Prev: TRIAD,  Up: SCREEN

UNLOCK
------

Name: `UNLOCK'

Stackeffect:  n --

Attributes: CI

Description: Unlock the block `n'.  Probably, because it is no longer
the "current input source" .  The result is that its buffer can again
be reclaimed.  Unlocking without a previous lock may lead to a crash.

See also: `LOCK'  `#BUFF'


File: ci86.lina.info,  Node: paren_blk,  Next: BLK,  Prev: UNLOCK,  Up: SCREEN

(BLK)
-----

Name: `(BLK)'

Stackeffect: -- addr

Attributes: U

Description: When the standard word `BLK'  is used, this user variable
reflects the state of the `current input source'.  It indicates the
block number being interpreted, or zero, if input is being taken from
the terminal input buffer.  Changing `BLK'  has no effect, and its
content must be fetched before the "current input source"  has changed.

See also: `BLOCK'  `TIB'


File: ci86.lina.info,  Node: BLK,  Prev: paren_blk,  Up: SCREEN

BLK
---

Name: `BLK'

Stackeffect: -- addr

Attributes: ISO

Description: When the standard word `BLK'  is used, the content of the
user variable `(BLK)' is refreshed to reflect the state of the current
input source and its address is returned in `addr' .  It indicates the
block number being interpreted, or zero, if input is being taken from
the terminal input buffer. In ciforth changing the content at `addr'
has no effect, and its content must be fetched before the "current
input source"  has changed.

See also: `BLOCK'  `TIB'


File: ci86.lina.info,  Node: SECURITY,  Next: STACKS,  Prev: SCREEN,  Up: Glossary

SECURITY
========

   The wordset `SECURITY' contains words that are used by control words
to abort with an error message if the control structure is not correct.
Some say that this is not Forth-like.  You only need to know them if
you want to extend the `CONTROL' wordset.

* Menu:



* !CSP  ::
* ?COMP  ::
* ?CSP  ::
* ?DELIM  ::
* ?EXEC  ::
* ?LOADING  ::
* ?PAIRS  ::
* ?STACK  ::
* CSP  ::


File: ci86.lina.info,  Node: !CSP,  Next: ?COMP,  Prev: SECURITY,  Up: SECURITY

!CSP
----

Name: `!CSP'

No stackeffect

Attributes:

Description: Save the stack position in `CSP' . Used as part of the
compiler security.


File: ci86.lina.info,  Node: ?COMP,  Next: ?CSP,  Prev: !CSP,  Up: SECURITY

?COMP
-----

Name: `?COMP'

No stackeffect

Attributes:

Description: Issue error message if not compiling.

See also: `?ERROR'


File: ci86.lina.info,  Node: ?CSP,  Next: ?DELIM,  Prev: ?COMP,  Up: SECURITY

?CSP
----

Name: `?CSP'

No stackeffect

Attributes:

Description: Issue error message if stack position differs from value
saved in `CSP' .


File: ci86.lina.info,  Node: ?DELIM,  Next: ?EXEC,  Prev: ?CSP,  Up: SECURITY

?DELIM
------

Name: `?DELIM'

No stackeffect

Attributes:

Description: Parse a character and issue error message if it is not a
blank delimiter.


File: ci86.lina.info,  Node: ?EXEC,  Next: ?LOADING,  Prev: ?DELIM,  Up: SECURITY

?EXEC
-----

Name: `?EXEC'

No stackeffect

Attributes:

Description: Issue an error message if not executing.

See also: `?ERROR'


File: ci86.lina.info,  Node: ?LOADING,  Next: ?PAIRS,  Prev: ?EXEC,  Up: SECURITY

?LOADING
--------

Name: `?LOADING'

No stackeffect

Attributes:

Description: Issue an error message if not loading

See also: `?ERROR'


File: ci86.lina.info,  Node: ?PAIRS,  Next: ?STACK,  Prev: ?LOADING,  Up: SECURITY

?PAIRS
------

Name: `?PAIRS'

Stackeffect: n1 n2 --

Attributes:

Description: Issue an error message if `n1' does not equal `n2' . The
message indicates that compiled conditionals do not match.

See also: `?ERROR'


File: ci86.lina.info,  Node: ?STACK,  Next: CSP,  Prev: ?PAIRS,  Up: SECURITY

?STACK
------

Name: `?STACK'

No stackeffect

Attributes:

Description: Issue an error message if the stack is out of bounds.

See also: `?ERROR'


File: ci86.lina.info,  Node: CSP,  Prev: ?STACK,  Up: SECURITY

CSP
---

Name: `CSP'

Stackeffect: --- addr

Attributes: U

Description: A user variable temporarily storing the stack pointer
position, for compilation error checking.


File: ci86.lina.info,  Node: STACKS,  Next: STRING,  Prev: SECURITY,  Up: Glossary

STACKS
======

   The wordset `STACKS' contains words related to the "data stack"  and
"return stack" .  Words can be moved between both stacks.  Stacks can
be reinitialised and the value used to initialise the "stack pointer"
's can be altered.

* Menu:



* .S  :dot_s
* >R  ::
* DEPTH  ::
* DSP!  ::
* DSP@  :d_s_p_fetch
* R0  ::
* R>  ::
* R@  :r_fetch
* RDROP  ::
* RSP!  ::
* RSP@  :r_s_p_fetch
* S0  ::


File: ci86.lina.info,  Node: dot_s,  Next: >R,  Prev: STACKS,  Up: STACKS

.S
--

Name: `.S'

Stackeffect: from to --

Attributes:

Description: Print the stack, in the current base.

See also: `LIST'


File: ci86.lina.info,  Node: >R,  Next: DEPTH,  Prev: dot_s,  Up: STACKS

>R
--

Name: `>R'

Stackeffect: n --

Attributes: ISO,FIG,C,L0

Description: Remove a number from the "data stack"  and place as the
most accessable on the "return stack" . Use should be balanced with `R>'
in the same definition.

See also: `R@'


File: ci86.lina.info,  Node: DEPTH,  Next: DSP!,  Prev: >R,  Up: STACKS

DEPTH
-----

Name: `DEPTH'

Stackeffect: -- n1

Attributes: ISO

Description: Leave into `n1' the number of items on the data stack,
before `n1' was pushed.

See also: `DSP@'


File: ci86.lina.info,  Node: DSP!,  Next: d_s_p_fetch,  Prev: DEPTH,  Up: STACKS

DSP!
----

Name: `DSP!'

Stackeffect: addr --

Attributes:

Description: Initialize the data stack pointer with `addr' .

See also: `DSP@'


File: ci86.lina.info,  Node: d_s_p_fetch,  Next: R0,  Prev: DSP!,  Up: STACKS

DSP@
----

Name: `DSP@'

Stackeffect: -- addr

Attributes:

Description: Return the address `addr' of the data stack position, as
it was before `DSP@'  was executed.

See also: `S0'  `DSP!'


File: ci86.lina.info,  Node: R0,  Next: R>,  Prev: d_s_p_fetch,  Up: STACKS

R0
--

Name: `R0'

Stackeffect: -- addr

Attributes: U

Description: A user variable containing the initial location of the
return stack.

See also: `RSP!'


File: ci86.lina.info,  Node: R>,  Next: r_fetch,  Prev: R0,  Up: STACKS

R>
--

Name: `R>'

Stackeffect: -- n

Attributes: ISO,FIG,L0

Description: Remove the top value from the "return stack"  and leave it
on the "data stack"  .

See also: `>R'  `R@'


File: ci86.lina.info,  Node: r_fetch,  Next: RDROP,  Prev: R>,  Up: STACKS

R@
--

Name: `R@'

Stackeffect: -- n

Attributes: ISO

Description: Copy the top of the return stack to the data stack.

See also: `>R'  `<R'


File: ci86.lina.info,  Node: RDROP,  Next: RSP!,  Prev: r_fetch,  Up: STACKS

RDROP
-----

Name: `RDROP'

Stackeffect: --

Attributes:

Description: Remove the top value from the return stack.

See also: `>R'  `R@'  `R>'


File: ci86.lina.info,  Node: RSP!,  Next: r_s_p_fetch,  Prev: RDROP,  Up: STACKS

RSP!
----

Name: `RSP!'

Stackeffect: addr --

Attributes:

Description: Initialize the return stack pointer with `addr'.

See also: `RSP@'


File: ci86.lina.info,  Node: r_s_p_fetch,  Next: S0,  Prev: RSP!,  Up: STACKS

RSP@
----

Name: `RSP@'

Stackeffect: -- addr

Attributes:

Description: Return the address `addr' of the current return stack
position, i.e. pointing the current topmost value.

See also: `R0'  `RSP!'


File: ci86.lina.info,  Node: S0,  Prev: r_s_p_fetch,  Up: STACKS

S0
--

Name: `S0'

Stackeffect: -- addr

Attributes: U

Description: A user variable that contains the initial value for the
data stack pointer.

See also: `DSP!'


File: ci86.lina.info,  Node: STRING,  Next: SUPERFLUOUS,  Prev: STACKS,  Up: Glossary

STRING
======

   The wordset `STRING' contains words that manipulate strings of
characters.  In ciforth strings have been given their civil rights.  So
they are entitled to a "denotation"  (the word `"'  ) and have a proper
fetch and store.  An (address length) pair is considered a "string
constant" .  It may be trimmed, but the data referring to via the
address must not be changed.  It can be stored in a buffer, a "string
variable" , that contains in its first cell the count. Formerly this
was in the first byte, and these are called "old fashioned string" 's
(or less flatteringly: brain-damaged).

* Menu:



* $!-BD  ::
* $!  ::
* $+!  ::
* $,  :string_comma
* $@  :string_fetch
* $C+  ::
* $I  ::
* $S  ::
* -TRAILING  ::
* BL  ::
* COUNT  ::
* S"  :s_quote


File: ci86.lina.info,  Node: $!-BD,  Next: $!,  Prev: STRING,  Up: STRING

$!-BD
-----

Name: `$!-BD'

Stackeffect: sc addr --

Attributes:

Description: Store a "string constant" `sc' in the "old fashioned
string"  variable at address `addr', i.e. it can be fetched with `COUNT'
.  (Where would that BD come from?)

See also: `COUNT'  `$!'


File: ci86.lina.info,  Node: $!,  Next: $+!,  Prev: $!-BD,  Up: STRING

$!
--

Name: `$!'

Stackeffect: sc addr --

Attributes:

Description: Store a "string constant" `sc' in the string variable at
address `addr'.

See also: `$@'  `$+!'  `$C+'


File: ci86.lina.info,  Node: $+!,  Next: string_comma,  Prev: $!,  Up: STRING

$+!
---

Name: `$+!'

Stackeffect: sc addr --

Attributes:

Description: Append a "string constant" `sc' to the string variable at
address `addr'.

See also: `$@'  `$!'  `$C+'


File: ci86.lina.info,  Node: string_comma,  Next: string_fetch,  Prev: $+!,  Up: STRING

$,
--

Name: `$,'

Stackeffect: sc -- addr

Attributes:

Description: Allocate and store a "string constant" `sc' in the
dictionary and leave its address `addr'.

See also: `$@'  `$!'


File: ci86.lina.info,  Node: string_fetch,  Next: $C+,  Prev: string_comma,  Up: STRING

$@
--

Name: `$@'

Stackeffect: addr -- sc

Attributes:

Description:  From address `addr' fetch a "string constant" `sc' .

See also: `$@'  `$!'  `$+!'  `$C+'


File: ci86.lina.info,  Node: $C+,  Next: $I,  Prev: string_fetch,  Up: STRING

$C+
---

Name: `$C+'

Stackeffect: c addr --

Attributes:

Description: Append a char `c' to the string variable at address `addr'.

See also: `$@'  `$!'  `$+!'


File: ci86.lina.info,  Node: $I,  Next: $S,  Prev: $C+,  Up: STRING

$I
--

Name: `$I'

Stackeffect: sc c - addr

Attributes:

Description: Find the first `c' in the "string constant" `sc' and
return its `addr' if present.  Otherwise return a "nil pointer".  A
null string (0 0) or an empty string are allowed, and result in not
found.

See also: `$S'  `CORA'


File: ci86.lina.info,  Node: $S,  Next: -TRAILING,  Prev: $I,  Up: STRING

$S
--

Name: `$S'

Stackeffect: sc c - sc1 sc2

Attributes:

Description: Find the first `c' in the "string constant" `sc' and split
it at that address. Return the strings after and before `c' into `sc1'
and `sc2' respectively. If the character is not present `sc1' is a null
string (its address is zero) and `sc2' is the original string.  Both
`sc1' and `sc2' may be empty strings (i.e. their count is zero), if `c'
is the last or first character in `sc' .

See also: `$I'  `CORA'


File: ci86.lina.info,  Node: -TRAILING,  Next: BL,  Prev: $S,  Up: STRING

-TRAILING
---------

Name: `-TRAILING'

Stackeffect: sc1 -- sc2

Attributes: ISO

Description: Trim the "string constant" `sc1' so as not to contain
trailing blank space and leave it as `sc2' .

See also: `?BLANK'


File: ci86.lina.info,  Node: BL,  Next: COUNT,  Prev: -TRAILING,  Up: STRING

BL
--

Name: `BL'

Stackeffect: -- c

Attributes: ISO.FIG

Description:  A constant that leaves the    ASCII value for "blank".


File: ci86.lina.info,  Node: COUNT,  Next: s_quote,  Prev: BL,  Up: STRING

COUNT
-----

Name: `COUNT'

Stackeffect: addr1 -- addr2 n

Attributes: ISO,FIG,L0

Description: Leave the byte address `addr2' and byte count `n' of a
message text beginning at address `addr1' . It is presumed that the
first byte at `addr1' contains the text byte count and the actual text
starts with the second byte. Alternatively stated, fetch a "string
constant" `addr n' from the brain damaged string variable at `addr1' .

See also: `TYPE'


File: ci86.lina.info,  Node: s_quote,  Prev: COUNT,  Up: STRING

S"
--

Name: `S"'

Stackeffect:  -- addr1 n

Attributes: ISO,L0

Description:  Used in the form:   `S" cccc"' Leaves an in-line string
`cccc' (delimited by the trailing `"') as a constant string `addr1 n' .
In ciforth the number of characters has no limit and using `S"' has
always an effect on `HERE' , even during interpretation.  In ciforth a
`"' can be embedded in a string by doubling it.  In non-portable code
denotations are recommended.

See also: `"'


File: ci86.lina.info,  Node: SUPERFLUOUS,  Next: WORDLISTS,  Prev: STRING,  Up: Glossary

SUPERFLUOUS
===========

   The wordset `SUPERFLUOUS' contains words that are superfluous,
because they are equivalent to small sequences of code.  Traditionally
one hoped to speed Forth up by coding these words directly.

* Menu:



* 0  ::
* 1+  ::
* 1-  ::
* 2*  ::
* 2/  ::
* Number_1  ::
* Number_2  ::


File: ci86.lina.info,  Node: 0,  Next: 1+,  Prev: SUPERFLUOUS,  Up: SUPERFLUOUS

0
-

Name: `0'

Stackeffect: -- 0

Attributes:

Description: Leave the number 0.

See also: `CONSTANT'


File: ci86.lina.info,  Node: 1+,  Next: 1-,  Prev: 0,  Up: SUPERFLUOUS

1+
--

Name: `1+'

Stackeffect: n1 -- n2

Attributes: L1

Description: This is shorthand for "`1' `+' ".

See also: `CELL+'  `1-'


File: ci86.lina.info,  Node: 1-,  Next: 2*,  Prev: 1+,  Up: SUPERFLUOUS

1-
--

Name: `1-'

Stackeffect: n1 -- n2

Attributes: ISO

Description:  This is shorthand for `1 -'.

See also: `1+ '


File: ci86.lina.info,  Node: 2*,  Next: 2/,  Prev: 1-,  Up: SUPERFLUOUS

2*
--

Name: `2*'

Stackeffect: n1 -- n2

Attributes: ISO

Description: Perform an arithmetical  left.  The bit pattern of `n1' is
shifted to the left, with a result identical to `1 LSHIFT'.  This word
should not be used.

See also: `2/ '


File: ci86.lina.info,  Node: 2/,  Next: Number_1,  Prev: 2*,  Up: SUPERFLUOUS

2/
--

Name: `2/'

Stackeffect: n1 -- n2

Attributes: ISO

Description: Perform an arithmetical  right.  The bit pattern of `n1'
is shifted to the right, except that the left most bit ("sign bit")
remains the same.   This is the same as `S>D 2 FM/MOD SWAP DROP'. It is
not the same as `2 /' , nor is it the same as `1 RSHIFT'. This
confusing word should never be used.

See also: `2* '


File: ci86.lina.info,  Node: Number_1,  Next: Number_2,  Prev: 2/,  Up: SUPERFLUOUS

Number_1
--------

Name: `Number_1'

Stackeffect: -- 1

Attributes:

Description: Leave the number 1.

See also: `CONSTANT'


File: ci86.lina.info,  Node: Number_2,  Prev: Number_1,  Up: SUPERFLUOUS

Number_2
--------

Name: `Number_2'

Stackeffect: -- 2

Attributes:

Description: Leave the number 2.

See also: `CONSTANT'


File: ci86.lina.info,  Node: WORDLISTS,  Prev: SUPERFLUOUS,  Up: Glossary

WORDLISTS
=========

   The dictionary is subdivided in non-overlapping subsets: the "word
list" 's (*note DICTIONARY::).   They are created by the defining word
`VOCABULARY'  and filled by defining words while that vocabulary is
`CURRENT'  . They regulate how words are found; different vocabularies
can have words with the same names.

   A word list in the ISO sense has no name, but a  "word list
identifier"  or "WID" , which is inconvenient. We use vocabulary words
created by the defining word `VOCABULARY'  . They are used to
manipulate the word list's that are associated with them. So
vocabularies are nearly the wordlist 's of the ISO standard, the
primary difference is that they have a name.

* Menu:



* ALSO  ::
* ASSEMBLER  ::
* CONTEXT  ::
* CURRENT  ::
* DEFINITIONS  ::
* ENVIRONMENT  ::
* FORTH  ::
* LATEST  ::
* ONLY  ::
* PREVIOUS  ::
* VOC-LINK  ::


File: ci86.lina.info,  Node: ALSO,  Next: ASSEMBLER,  Prev: WORDLISTS,  Up: WORDLISTS

ALSO
----

Name: `ALSO'

No stackeffect

Attributes: ISO

Description: Duplicate the topmost "WID"  in the search order stack.
If there were already 16 WID 's, ciforth looses the last one.  This is
not counting the `ONLY'  search order.  You seldomly want to use this
word, because in ciforth by naming a vocabulary you add it to the order.

See also: `CONTEXT'  `VOCABULARY'


File: ci86.lina.info,  Node: ASSEMBLER,  Next: CONTEXT,  Prev: ALSO,  Up: WORDLISTS

ASSEMBLER
---------

Name: `ASSEMBLER'

No stackeffect

Attributes: B,NISO,FIG,I,L1

Description: The name of the vocabulary to make machine code
definitions.  In ciforth execution it pushes the associated word list
to the top of the `CONTEXT'  stack. (For ISO-compliance it would
replace the top.) `ASSEMBLER'  is immediate, so it will execute during
the creation of a colon-definition, to select this vocabulary at
compile time.  This word makes only sense in combination with the words
that belong to it. So it is present in loadable form in the screens
file `forth.lab' .

See also: `VOCABULARY'  `LOAD'


File: ci86.lina.info,  Node: CONTEXT,  Next: CURRENT,  Prev: ASSEMBLER,  Up: WORDLISTS

CONTEXT
-------

Name: `CONTEXT'

Stackeffect: -- addr

Attributes: FIG,U,L0

Description:  The context is the address where the WID is found of the
wordlist that is searched first. In ciforth `addr' actually points to
the "search order" , a row of WID 's ending with the minimum search
order WID.  The corresponding wordlists are searched in that order for
definitions during interpretation.  This row of WID's is allocated in
the user variable space allowing for compilation in threads.  It may
contain up to 16 WID 's in this ciforth, while the ISO Search-Order
wordset requires a capacity of at least 8.  `CONTEXT'  is the last user
variable at offset 37 , such that new user variables may be allocated
using offsets of 37+16 and up.

See also: `PRESENT'  `VOCABULARY'  `CURRENT'  `USER'


File: ci86.lina.info,  Node: CURRENT,  Next: DEFINITIONS,  Prev: CONTEXT,  Up: WORDLISTS

CURRENT
-------

Name: `CURRENT'

Stackeffect: -- addr

Attributes: FIG,U,L0

Description: A user variable containing the WID of a vocabulary to which
new words will be added.  It is the "compilation word list"  in the
sense of the ISO standard.  The WID has the structure of a "dictionary
entry" .  This allows to link in a new word between the link field of
the WID and the next definition.

See also: `VOCABULARY'  `CONTEXT'


File: ci86.lina.info,  Node: DEFINITIONS,  Next: ENVIRONMENT,  Prev: CURRENT,  Up: WORDLISTS

DEFINITIONS
-----------

Name: `DEFINITIONS'

No stackeffect

Attributes: ISO

Description: Used in the form:            `cccc DEFINITIONS' Make the
top most "search order"  word list, (context), the compilation word
list (current).  In the example, executing vocabulary name `cccc' add
it to the top of the "search order"  and executing `DEFINITIONS'  will
result in new definitions added to `cccc' .

See also: `CONTEXT'  `VOCABULARY'


File: ci86.lina.info,  Node: ENVIRONMENT,  Next: FORTH,  Prev: DEFINITIONS,  Up: WORDLISTS

ENVIRONMENT
-----------

Name: `ENVIRONMENT'

No stackeffect

Attributes: CI

Description: The name of the `ENVIRONMENT'  vocabulary. The associated
"word list"  contains environment queries.  The names of words present
in `ENVIRONMENT'  are recognized by `ENVIRONMENT?' . This word list is
not intended to be used as a `CONTEXT'  word list; and only as a
`CURRENT'  whenever you want to add an environment query.

See also: `VOCABULARY'


File: ci86.lina.info,  Node: FORTH,  Next: LATEST,  Prev: ENVIRONMENT,  Up: WORDLISTS

FORTH
-----

Name: `FORTH'

No stackeffect

Attributes: NISO,FIG,I,L1

Description: The name of the primary vocabulary. Execution pushes the
`FORTH'  "WID"

   to the top of the "search order"  .  (For ISO-compliance it would
replace the top.)  Until additional user "word list"  's are created,
new user definitions become a part of `FORTH'  . `FORTH'  is immediate,
so it will execute during the creation of a colon-definition, to select
this "word list"  at compile time.

See also: `CONTEXT'  `VOCABULARY'


File: ci86.lina.info,  Node: LATEST,  Next: ONLY,  Prev: FORTH,  Up: WORDLISTS

LATEST
------

Name: `LATEST'

Stackeffect: -- addr

Attributes: FIG

Description: Leave the dictionary entry address `addr' of the topmost
word in the `CURRENT'  word list.

See also: `VOCABULARY'


File: ci86.lina.info,  Node: ONLY,  Next: PREVIOUS,  Prev: LATEST,  Up: WORDLISTS

ONLY
----

Name: `ONLY'

No stackeffect

Attributes: NISO

Description: Set the minimum search order, such that only "denotation"
's (numbers etc.) can be found plus the word `FORTH' .  By using `FORTH'
one can regain control towards a startup search order.

   `ONLY'  is actually a regular `VOCABULARY' .  The associated "word
list"  contains mainly prefix words, that scan denotations and are
described in the chapter `DENOTATIONS' .  If found the parse pointer is
moved back to immediately after the prefix, and the corresponding
denotation definition executed.  If you want to add a denotation

See also: `PREFIX'


File: ci86.lina.info,  Node: PREVIOUS,  Next: VOC-LINK,  Prev: ONLY,  Up: WORDLISTS

PREVIOUS
--------

Name: `PREVIOUS'

No stackeffect

Attributes: ISO

Description: Pop the topmost "WID"  from the search order stack.  If
empty still the `ONLY'  search order is left.

See also: `CONTEXT'  `VOCABULARY'


File: ci86.lina.info,  Node: VOC-LINK,  Prev: PREVIOUS,  Up: WORDLISTS

VOC-LINK
--------

Name: `VOC-LINK'

Stackeffect: -- addr

Attributes: U

Description: A user variable containing the "dictionary entry address"
address  of the word most recently created by `VOCABULARY'  . All
vocabulary names are linked by these fields to allow `FORGET'  to find
all vocabularies.

See also: `VOCABULARY'


File: ci86.lina.info,  Node: Glossary Index,  Up: Top

Glossary Index
**************

   This index finds the glossary description of each word.

* Menu:

* !:                                     !.
* !CSP:                                  !CSP.
* #:                                     #.
* #>:                                    #>.
* #BUFF:                                 #BUFF.
* #S:                                    #S.
* $!:                                    $!.
* $!-BD:                                 $!-BD.
* $+!:                                   $+!.
* $,:                                    string_comma.
* $@:                                    string_fetch.
* $C+:                                   $C+.
* $I:                                    $I.
* $S:                                    $S.
* ':                                     tick_iso.
* (:                                     paren.
* (+LOOP):                               paren_plus_loop.
* (;):                                   paren_semicolon.
* (;CODE):                               paren_semicolon_code.
* (>IN):                                 paren_iso_in.
* (?DO):                                 paren_question_do.
* (ABORT"):                              paren_abort_quote.
* (ACCEPT):                              paren_accept.
* (BACK:                                 paren_back.
* (BLK):                                 paren_blk.
* (BUFFER):                              paren_buffer.
* (CREATE):                              paren_create.
* (D.R):                                 paren_d_dot_r.
* (DO):                                  paren_do.
* (FIND):                                paren_find.
* (FORWARD:                              paren_forward.
* (LINE):                                paren_line.
* (LOOP):                                paren_loop.
* (NUMBER):                              paren_number.
* (PARSE):                               paren_parse.
* (WORD):                                paren_word.
* *:                                     star.
* */:                                    */.
* */MOD:                                 */MOD.
* +:                                     +.
* +!:                                    +!.
* +BUF:                                  +BUF.
* +LOOP:                                 +LOOP.
* +ORIGIN:                               +ORIGIN.
* ,:                                     comma.
* -:                                     -.
* -->:                                   next_screen.
* -TRAILING:                             -TRAILING.
* .:                                     dot.
* .":                                    dot_quote.
* .(:                                    dot_paren.
* .R:                                    dot_r.
* .S:                                    dot_s.
* .SIGNON:                               dot_cpu.
* /:                                     /.
* /MOD:                                  /MOD.
* 0:                                     0.
* 0<:                                    0<.
* 0=:                                    0=.
* 0BRANCH:                               0BRANCH.
* 1+:                                    1+.
* 1-:                                    1-.
* 2!:                                    2!.
* 2*:                                    2*.
* 2/:                                    2/.
* 2@:                                    two_fetch.
* 2DROP:                                 2DROP.
* 2DUP:                                  2DUP.
* 2OVER:                                 2OVER.
* 2SWAP:                                 2SWAP.
* ::                                     :.
* ;:                                     ;.
* ;CODE:                                 ;CODE.
* <:                                     <.
* <#:                                    <#.
* <>:                                    <>.
* =:                                     =.
* >:                                     >.
* >BODY:                                 >BODY.
* >CFA:                                  >CFA.
* >DFA:                                  >DFA.
* >FFA:                                  >FFA.
* >IN:                                   >IN.
* >LFA:                                  >LFA.
* >NFA:                                  >NFA.
* >NUMBER:                               >NUMBER.
* >PHA:                                  >PHA.
* >R:                                    >R.
* >SFA:                                  >SFA.
* >VFA:                                  >VFA.
* >WID:                                  >WID.
* >XFA:                                  >XFA.
* ?:                                     ?.
* ?BLANK:                                ?BLANK.
* ?COMP:                                 ?COMP.
* ?CSP:                                  ?CSP.
* ?DELIM:                                ?DELIM.
* ?DISK-ERROR:                           ?DISK-ERROR.
* ?DO:                                   ?DO.
* ?DUP:                                  ?DUP.
* ?ERROR:                                ?ERROR.
* ?ERRUR:                                ?ERRUR.
* ?EXEC:                                 ?EXEC.
* ?LOADING:                              ?LOADING.
* ?PAIRS:                                ?PAIRS.
* ?STACK:                                ?STACK.
* @:                                     fetch.
* [:                                     left_bracket.
* [']:                                   bracket_tick_bracket.
* [CHAR]:                                bracket_char_bracket.
* [COMPILE]:                             bracket_compile.
* \:                                     backslash.
* ]:                                     righ_bracket.
* _:                                     _.
* ABORT:                                 ABORT.
* ABORT":                                abort_quote.
* ABS:                                   ABS.
* ACCEPT:                                ACCEPT.
* AGAIN:                                 AGAIN.
* ALIGN:                                 ALIGN.
* ALIGNED:                               ALIGNED.
* ALLOT:                                 ALLOT.
* ALSO:                                  ALSO.
* AND:                                   AND.
* ARGS:                                  ARGS.
* ASSEMBLER:                             ASSEMBLER.
* B/BUF:                                 B/BUF.
* BACK):                                 back_paren.
* BASE:                                  BASE.
* BEGIN:                                 BEGIN.
* BL:                                    BL.
* BLANK:                                 BLANK.
* BLK:                                   BLK.
* BLOCK:                                 BLOCK.
* BLOCK-EXIT:                            BLOCK-EXIT.
* BLOCK-FILE:                            BLOCK-FILE.
* BLOCK-HANDLE:                          BLOCK-HANDLE.
* BLOCK-INIT:                            BLOCK-INIT.
* BM:                                    BM.
* BODY>:                                 BODY>.
* BRANCH:                                BRANCH.
* BYE:                                   BYE.
* C!:                                    C!.
* C,:                                    c_comma.
* C/L:                                   C/L.
* C@:                                    c_fetch.
* CATCH:                                 CATCH.
* CELL+:                                 CELL+.
* CELLS:                                 CELLS.
* CFA>:                                  CFA>.
* CHAR:                                  CHAR.
* CHAR+:                                 CHAR+.
* CHARS:                                 CHARS.
* CLOSE-FILE:                            CLOSE-FILE.
* CMOVE:                                 CMOVE.
* CO:                                    CO.
* COLD:                                  COLD.
* CONSTANT:                              CONSTANT.
* CONTEXT:                               CONTEXT.
* CORA:                                  CORA.
* CORE:                                  CORE.
* COUNT:                                 COUNT.
* CPU:                                   CPU.
* CR:                                    CR.
* CREATE:                                CREATE.
* CREATE-FILE:                           CREATE-FILE.
* CSP:                                   CSP.
* CURRENT:                               CURRENT.
* D+:                                    D+.
* D.:                                    D..
* D.R:                                   D.R.
* DABS:                                  DABS.
* DECIMAL:                               DECIMAL.
* DEFINITIONS:                           DEFINITIONS.
* DELETE-FILE:                           DELETE-FILE.
* DEPTH:                                 DEPTH.
* DIGIT:                                 DIGIT.
* DISK-ERROR:                            DISK-ERROR.
* DLITERAL:                              DLITERAL.
* DNEGATE:                               DNEGATE.
* DO:                                    DO.
* DOES>:                                 DOES>.
* DP:                                    DP.
* DPL:                                   DPL.
* DROP:                                  DROP.
* DSP!:                                  DSP!.
* DSP@:                                  d_s_p_fetch.
* DUP:                                   DUP.
* ELSE:                                  ELSE.
* EM:                                    EM.
* EMIT:                                  EMIT.
* EMPTY-BUFFERS:                         EMPTY-BUFFERS.
* ENVIRONMENT:                           ENVIRONMENT.
* ENVIRONMENT?:                          ENVIRONMENT?.
* ERASE:                                 ERASE.
* ERROR:                                 ERROR.
* ERRSCR:                                ERRSCR.
* ETYPE:                                 ETYPE.
* EVALUATE:                              EVALUATE.
* EXECUTE:                               EXECUTE.
* EXIT:                                  EXIT.
* EXIT-CODE:                             EXIT-CODE.
* FARMOVE:                               FARMOVE.
* FENCE:                                 FENCE.
* FILL:                                  FILL.
* FIND:                                  FIND.
* FIRST:                                 FIRST.
* FLD:                                   FLD.
* FLUSH:                                 FLUSH.
* FM/MOD:                                FM/MOD.
* FOR-VOCS:                              FOR-VOCS.
* FOR-WORDS:                             FOR-WORDS.
* FORGET:                                FORGET.
* FORGET-VOC:                            FORGET-VOC.
* FORTH:                                 FORTH.
* FORWARD):                              forward_paren.
* FOUND:                                 FOUND.
* GET-FILE:                              GET-FILE.
* HANDLER:                               HANDLER.
* HERE:                                  HERE.
* HEX:                                   HEX.
* HIDDEN:                                HIDDEN.
* HLD:                                   HLD.
* HOLD:                                  HOLD.
* I:                                     I.
* ID.:                                   ID..
* IF:                                    IF.
* IMMEDIATE:                             IMMEDIATE.
* IN:                                    IN.
* IN[]:                                  in_next.
* INCLUDED:                              INCLUDED.
* INDEX:                                 INDEX.
* INTERPRET:                             INTERPRET.
* INVERT:                                INVERT.
* J:                                     J.
* KEY:                                   KEY.
* KEY?:                                  KEY?.
* L!:                                    L!.
* L@:                                    long_fetch.
* LATEST:                                LATEST.
* LEAVE:                                 LEAVE.
* LIMIT:                                 LIMIT.
* LINOS:                                 LINOS.
* LINOS5:                                LINOS5.
* LIST:                                  LIST.
* LIT:                                   LIT.
* LITERAL:                               LITERAL.
* LOAD:                                  LOAD.
* LOCK:                                  LOCK.
* LOOP:                                  LOOP.
* LSHIFT:                                LSHIFT.
* M*:                                    M*.
* M/MOD:                                 M/MOD.
* MAX:                                   MAX.
* MESSAGE:                               MESSAGE.
* MIN:                                   MIN.
* MOD:                                   MOD.
* MOVE:                                  MOVE.
* MS:                                    MS.
* NAME:                                  NAME.
* NEGATE:                                NEGATE.
* NOOP:                                  NOOP.
* NUMBER:                                NUMBER.
* Number_1:                              Number_1.
* Number_2:                              Number_2.
* OFFSET:                                OFFSET.
* OK:                                    OK.
* ONLY:                                  ONLY.
* OPEN-FILE:                             OPEN-FILE.
* OPT:                                   optimiser.
* OPTIONS:                               OPTIONS.
* OR:                                    OR.
* OUT:                                   OUT.
* OVER:                                  OVER.
* P!:                                    P!.
* P@:                                    port_fetch.
* PAD:                                   PAD.
* PC!:                                   PC!.
* PC@:                                   port_char_fetch.
* POSTPONE:                              POSTPONE.
* PREFIX:                                PREFIX.
* Prefix_":                              den_quote.
* Prefix_&:                              Prefix_&.
* Prefix_+:                              Prefix_+.
* Prefix_-:                              Prefix_-.
* Prefix_0:                              den_zero.
* Prefix_7:                              den_seven.
* Prefix_^:                              Prefix_^.
* Prefix__TICK:                          tick_denotation.
* Prefix_B:                              den_b.
* PRESENT:                               PRESENT.
* PREV:                                  PREV.
* PREVIOUS:                              PREVIOUS.
* PUT-FILE:                              PUT-FILE.
* QUIT:                                  QUIT.
* R#:                                    R#.
* R0:                                    R0.
* R>:                                    R>.
* R@:                                    r_fetch.
* R\W:                                   R\W.
* RDROP:                                 RDROP.
* READ-FILE:                             READ-FILE.
* RECURSE:                               RECURSE.
* REFILL-TIB:                            REFILL-TIB.
* REMAINDER:                             REMAINDER.
* REPEAT:                                REPEAT.
* REPOSITION-FILE:                       REPOSITION-FILE.
* RESTORE:                               RESTORE.
* RESTORE-INPUT:                         RESTORE-INPUT.
* ROT:                                   ROT.
* RSHIFT:                                RSHIFT.
* RSP!:                                  RSP!.
* RSP@:                                  r_s_p_fetch.
* RUBOUT:                                RUBOUT.
* RW-BUFFER:                             RW-BUFFER.
* S":                                    s_quote.
* S0:                                    S0.
* S>D:                                   S>D.
* SAVE:                                  SAVE.
* SAVE-INPUT:                            SAVE-INPUT.
* SCR:                                   SCR.
* SDLITERAL:                             SDLITERAL.
* SEEK:                                  SEEK.
* SET-SRC:                               set_source.
* SET-TERM:                              SET-TERM.
* SHELL:                                 SHELL.
* SIGN:                                  SIGN.
* SKIP:                                  SKIP.
* SM/REM:                                SM/REM.
* SOURCE:                                SOURCE.
* SPACE:                                 SPACE.
* SPACES:                                SPACES.
* SRC:                                   SRC.
* STALEST:                               STALEST.
* STATE:                                 STATE.
* SUPPLIER:                              SUPPLIER.
* SWAP:                                  SWAP.
* SYSTEM:                                SYSTEM.
* TASK:                                  TASK.
* TERMIO:                                TERMIO.
* THEN:                                  THEN.
* THROW:                                 THROW.
* THRU:                                  THRU.
* TIB:                                   TIB.
* TOGGLE:                                TOGGLE.
* TRIAD:                                 TRIAD.
* TYPE:                                  TYPE.
* U.:                                    u_dot.
* U0:                                    U0.
* U<:                                    U<.
* UM*:                                   UM*.
* UM/MOD:                                UM/MOD.
* UNLOCK:                                UNLOCK.
* UNLOOP:                                UNLOOP.
* UNTIL:                                 UNTIL.
* UPDATE:                                UPDATE.
* USER:                                  USER.
* VARIABLE:                              VARIABLE.
* VERSION:                               VERSION.
* VOC-LINK:                              VOC-LINK.
* VOCABULARY:                            VOCABULARY.
* WARM:                                  WARM.
* WARNING:                               WARNING.
* WHERE:                                 WHERE.
* WHILE:                                 WHILE.
* WITHIN:                                WITHIN.
* WORD:                                  WORD.
* WORDS:                                 WORDS.
* WRITE-FILE:                            WRITE-FILE.
* XOR:                                   XOR.
* ZEN:                                   ZEN.
* ~MATCH:                                unmatch.


File: ci86.lina.info,  Node: Forth Word Index,  Up: Top

Forth Word Index
****************

   This index contains _all_ references to a word.  Use the glossary
index to find the glossary description of each word.

* Menu:

* ! <1>:                                 !.
* !:                                     Manual.
* !CSP <1>:                              !CSP.
* !CSP:                                  Errors.
* !TALLY:                                A8.
* " <1>:                                 STRING.
* " <2>:                                 INTERPRET.
* " <3>:                                 dot_paren.
* ":                                     Manual.
* "CASE-SENSITIVE":                      Errors.
* "cccc":                                dot_quote.
* # <1>:                                 <#.
* # <2>:                                 #.
* #:                                     #S.
* #> <1>:                                SIGN.
* #> <2>:                                HOLD.
* #> <3>:                                <#.
* #> <4>:                                #.
* #> <5>:                                #S.
* #>:                                    #>.
* #BUFF:                                 #BUFF.
* #S <1>:                                <#.
* #S:                                    #S.
* $!:                                    $!.
* $!-BD:                                 $!-BD.
* $+!:                                   $+!.
* $,:                                    string_comma.
* $@ <1>:                                string_fetch.
* $@ <2>:                                WORD.
* $@:                                    SKIP.
* $C+:                                   $C+.
* $I:                                    $I.
* $S:                                    $S.
* & <1>:                                 INTERPRET.
* &:                                     Errors.
* ' <1>:                                 tick_iso.
* ' <2>:                                 tick_denotation.
* ':                                     Errors.
* ' words:                               Errors.
* ';':                                   :.
* ';CODE':                               :.
* (:                                     paren.
* (+LOOP) <1>:                           paren_plus_loop.
* (+LOOP):                               +LOOP.
* (;):                                   paren_semicolon.
* (;CODE) <1>:                           ;CODE.
* (;CODE):                               paren_semicolon_code.
* (>IN):                                 paren_iso_in.
* (?DO):                                 paren_question_do.
* (ABORT"):                              paren_abort_quote.
* (ACCEPT) <1>:                          REFILL-TIB.
* (ACCEPT) <2>:                          paren_accept.
* (ACCEPT):                              QUIT.
* (BACK <1>:                             back_paren.
* (BACK:                                 paren_back.
* (BLK):                                 paren_blk.
* (BUFFER) <1>:                          paren_buffer.
* (BUFFER):                              BLOCK.
* (CREATE) <1>:                          paren_create.
* (CREATE) <2>:                          Errors.
* (CREATE):                              Manual.
* (D.R):                                 paren_d_dot_r.
* (DO) <1>:                              paren_do.
* (DO):                                  DO.
* (FIND) <1>:                            unmatch.
* (FIND) <2>:                            paren_find.
* (FIND):                                Manual.
* (FORWARD <1>:                          forward_paren.
* (FORWARD:                              paren_forward.
* (LINE):                                paren_line.
* (LOOP) <1>:                            paren_loop.
* (LOOP):                                LOOP.
* (NUMBER):                              paren_number.
* (PARSE):                               paren_parse.
* (RB,) (RW,) (RL,):                     AE.
* (RL,):                                 A8.
* (RW,):                                 A8.
* (WORD):                                paren_word.
* * <1>:                                 star.
* *:                                     Gentle Introduction.
* */:                                    */.
* */MOD:                                 */MOD.
* + <1>:                                 1+.
* + <2>:                                 +.
* + <3>:                                 Manual.
* +:                                     Gentle Introduction.
* +!:                                    +!.
* +BUF:                                  +BUF.
* +LOOP <1>:                             paren_plus_loop.
* +LOOP <2>:                             UNLOOP.
* +LOOP <3>:                             LEAVE.
* +LOOP:                                 +LOOP.
* +ORIGIN <1>:                           +ORIGIN.
* +ORIGIN:                               Manual.
* ,:                                     comma.
* - <1>:                                 -.
* -:                                     LOGIC.
* --> <1>:                               next_screen.
* -->:                                   Errors.
* -TRAILING:                             -TRAILING.
* . <1>:                                 dot.
* .:                                     Gentle Introduction.
* ." <1>:                                dot_quote.
* .":                                    Manual.
* .(:                                    dot_paren.
* .R:                                    dot_r.
* .S <1>:                                dot_s.
* .S:                                    Manual.
* .SIGNON:                               dot_cpu.
* / <1>:                                 /.
* /:                                     OPERATOR.
* /MOD:                                  /MOD.
* 0 <1>:                                 0.
* 0:                                     INTERPRET.
* 0<:                                    0<.
* 0=:                                    0=.
* 0BRANCH <1>:                           0BRANCH.
* 0BRANCH <2>:                           WHILE.
* 0BRANCH <3>:                           UNTIL.
* 0BRANCH:                               IF.
* 1+ <1>:                                1+.
* 1+:                                    paren_accept.
* 1-:                                    1-.
* 2!:                                    2!.
* 2*:                                    2*.
* 2/:                                    2/.
* 2@:                                    two_fetch.
* 2DROP <1>:                             2DROP.
* 2DROP:                                 SET-TERM.
* 2DUP:                                  2DUP.
* 2OVER:                                 2OVER.
* 2SWAP:                                 2SWAP.
* : <1>:                                 :.
* : <2>:                                 Errors.
* : <3>:                                 Manual.
* ::                                     Gentle Introduction.
* ; <1>:                                 ;.
* ; <2>:                                 Errors.
* ;:                                     Gentle Introduction.
* ;CODE <1>:                             ;CODE.
* ;CODE:                                 paren_semicolon_code.
* <:                                     <.
* <# <1>:                                SIGN.
* <# <2>:                                HOLD.
* <# <3>:                                <#.
* <# <4>:                                #.
* <#:                                    #S.
* <>:                                    <>.
* = <1>:                                 =.
* =:                                     LOGIC.
* >:                                     >.
* >BODY <1>:                             BODY>.
* >BODY <2>:                             >BODY.
* >BODY:                                 Manual.
* >CFA <1>:                              >CFA.
* >CFA:                                  Manual.
* >DFA <1>:                              >DFA.
* >DFA:                                  Manual.
* >FFA <1>:                              >FFA.
* >FFA:                                  Manual.
* >IN <1>:                               paren_iso_in.
* >IN <2>:                               >IN.
* >IN <3>:                               Manual.
* >IN:                                   Top.
* >LFA <1>:                              >LFA.
* >LFA:                                  Manual.
* >NFA <1>:                              >NFA.
* >NFA:                                  Manual.
* >NUMBER:                               >NUMBER.
* >PHA <1>:                              >PHA.
* >PHA:                                  >DFA.
* >R <1>:                                >R.
* >R <2>:                                EXIT.
* >R:                                    CO.
* >SFA <1>:                              >SFA.
* >SFA:                                  Manual.
* >VFA:                                  >VFA.
* >WID:                                  >WID.
* >XFA:                                  >XFA.
* ?:                                     ?.
* ?BLANK <1>:                            ?BLANK.
* ?BLANK:                                paren_word.
* ?COMP <1>:                             ?COMP.
* ?COMP:                                 Errors.
* ?CSP <1>:                              ?CSP.
* ?CSP:                                  Errors.
* ?DELIM:                                ?DELIM.
* ?DISK-ERROR <1>:                       ?DISK-ERROR.
* ?DISK-ERROR:                           Errors.
* ?DO <1>:                               paren_question_do.
* ?DO:                                   ?DO.
* ?DUP:                                  ?DUP.
* ?ENVIRONMENT:                          Glossary.
* ?ERROR <1>:                            WHERE.
* ?ERROR <2>:                            ?ERRUR.
* ?ERROR <3>:                            ?ERROR.
* ?ERROR:                                Errors.
* ?ERRUR:                                ?ERRUR.
* ?EXEC:                                 ?EXEC.
* ?EXEC.:                                Errors.
* ?LOAD:                                 Errors.
* ?LOADING:                              ?LOADING.
* ?PAIRS <1>:                            ?PAIRS.
* ?PAIRS:                                Errors.
* ?STACK <1>:                            ?STACK.
* ?STACK:                                Errors.
* @ <1>:                                 fetch.
* @:                                     Manual.
* [ <1>:                                 left_bracket.
* [:                                     Gentle Introduction.
* [']:                                   bracket_tick_bracket.
* [AX <1>:                               AC.
* [AX:                                   A7.
* [BP:                                   AA.
* [BP+IS]%:                              AE.
* [BX+SI]:                               AA.
* [CHAR]:                                bracket_char_bracket.
* [COMPILE]:                             bracket_compile.
* \:                                     backslash.
* ] <1>:                                 righ_bracket.
* ] <2>:                                 left_bracket.
* ]:                                     Gentle Introduction.
* _:                                     _.
* ABORT <1>:                             WARM.
* ABORT <2>:                             COLD.
* ABORT <3>:                             ABORT.
* ABORT <4>:                             abort_quote.
* ABORT:                                 Manual.
* ABORT" <1>:                            paren_abort_quote.
* ABORT" <2>:                            abort_quote.
* ABORT":                                Manual.
* ABS:                                   ABS.
* ACCEPT <1>:                            REFILL-TIB.
* ACCEPT <2>:                            ACCEPT.
* ACCEPT:                                paren_accept.
* AGAIN <1>:                             BRANCH.
* AGAIN <2>:                             BEGIN.
* AGAIN:                                 AGAIN.
* ALIGN:                                 ALIGN.
* ALIGNED:                               ALIGNED.
* ALLOT <1>:                             DP.
* ALLOT <2>:                             ALLOT.
* ALLOT:                                 Errors.
* ALSO:                                  ALSO.
* AL|:                                   AA.
* AND <1>:                               AND.
* AND:                                   LOGIC.
* ARGS:                                  ARGS.
* AS::                                   A8.
* AS:,:                                  A7.
* ASSEMBLER <1>:                         ASSEMBLER.
* ASSEMBLER <2>:                         ;CODE.
* ASSEMBLER:                             Manual.
* AX:                                    A8.
* AX'| <1>:                              AE.
* AX'|:                                  A7.
* AX| <1>:                               AE.
* AX| <2>:                               AA.
* AX|:                                   A7.
* B'|:                                   A7.
* B,:                                    A7.
* B.:                                    Manual.
* B/BUF <1>:                             B/BUF.
* B/BUF:                                 Manual.
* B/BUF CELL+ CELL+:                     Manual.
* BA:                                    A7.
* BACK):                                 back_paren.
* BAD <1>:                               AF.
* BAD:                                   A7.
* BASE <1>:                              u_dot.
* BASE <2>:                              D..
* BASE <3>:                              ?.
* BASE <4>:                              dot.
* BASE <5>:                              paren_number.
* BASE <6>:                              HEX.
* BASE <7>:                              DECIMAL.
* BASE <8>:                              BASE.
* BASE <9>:                              >NUMBER.
* BASE <10>:                             #.
* BASE:                                  Errors.
* BEGIN <1>:                             WHILE.
* BEGIN <2>:                             UNTIL.
* BEGIN <3>:                             REPEAT.
* BEGIN <4>:                             BEGIN.
* BEGIN:                                 AGAIN.
* BI:                                    A7.
* BITS-16:                               A8.
* BITS-32:                               A8.
* BL <1>:                                BL.
* BL:                                    BLANK.
* BLANK:                                 BLANK.
* BLK <1>:                               BLK.
* BLK <2>:                               paren_blk.
* BLK:                                   Manual.
* BLOCK <1>:                             SCREEN.
* BLOCK <2>:                             OFFSET.
* BLOCK <3>:                             BLOCK.
* BLOCK:                                 B/BUF.
* BLOCK-EXIT <1>:                        BLOCK-EXIT.
* BLOCK-EXIT:                            Manual.
* BLOCK-FILE <1>:                        BLOCK-INIT.
* BLOCK-FILE <2>:                        BLOCK-FILE.
* BLOCK-FILE:                            Errors.
* BLOCK-HANDLE <1>:                      BLOCK-HANDLE.
* BLOCK-HANDLE:                          BLOCK-EXIT.
* BLOCK-INIT <1>:                        SEEK.
* BLOCK-INIT <2>:                        BLOCK-INIT.
* BLOCK-INIT <3>:                        BLOCK-FILE.
* BLOCK-INIT:                            BLOCK-EXIT.
* BM <1>:                                BM.
* BM:                                    Manual.
* BODY>:                                 BODY>.
* BO|:                                   A7.
* BRANCH <1>:                            BRANCH.
* BRANCH <2>:                            REPEAT.
* BRANCH <3>:                            ELSE.
* BRANCH:                                AGAIN.
* BX|:                                   AA.
* BY:                                    A7.
* BYE <1>:                               EXIT-CODE.
* BYE <2>:                               BYE.
* BYE <3>:                               COLD.
* BYE:                                   Manual.
* B| <1>:                                AF.
* B| <2>:                                A7.
* B|:                                    A4.
* C!:                                    C!.
* C,:                                    c_comma.
* C/L:                                   C/L.
* C@:                                    c_fetch.
* CALL,:                                 AB.
* CALLFAROI,:                            AB.
* CASE-INSENSITIVE:                      Errors.
* CASE-SENSITIVE:                        Errors.
* CATCH <1>:                             HANDLER.
* CATCH <2>:                             THROW.
* CATCH <3>:                             CATCH.
* CATCH:                                 Manual.
* CELL+ <1>:                             CELL+.
* CELL+:                                 Manual.
* CELLS:                                 CELLS.
* CFA>:                                  CFA>.
* CHAR:                                  CHAR.
* CHAR+:                                 CHAR+.
* CHARS:                                 CHARS.
* CLOSE-FILE:                            CLOSE-FILE.
* CMOVE:                                 CMOVE.
* CO:                                    CO.
* COLD <1>:                              COLD.
* COLD <2>:                              +ORIGIN.
* COLD:                                  Manual.
* COMPARE-AREA:                          CORA.
* CONSTANT <1>:                          CONSTANT.
* CONSTANT <2>:                          Manual.
* CONSTANT:                              Gentle Introduction.
* CONTEXT <1>:                           ENVIRONMENT.
* CONTEXT <2>:                           CONTEXT.
* CONTEXT <3>:                           ASSEMBLER.
* CONTEXT:                               VOCABULARY.
* CORA:                                  CORA.
* CORE:                                  CORE.
* COUNT <1>:                             COUNT.
* COUNT <2>:                             $!-BD.
* COUNT:                                 WORD.
* CPU <1>:                               dot_cpu.
* CPU:                                   CPU.
* CR <1>:                                OUT.
* CR <2>:                                CR.
* CR:                                    Manual.
* CRACK:                                 Manual.
* CREATE <1>:                            >DFA.
* CREATE <2>:                            BODY>.
* CREATE <3>:                            >BODY.
* CREATE <4>:                            paren_semicolon_code.
* CREATE <5>:                            DOES>.
* CREATE <6>:                            CREATE.
* CREATE <7>:                            DEFINING.
* CREATE:                                Manual.
* CREATE-FILE:                           CREATE-FILE.
* CSP <1>:                               CSP.
* CSP:                                   !CSP.
* CURRENT <1>:                           LATEST.
* CURRENT <2>:                           ENVIRONMENT.
* CURRENT <3>:                           CURRENT.
* CURRENT <4>:                           WORDLISTS.
* CURRENT <5>:                           paren_find.
* CURRENT <6>:                           paren_create.
* CURRENT <7>:                           :.
* CURRENT:                               Manual.
* D+:                                    D+.
* D.:                                    D..
* D.R:                                   D.R.
* DABS:                                  DABS.
* DECIMAL:                               DECIMAL.
* DEFINITIONS:                           DEFINITIONS.
* DELETE-FILE:                           DELETE-FILE.
* DENOTATIONS:                           ONLY.
* DEPTH:                                 DEPTH.
* DEVELOP:                               Errors.
* DH.:                                   Manual.
* DIGIT:                                 DIGIT.
* DISK-ERROR:                            DISK-ERROR.
* DI|:                                   AF.
* DLITERAL:                              DLITERAL.
* DNEGATE:                               DNEGATE.
* DO <1>:                                paren_do.
* DO <2>:                                LOOP.
* DO <3>:                                EXIT.
* DO <4>:                                DO.
* DO <5>:                                CO.
* DO <6>:                                +LOOP.
* DO:                                    Errors.
* DO-DEBUG:                              Manual.
* DOES> <1>:                             >DFA.
* DOES> <2>:                             BODY>.
* DOES> <3>:                             >BODY.
* DOES> <4>:                             paren_semicolon_code.
* DOES> <5>:                             VOCABULARY.
* DOES> <6>:                             DOES>.
* DOES> <7>:                             DEFINING.
* DOES>:                                 Manual.
* DP <1>:                                DP.
* DP <2>:                                ALLOT.
* DP:                                    Manual.
* DPL <1>:                               DPL.
* DPL:                                   SDLITERAL.
* DROP <1>:                              DROP.
* DROP:                                  CATCH.
* DSP!:                                  DSP!.
* DSP@:                                  d_s_p_fetch.
* DUMP:                                  Manual.
* DUP:                                   DUP.
* DX|:                                   A7.
* EAX:                                   A8.
* EDITOR:                                Errors.
* ELSE <1>:                              ?DUP.
* ELSE <2>:                              BRANCH.
* ELSE <3>:                              THEN.
* ELSE <4>:                              IF.
* ELSE:                                  ELSE.
* EM <1>:                                EM.
* EM:                                    Manual.
* EMIT <1>:                              EMIT.
* EMIT:                                  Manual.
* EMPTY-BUFFERS:                         EMPTY-BUFFERS.
* END-CODE:                              A4.
* ENVIRONMENT <1>:                       ENVIRONMENT.
* ENVIRONMENT <2>:                       ENVIRONMENT?.
* ENVIRONMENT:                           ENVIRONMENTS.
* ENVIRONMENT? <1>:                      ENVIRONMENT.
* ENVIRONMENT?:                          ENVIRONMENT?.
* ERASE:                                 ERASE.
* ERROR <1>:                             INTERPRET.
* ERROR <2>:                             WHERE.
* ERROR <3>:                             ERROR.
* ERROR:                                 ?ERROR.
* ERRSCR <1>:                            MESSAGE.
* ERRSCR:                                ERRSCR.
* ES|:                                   A8.
* ETYPE:                                 ETYPE.
* EVALUATE:                              EVALUATE.
* EXECUTE:                               EXECUTE.
* EXIT <1>:                              ;.
* EXIT <2>:                              paren_semicolon.
* EXIT <3>:                              EXIT.
* EXIT:                                  AGAIN.
* EXIT-CODE:                             EXIT-CODE.
* EXPECT:                                Manual.
* F:                                     INTERPRET.
* FAR-DP:                                Manual.
* FARDUMP:                               Manual.
* FARMOVE:                               FARMOVE.
* FENCE <1>:                             FENCE.
* FENCE:                                 Errors.
* FILL <1>:                              FILL.
* FILL:                                  BLANK.
* FIND <1>:                              FIND.
* FIND <2>:                              tick_iso.
* FIND:                                  tick_denotation.
* FIRST <1>:                             FIRST.
* FIRST:                                 Manual.
* FLD:                                   FLD.
* FLUSH:                                 FLUSH.
* FM/MOD:                                FM/MOD.
* FOR-VOCS <1>:                          FORGET-VOC.
* FOR-VOCS:                              FOR-VOCS.
* FOR-WORDS:                             FOR-WORDS.
* FORGET <1>:                            VOC-LINK.
* FORGET <2>:                            FENCE.
* FORGET <3>:                            FORGET.
* FORGET <4>:                            Errors.
* FORGET:                                Manual.
* FORGET-VOC:                            FORGET-VOC.
* FORTH <1>:                             ONLY.
* FORTH <2>:                             FORTH.
* FORTH <3>:                             bracket_compile.
* FORTH:                                 Manual.
* FORWARD):                              forward_paren.
* FOUND:                                 FOUND.
* F| <1>:                                AE.
* F| <2>:                                AA.
* F|:                                    A7.
* GET-FILE:                              GET-FILE.
* H.:                                    Manual.
* HANDLER:                               HANDLER.
* HERE <1>:                              s_quote.
* HERE <2>:                              WORD.
* HERE <3>:                              dot_quote.
* HERE <4>:                              ALIGN.
* HERE <5>:                              PAD.
* HERE <6>:                              HERE.
* HERE <7>:                              DP.
* HERE <8>:                              CREATE.
* HERE <9>:                              forward_paren.
* HERE <10>:                             back_paren.
* HERE <11>:                             paren_back.
* HERE <12>:                             UNTIL.
* HERE <13>:                             THEN.
* HERE <14>:                             REPEAT.
* HERE <15>:                             ELSE.
* HERE <16>:                             AGAIN.
* HERE <17>:                             +LOOP.
* HERE:                                  Manual.
* HEX:                                   HEX.
* HIDDEN <1>:                            HIDDEN.
* HIDDEN:                                paren_create.
* HLD:                                   HLD.
* HOLD:                                  HOLD.
* I <1>:                                 I.
* I:                                     DO.
* IB,:                                   A7.
* ID.:                                   ID..
* IF <1>:                                LOGIC.
* IF <2>:                                ?DUP.
* IF <3>:                                0BRANCH.
* IF <4>:                                THEN.
* IF <5>:                                IF.
* IF <6>:                                ELSE.
* IF:                                    Errors.
* IL, <1>:                               A8.
* IL, <2>:                               A7.
* IL,:                                   A4.
* IMMEDIATE <1>:                         IMMEDIATE.
* IMMEDIATE:                             VOCABULARY.
* IMUL|AD,:                              A6.
* IN <1>:                                PARSING.
* IN <2>:                                paren_iso_in.
* IN <3>:                                IN.
* IN:                                    >IN.
* IN[]:                                  in_next.
* INCLUDE:                               Manual.
* INCLUDED <1>:                          INCLUDED.
* INCLUDED:                              Manual.
* INDEX:                                 INDEX.
* INTERPRET <1>:                         set_source.
* INTERPRET <2>:                         INTERPRET.
* INTERPRET <3>:                         QUIT.
* INTERPRET <4>:                         VOCABULARY.
* INTERPRET:                             Errors.
* INVERT:                                INVERT.
* IP:                                    BRANCH.
* IW, <1>:                               A8.
* IW,:                                   A7.
* J:                                     J.
* J,:                                    A7.
* J|X,:                                  A7.
* KEY <1>:                               KEY.
* KEY <2>:                               KEY?.
* KEY:                                   Manual.
* KEY? <1>:                              KEY?.
* KEY?:                                  Manual.
* L!:                                    L!.
* L, <1>:                                A8.
* L, <2>:                                A7.
* L,:                                    A4.
* L@:                                    long_fetch.
* LATEST:                                LATEST.
* LDA,:                                  AB.
* LDS,:                                  AB.
* LEA, <1>:                              AF.
* LEA,:                                  A4.
* LEAVE <1>:                             UNLOOP.
* LEAVE:                                 LEAVE.
* LIMIT <1>:                             LIMIT.
* LIMIT:                                 Manual.
* LINOS:                                 LINOS.
* LINOS5 <1>:                            LINOS.
* LINOS5:                                LINOS5.
* LIST <1>:                              SCR.
* LIST <2>:                              LIST.
* LIST:                                  Errors.
* LIT:                                   LIT.
* LITERAL:                               LITERAL.
* LOAD <1>:                              LOAD.
* LOAD <2>:                              BLOCK.
* LOAD <3>:                              Errors.
* LOAD:                                  Manual.
* LOCATE:                                Manual.
* LOCK:                                  LOCK.
* LODS:                                  AB.
* LOOP <1>:                              UNLOOP.
* LOOP <2>:                              LOOP.
* LOOP <3>:                              LEAVE.
* LOOP <4>:                              EXIT.
* LOOP <5>:                              DO.
* LOOP <6>:                              CO.
* LOOP:                                  Errors.
* LSHIFT:                                LSHIFT.
* L|DS,:                                 AB.
* M*:                                    M*.
* M/MOD:                                 M/MOD.
* MAX:                                   MAX.
* MEM|:                                  A7.
* MESSAGE <1>:                           WRITE-FILE.
* MESSAGE <2>:                           REPOSITION-FILE.
* MESSAGE <3>:                           READ-FILE.
* MESSAGE <4>:                           OPEN-FILE.
* MESSAGE <5>:                           DELETE-FILE.
* MESSAGE <6>:                           CREATE-FILE.
* MESSAGE <7>:                           CLOSE-FILE.
* MESSAGE <8>:                           MESSAGE.
* MESSAGE:                               ERROR.
* MIN:                                   MIN.
* MOD <1>:                               MOD.
* MOD:                                   OPERATOR.
* MOV,:                                  A4.
* MOVE:                                  MOVE.
* MOV|FA,:                               AB.
* MOV|TA,:                               AB.
* MS:                                    MS.
* MYTYPE:                                Manual.
* NAME:                                  NAME.
* NEGATE:                                NEGATE.
* NEW-IF:                                Errors.
* NO-DEBUG:                              Manual.
* NOOP:                                  NOOP.
* NUMBER <1>:                            NUMBER.
* NUMBER <2>:                            den_b.
* NUMBER <3>:                            den_seven.
* NUMBER <4>:                            den_zero.
* NUMBER <5>:                            Prefix_-.
* NUMBER <6>:                            Prefix_+.
* NUMBER:                                DENOTATIONS.
* Number_1:                              Number_1.
* Number_2:                              Number_2.
* O'|:                                   A7.
* OFFSET:                                OFFSET.
* OK:                                    OK.
* ONLY <1>:                              PREVIOUS.
* ONLY <2>:                              ONLY.
* ONLY <3>:                              ALSO.
* ONLY <4>:                              INTERPRET.
* ONLY <5>:                              DENOTATIONS.
* ONLY:                                  Errors.
* OPEN-FILE:                             OPEN-FILE.
* OPT:                                   optimiser.
* OPTIONS:                               OPTIONS.
* OR <1>:                                OR.
* OR:                                    A7.
* OS-IMPORT:                             Manual.
* OS: <1>:                               AA.
* OS::                                   A8.
* OS:,:                                  A7.
* OUT <1>:                               TYPE.
* OUT <2>:                               OUT.
* OUT:                                   EMIT.
* OVER:                                  OVER.
* OW,:                                   AF.
* O|:                                    A7.
* P!:                                    P!.
* P@:                                    port_fetch.
* PAD <1>:                               <#.
* PAD:                                   PAD.
* PC!:                                   PC!.
* PC@:                                   port_char_fetch.
* POSTPONE <1>:                          IMMEDIATE.
* POSTPONE:                              POSTPONE.
* PREFIX:                                PREFIX.
* Prefix_":                              den_quote.
* Prefix_&:                              Prefix_&.
* Prefix_+:                              Prefix_+.
* Prefix_-:                              Prefix_-.
* Prefix_0 <1>:                          den_zero.
* Prefix_0:                              DENOTATIONS.
* Prefix_7:                              den_seven.
* Prefix_^:                              Prefix_^.
* Prefix__TICK:                          tick_denotation.
* Prefix_B:                              den_b.
* PRESENT:                               PRESENT.
* PREV <1>:                              PREV.
* PREV <2>:                              +BUF.
* PREV:                                  UPDATE.
* PREVIOUS:                              PREVIOUS.
* PUT-FILE <1>:                          PUT-FILE.
* PUT-FILE:                              Manual.
* QUIT <1>:                              next_screen.
* QUIT <2>:                              QUIT.
* QUIT <3>:                              ABORT.
* QUIT:                                  Manual.
* R#:                                    R#.
* R/W:                                   Manual.
* R0 <1>:                                R0.
* R0:                                    Manual.
* R> <1>:                                R>.
* R> <2>:                                >R.
* R> <3>:                                EXIT.
* R>:                                    CO.
* R@:                                    r_fetch.
* R\W:                                   R\W.
* RB, RW, RL,:                           AE.
* RDROP:                                 RDROP.
* READ-FILE:                             READ-FILE.
* RECURSE:                               RECURSE.
* REFILL:                                Manual.
* REFILL-TIB:                            REFILL-TIB.
* REMAINDER:                             REMAINDER.
* REPEAT <1>:                            BRANCH.
* REPEAT <2>:                            WHILE.
* REPEAT <3>:                            REPEAT.
* REPEAT:                                BEGIN.
* REPOSITION-FILE:                       REPOSITION-FILE.
* REQUIRE:                               Manual.
* REQUIRE ASSEMBLERi86:                  A9.
* REQUIRED <1>:                          Errors.
* REQUIRED:                              Manual.
* RESTORE <1>:                           SAVE-INPUT.
* RESTORE:                               RESTORE.
* RESTORE-INPUT:                         RESTORE-INPUT.
* RL,:                                   A8.
* ROT:                                   ROT.
* RSHIFT:                                RSHIFT.
* RSP!:                                  RSP!.
* RSP@:                                  r_s_p_fetch.
* RST:                                   A5.
* RUBOUT <1>:                            RUBOUT.
* RUBOUT:                                Manual.
* RW,:                                   A8.
* RW-BUFFER <1>:                         ZEN.
* RW-BUFFER:                             RW-BUFFER.
* R|:                                    AA.
* S":                                    s_quote.
* S0 <1>:                                S0.
* S0:                                    Manual.
* S>D:                                   S>D.
* SAVE <1>:                              SAVE.
* SAVE:                                  RESTORE.
* SAVE-INPUT:                            SAVE-INPUT.
* SAVE-SYSTEM:                           Manual.
* SCR <1>:                               SCR.
* SCR:                                   LIST.
* SDLITERAL:                             SDLITERAL.
* SEEK:                                  SEEK.
* SET,:                                  A7.
* SET-SRC <1>:                           set_source.
* SET-SRC:                               REFILL-TIB.
* SET-TERM:                              SET-TERM.
* SG,:                                   A7.
* SHELL:                                 SHELL.
* SHOW-ALL,:                             A6.
* SHOW-OPCODES:                          A6.
* SHOW: <1>:                             AF.
* SHOW::                                 A2.
* SIB, <1>:                              AA.
* SIB,:                                  A7.
* SIB,,:                                 AC.
* SIB|:                                  A7.
* SIB|,:                                 AA.
* SIGN <1>:                              SIGN.
* SIGN:                                  <#.
* SKIP:                                  SKIP.
* SLITERAL:                              Manual.
* SM/REM:                                SM/REM.
* SOURCE <1>:                            SOURCE.
* SOURCE:                                QUIT.
* SPACE:                                 SPACE.
* SPACES:                                SPACES.
* SRC <1>:                               SRC.
* SRC <2>:                               REFILL-TIB.
* SRC <3>:                               SAVE.
* SRC <4>:                               SAVE-INPUT.
* SRC:                                   RESTORE.
* ST0:                                   ABA.
* ST1:                                   ABA.
* STA,:                                  AB.
* STALEST:                               STALEST.
* STATE <1>:                             STATE.
* STATE <2>:                             INTERPRET.
* STATE <3>:                             OK.
* STATE <4>:                             DENOTATIONS.
* STATE:                                 :.
* SUPPLIER:                              SUPPLIER.
* SWAP:                                  SWAP.
* SYSTEM <1>:                            SYSTEM.
* SYSTEM <2>:                            SHELL.
* SYSTEM:                                Manual.
* TASK:                                  TASK.
* TERMIO <1>:                            TERMIO.
* TERMIO:                                SET-TERM.
* TEST:                                  Gentle Introduction.
* THEN <1>:                              THEN.
* THEN <2>:                              IF.
* THEN <3>:                              ELSE.
* THEN:                                  Errors.
* THROW <1>:                             HANDLER.
* THROW <2>:                             THROW.
* THROW <3>:                             ERROR.
* THROW <4>:                             CATCH.
* THROW <5>:                             Errors.
* THROW:                                 Manual.
* THRU:                                  THRU.
* TIB <1>:                               REFILL-TIB.
* TIB:                                   TIB.
* TOGGLE:                                TOGGLE.
* TRIAD:                                 TRIAD.
* TUCK:                                  Manual.
* TURNKEY:                               Manual.
* TYPE <1>:                              TYPE.
* TYPE <2>:                              OUT.
* TYPE <3>:                              EMIT.
* TYPE <4>:                              dot_quote.
* TYPE:                                  Manual.
* T| <1>:                                AE.
* T| <2>:                                AA.
* T|:                                    A7.
* U.:                                    u_dot.
* U0 <1>:                                U0.
* U0:                                    Manual.
* U<:                                    U<.
* UM*:                                   UM*.
* UM/MOD:                                UM/MOD.
* UNLOCK <1>:                            UNLOCK.
* UNLOCK:                                LOCK.
* UNLOOP:                                UNLOOP.
* UNTIL <1>:                             0BRANCH.
* UNTIL <2>:                             UNTIL.
* UNTIL:                                 BEGIN.
* UPDATE <1>:                            PREV.
* UPDATE <2>:                            FLUSH.
* UPDATE:                                UPDATE.
* USER <1>:                              USER.
* USER:                                  Manual.
* VARIABLE <1>:                          VARIABLE.
* VARIABLE:                              Manual.
* VERSION:                               VERSION.
* VOC-LINK:                              VOC-LINK.
* VOCABULARY <1>:                        VOC-LINK.
* VOCABULARY <2>:                        ONLY.
* VOCABULARY <3>:                        WORDLISTS.
* VOCABULARY <4>:                        VOCABULARY.
* VOCABULARY:                            Manual.
* W, <1>:                                A8.
* W,:                                    A7.
* WARM:                                  WARM.
* WARNING <1>:                           WARNING.
* WARNING <2>:                           MESSAGE.
* WARNING:                               BLOCK-INIT.
* WHERE <1>:                             WHERE.
* WHERE:                                 ERROR.
* WHILE <1>:                             0BRANCH.
* WHILE <2>:                             WHILE.
* WHILE:                                 REPEAT.
* WITHIN:                                WITHIN.
* WORD <1>:                              WORD.
* WORD <2>:                              REFILL-TIB.
* WORD <3>:                              tick_iso.
* WORD:                                  tick_denotation.
* WORDS:                                 WORDS.
* words:                                 Errors.
* WRITE-FILE:                            WRITE-FILE.
* X:                                     AA.
* X'|:                                   A7.
* X,:                                    AA.
* XOR:                                   XOR.
* XO| <1>:                               AA.
* XO|:                                   A7.
* X| <1>:                                AF.
* X| <2>:                                AA.
* X| <3>:                                A7.
* X|:                                    A4.
* Z'|:                                   AE.
* ZEN:                                   ZEN.
* ZO|:                                   A7.
* ~MATCH:                                unmatch.
* ~SIB,:                                 AC.


File: ci86.lina.info,  Node: Concept Index,  Up: Top

Concept Index
*************

   Mostly the first reference is where the concept is explained.  But
sometimes in introductory and tutorial sections an explanation
sometimes was considered too distracting.

* Menu:

* aligned <1>:                           ALIGN.
* aligned:                               ALIGNED.
* allocating:                            Manual.
* ambiguous condition:                   Manual.
* blocks <1>:                            BLOCK-FILE.
* blocks <2>:                            BLOCKS.
* blocks:                                Manual.
* case sensitive <1>:                    Errors.
* case sensitive:                        Top.
* cell <1>:                              MEMORY.
* cell <2>:                              Glossary.
* cell:                                  Manual.
* ciforth specific behaviour:            Manual.
* code field:                            Manual.
* code field address <1>:                EXECUTE.
* code field address <2>:                >CFA.
* code field address:                    Manual.
* code word:                             Manual.
* colon definition:                      Manual.
* compilation mode:                      Gentle Introduction.
* compilation word list:                 CURRENT.
* computation stack:                     Manual.
* crash:                                 Manual.
* current input source <1>:              BLK.
* current input source <2>:              paren_blk.
* current input source <3>:              UNLOCK.
* current input source <4>:              THRU.
* current input source <5>:              LOCK.
* current input source <6>:              LOAD.
* current input source <7>:              SRC.
* current input source <8>:              SOURCE.
* current input source <9>:              set_source.
* current input source <10>:             in_next.
* current input source <11>:             EVALUATE.
* current input source <12>:             paren_word.
* current input source <13>:             paren_parse.
* current input source <14>:             PARSING.
* current input source <15>:             paren_number.
* current input source <16>:             SAVE.
* current input source:                  RESTORE.
* data:                                  >BODY.
* data field:                            Manual.
* data field address <1>:                >DFA.
* data field address:                    Manual.
* data stack <1>:                        R>.
* data stack <2>:                        >R.
* data stack <3>:                        STACKS.
* data stack <4>:                        JUGGLING.
* data stack:                            Manual.
* DEA <1>:                               EXECUTE.
* DEA <2>:                               optimiser.
* DEA <3>:                               FOR-WORDS.
* DEA <4>:                               FOR-VOCS.
* DEA <5>:                               >CFA.
* DEA <6>:                               paren_find.
* DEA <7>:                               BODY>.
* DEA <8>:                               DICTIONARY.
* DEA:                                   Manual.
* defining word <1>:                     DEFINING.
* defining word <2>:                     Errors.
* defining word <3>:                     Manual.
* defining word:                         Gentle Introduction.
* denotation <1>:                        ONLY.
* denotation <2>:                        STRING.
* denotation <3>:                        INTERPRET.
* denotation <4>:                        bracket_tick_bracket.
* denotation <5>:                        PRESENT.
* denotation <6>:                        FOUND.
* denotation <7>:                        tick_iso.
* denotation <8>:                        tick_denotation.
* denotation <9>:                        DENOTATIONS.
* denotation <10>:                       Errors.
* denotation:                            Manual.
* denotations:                           PREFIX.
* dictionary:                            Manual.
* dictionary entry <1>:                  VOC-LINK.
* dictionary entry <2>:                  CURRENT.
* dictionary entry:                      Manual.
* dictionary entry address <1>:          CFA>.
* dictionary entry address <2>:          >BODY.
* dictionary entry address <3>:          DICTIONARY.
* dictionary entry address <4>:          Glossary.
* dictionary entry address:              Manual.
* dictionary pointer <1>:                DP.
* dictionary pointer <2>:                c_comma.
* dictionary pointer <3>:                ALLOT.
* dictionary pointer <4>:                comma.
* dictionary pointer:                    Manual.
* double <1>:                            MULTIPLYING.
* double <2>:                            MEMORY.
* double <3>:                            FORMATTING.
* double <4>:                            DOUBLE.
* double <5>:                            Glossary.
* double:                                Manual.
* execution token <1>:                   EXECUTE.
* execution token <2>:                   bracket_tick_bracket.
* execution token <3>:                   tick_iso.
* execution token <4>:                   tick_denotation.
* execution token:                       Manual.
* extra field address:                   >XFA.
* family of instructions:                A4.
* field address:                         Manual.
* flag <1>:                              LOGIC.
* flag:                                  Glossary.
* flag field address <1>:                >FFA.
* flag field address:                    Manual.
* floored division:                      OPERATOR.
* Forth flag <1>:                        LOGIC.
* Forth flag:                            Glossary.
* high level <1>:                        MULTIPLYING.
* high level:                            Manual.
* immediate bit:                         Manual.
* in line:                               COMPILING.
* index line:                            Manual.
* inner interpreter:                     Manual.
* library:                               Manual.
* Library Addressable by Block:          Manual.
* library file <1>:                      BLOCK-FILE.
* library file:                          Errors.
* link field address <1>:                >LFA.
* link field address <2>:                VOCABULARY.
* link field address:                    Manual.
* load <1>:                              SCREEN.
* load:                                  Manual.
* logical not:                           INVERT.
* mnemonic message:                      Errors.
* name field address <1>:                >NFA.
* name field address:                    Manual.
* nesting:                               Manual.
* nil pointer <1>:                       PRESENT.
* nil pointer <2>:                       VOCABULARY.
* nil pointer <3>:                       SDLITERAL.
* nil pointer:                           Glossary.
* number:                                Manual.
* number base:                           FORMATTING.
* old fashioned string <1>:              $!-BD.
* old fashioned string <2>:              STRING.
* old fashioned string:                  FIND.
* outer interpreter:                     PARSING.
* override the error detection:          A8.
* past header:                           Manual.
* past header address <1>:               >PHA.
* past header address:                   Manual.
* preferences:                           Manual.
* prefix:                                PREFIX.
* primed registers:                      AE.
* return stack <1>:                      R>.
* return stack <2>:                      >R.
* return stack <3>:                      STACKS.
* return stack:                          Manual.
* revectoring <1>:                       TYPE.
* revectoring <2>:                       ETYPE.
* revectoring <3>:                       BODY>.
* revectoring:                           Manual.
* scaled index byte:                     AC.
* screen <1>:                            LIST.
* screen <2>:                            SCREEN.
* screen:                                Manual.
* search order <1>:                      FORTH.
* search order <2>:                      DEFINITIONS.
* search order <3>:                      CONTEXT.
* search order <4>:                      paren_find.
* search order:                          ;CODE.
* search-order:                          INTERPRET.
* SIB:                                   AE.
* signal an error <1>:                   ?ERROR.
* signal an error:                       ?DISK-ERROR.
* smart:                                 PREFIX.
* smudge:                                Manual.
* source field address:                  >SFA.
* stack:                                 Manual.
* stack pointer <1>:                     STACKS.
* stack pointer:                         Manual.
* string constant <1>:                   STRING.
* string constant <2>:                   unmatch.
* string constant:                       Glossary.
* string variable:                       STRING.
* symmetric division <1>:                MOD.
* symmetric division <2>:                /.
* symmetric division <3>:                /MOD.
* symmetric division <4>:                OPERATOR.
* symmetric division <5>:                */.
* symmetric division:                    */MOD.
* turnkey system:                        Manual.
* user area:                             Manual.
* vectoring:                             Manual.
* VLFA:                                  VOCABULARY.
* vocabulary:                            Manual.
* WID <1>:                               PREVIOUS.
* WID <2>:                               FORTH.
* WID <3>:                               ALSO.
* WID <4>:                               WORDLISTS.
* WID <5>:                               >WID.
* WID <6>:                               paren_find.
* WID <7>:                               VOCABULARY.
* WID:                                   Manual.
* word:                                  Gentle Introduction.
* word list <1>:                         ONLY.
* word list <2>:                         FORTH.
* word list <3>:                         ENVIRONMENT.
* word list <4>:                         WORDLISTS.
* word list <5>:                         VOCABULARY.
* word list:                             Manual.
* word list associated with:             VOCABULARY.
* word list identifier <1>:              WORDLISTS.
* word list identifier <2>:              VOCABULARY.
* word list identifier:                  Manual.
* wordset:                               Glossary.



Tag Table:
Node: Top82
Node: Gentle Introduction2356
Node: Rationale & legalese7448
Node: Manual11355
Node: Assembler55401
Node: A256108
Node: A359417
Node: A460962
Node: A563990
Node: A665161
Node: A766431
Node: A872539
Node: A975005
Node: AA76010
Node: AB78506
Node: ABA81961
Node: AC84476
Node: AE86362
Node: AF89995
Node: Errors93258
Node: Documentation105199
Node: Glossary105979
Node: BLOCKS110126
Node: #BUFF110946
Node: ?DISK-ERROR111339
Node: B/BUF111688
Node: BLOCK-EXIT112014
Node: BLOCK-FILE112499
Node: BLOCK-HANDLE113029
Node: BLOCK-INIT113409
Node: BLOCK113965
Node: DISK-ERROR114658
Node: EMPTY-BUFFERS115047
Node: R\W115484
Node: UPDATE116022
Node: paren_buffer116482
Node: +BUF117542
Node: FIRST117909
Node: FLUSH118160
Node: LIMIT118543
Node: OFFSET118861
Node: PREV119333
Node: RESTORE-INPUT119684
Node: RESTORE120396
Node: SAVE-INPUT120802
Node: SAVE121307
Node: SEEK121648
Node: STALEST121967
Node: COMPILING122255
Node: DLITERAL122721
Node: LITERAL123167
Node: POSTPONE123820
Node: bracket_compile124280
Node: LIT124784
Node: SDLITERAL125188
Node: CONTROL125705
Node: +LOOP126533
Node: ?DO127469
Node: AGAIN127866
Node: BEGIN128427
Node: CO129175
Node: DO129543
Node: ELSE130523
Node: EXIT131270
Node: IF131706
Node: I132570
Node: J132806
Node: LEAVE133073
Node: LOOP133371
Node: RECURSE134115
Node: REPEAT134354
Node: SKIP134955
Node: THEN135342
Node: UNLOOP135933
Node: UNTIL136312
Node: WHILE136902
Node: paren_plus_loop137781
Node: paren_semicolon138097
Node: paren_question_do138526
Node: paren_back138838
Node: paren_do139167
Node: paren_forward139463
Node: paren_loop139810
Node: 0BRANCH140104
Node: back_paren140517
Node: BRANCH140851
Node: forward_paren141241
Node: DEFINING141585
Node: :142104
Node: ;142705
Node: CONSTANT142961
Node: CREATE143354
Node: DOES>144218
Node: USER144895
Node: VARIABLE145522
Node: VOCABULARY146044
Node: paren_semicolon_code147380
Node: paren_create147873
Node: ;CODE148505
Node: DENOTATIONS149348
Node: den_quote150570
Node: Prefix_&150931
Node: Prefix_+151270
Node: Prefix_-151506
Node: den_zero151742
Node: den_seven152173
Node: den_b152485
Node: Prefix_^152797
Node: tick_denotation153192
Node: DICTIONARY154187
Node: tick_iso155343
Node: comma156335
Node: >BODY156611
Node: ALLOT156986
Node: BODY>157356
Node: c_comma157820
Node: DP158094
Node: FIND158428
Node: FORGET158935
Node: FOUND159321
Node: HERE159855
Node: ID.160104
Node: IMMEDIATE160384
Node: PAD160944
Node: PREFIX161266
Node: PRESENT162157
Node: WORDS162574
Node: bracket_tick_bracket162850
Node: paren_find163449
Node: >CFA164040
Node: >DFA164602
Node: >FFA165121
Node: >LFA165400
Node: >NFA165736
Node: >PHA166015
Node: >SFA166387
Node: >VFA166677
Node: >WID166979
Node: >XFA167320
Node: CFA>167609
Node: FENCE167879
Node: FOR-VOCS168198
Node: FOR-WORDS168552
Node: FORGET-VOC169075
Node: HIDDEN169686
Node: optimiser170316
Node: unmatch170904
Node: DOUBLE171395
Node: D+171753
Node: DABS172015
Node: DNEGATE172257
Node: S>D172469
Node: ENVIRONMENTS172661
Node: CORE173138
Node: CPU173387
Node: ENVIRONMENT?173652
Node: NAME174169
Node: SUPPLIER174439
Node: VERSION174720
Node: ERRORS174984
Node: ?ERROR175356
Node: ?ERRUR175939
Node: abort_quote176339
Node: CATCH176776
Node: ERROR177446
Node: ERRSCR177984
Node: MESSAGE178487
Node: THROW179169
Node: WARNING179699
Node: WHERE180239
Node: paren_abort_quote180706
Node: HANDLER180917
Node: FILES181495
Node: CLOSE-FILE181933
Node: CREATE-FILE182360
Node: DELETE-FILE182977
Node: GET-FILE183388
Node: INCLUDED183707
Node: OPEN-FILE184015
Node: PUT-FILE184552
Node: READ-FILE184861
Node: REPOSITION-FILE185383
Node: WRITE-FILE185817
Node: RW-BUFFER186282
Node: FORMATTING186556
Node: #>187413
Node: #S187680
Node: #187972
Node: <#188364
Node: >NUMBER188737
Node: BASE189658
Node: DECIMAL189954
Node: HEX190202
Node: HOLD190456
Node: SIGN190779
Node: paren_number191128
Node: DIGIT191835
Node: DPL192226
Node: FLD192625
Node: HLD192870
Node: NUMBER193163
Node: INIT193750
Node: +ORIGIN194026
Node: ABORT194685
Node: COLD195210
Node: OK195809
Node: OPTIONS196126
Node: QUIT196658
Node: WARM197134
Node: INPUT197462
Node: paren_accept197905
Node: >IN198455
Node: ACCEPT198933
Node: IN199547
Node: KEY?199942
Node: KEY200251
Node: RUBOUT200489
Node: TIB200857
Node: paren_iso_in201109
Node: REFILL-TIB201534
Node: REMAINDER202471
Node: SET-TERM202827
Node: TERMIO203289
Node: JUGGLING203554
Node: 2DROP204210
Node: 2DUP204470
Node: 2OVER204689
Node: 2SWAP204935
Node: ?DUP205159
Node: DROP205531
Node: DUP205739
Node: OVER205951
Node: ROT206195
Node: SWAP206458
Node: LOGIC206673
Node: 0<207573
Node: 0=207831
Node: <>208083
Node: <208337
Node: =208582
Node: >208820
Node: AND209069
Node: INVERT209308
Node: OR209595
Node: U<209827
Node: XOR210101
Node: MEMORY210323
Node: !211038
Node: +!211270
Node: 2!211475
Node: two_fetch211769
Node: fetch212071
Node: ALIGNED212322
Node: ALIGN212594
Node: BLANK212920
Node: BM213122
Node: C!213355
Node: c_fetch213659
Node: CELL+213984
Node: CELLS214359
Node: CHAR+214726
Node: CHARS215106
Node: CMOVE215426
Node: CORA215871
Node: EM216404
Node: ERASE216648
Node: FARMOVE216868
Node: FILL217491
Node: L!217781
Node: long_fetch218023
Node: MOVE218270
Node: P!218667
Node: port_fetch219063
Node: PC!219498
Node: port_char_fetch219934
Node: TOGGLE220367
Node: WITHIN220628
Node: MISC220995
Node: dot_cpu221242
Node: EXECUTE221650
Node: NOOP222073
Node: TASK222265
Node: U0222511
Node: _222899
Node: MULTIPLYING223118
Node: */MOD223819
Node: */224309
Node: FM/MOD224691
Node: M*225127
Node: M/MOD225451
Node: SM/REM225818
Node: UM*226253
Node: UM/MOD226579
Node: OPERATINGSYSTEM226899
Node: ARGS227281
Node: BYE227813
Node: EXIT-CODE228041
Node: LINOS5228461
Node: LINOS228900
Node: MS229386
Node: SHELL229586
Node: SYSTEM230082
Node: ZEN230366
Node: OPERATOR230822
Node: star232136
Node: +232395
Node: -232613
Node: /MOD232849
Node: /233183
Node: ABS233457
Node: LSHIFT233673
Node: MAX233988
Node: MIN234204
Node: MOD234417
Node: NEGATE234731
Node: RSHIFT234980
Node: OUTPUT235287
Node: paren_d_dot_r235735
Node: dot_quote236132
Node: dot_paren236775
Node: dot_r237188
Node: dot237533
Node: ?237804
Node: CR238072
Node: D.R238433
Node: D.238783
Node: EMIT239058
Node: ETYPE239391
Node: OUT239870
Node: SPACES240309
Node: SPACE240561
Node: TYPE240793
Node: u_dot241378
Node: PARSING241643
Node: paren_parse242488
Node: paren_word243185
Node: paren243861
Node: ?BLANK244379
Node: CHAR244766
Node: EVALUATE245222
Node: INTERPRET245521
Node: in_next246534
Node: set_source246953
Node: SOURCE247404
Node: SRC247668
Node: STATE248407
Node: WORD248660
Node: bracket_char_bracket249410
Node: left_bracket249806
Node: backslash250247
Node: righ_bracket250627
Node: SCREEN250850
Node: paren_line251592
Node: next_screen251908
Node: C/L252346
Node: INDEX252650
Node: LIST252976
Node: LOAD253317
Node: LOCK253784
Node: R#254195
Node: SCR254473
Node: THRU254720
Node: TRIAD255209
Node: UNLOCK255672
Node: paren_blk256061
Node: BLK256583
Node: SECURITY257185
Node: !CSP257668
Node: ?COMP257893
Node: ?CSP258101
Node: ?DELIM258324
Node: ?EXEC258553
Node: ?LOADING258770
Node: ?PAIRS258993
Node: ?STACK259296
Node: CSP259525
Node: STACKS259761
Node: dot_s260258
Node: >R260462
Node: DEPTH260785
Node: DSP!261036
Node: d_s_p_fetch261260
Node: R0261532
Node: R>261768
Node: r_fetch262023
Node: RDROP262244
Node: RSP!262468
Node: r_s_p_fetch262693
Node: S0262977
Node: STRING263209
Node: $!-BD264068
Node: $!264412
Node: $+!264660
Node: string_comma264918
Node: string_fetch265194
Node: $C+265446
Node: $I265689
Node: $S266052
Node: -TRAILING266612
Node: BL266904
Node: COUNT267113
Node: s_quote267638
Node: SUPERFLUOUS268166
Node: 0268567
Node: 1+268754
Node: 1-268959
Node: 2*269154
Node: 2/269469
Node: Number_1269937
Node: Number_2270149
Node: WORDLISTS270350
Node: ALSO271302
Node: ASSEMBLER271768
Node: CONTEXT272464
Node: CURRENT273347
Node: DEFINITIONS273868
Node: ENVIRONMENT274402
Node: FORTH274935
Node: LATEST275535
Node: ONLY275816
Node: PREVIOUS276521
Node: VOC-LINK276829
Node: Glossary Index277228
Node: Forth Word Index295562
Node: Concept Index338894

End Tag Table
