rebuild .html documentation; correct a filename reference (Rx.md -> image/retro.muri) reported by Martin Hohmann-Marriott

FossilOrigin-Name: 429b138d84f0284a5f7054165c02a40f33ecbe919165eebc5271a07a367864bc
This commit is contained in:
crc 2022-06-03 10:41:52 +00:00
parent cb66c677f1
commit e89789839b
58 changed files with 63 additions and 235 deletions

View file

@ -4225,10 +4225,10 @@ This caused a large number of issues over R11's life.
So on to Retro 12. I decided that this would be different. So on to Retro 12. I decided that this would be different.
First, the kernel would be assembly, with an external tool First, the kernel would be assembly, with an external tool
to generate the core image. The kernel is in `Rx.md` and the to generate the core image. The kernel is in `image/retro.muri`
assembler is `Muri`. To load the standard library, I wrote a and the assembler is `Muri`. To load the standard library, I
second tool, `Retro-extend`. This separation has allowed me wrote a second tool, `Retro-extend`. This separation has allowed
many fewer headaches as I can make changes more easily and me many fewer headaches as I can make changes more easily and
rebuild from scratch when necessary. rebuild from scratch when necessary.
But I miss self-hosting. So last fall I decided to resolve But I miss self-hosting. So last fall I decided to resolve

View file

@ -38,10 +38,10 @@ This caused a large number of issues over R11's life.
So on to Retro 12. I decided that this would be different. So on to Retro 12. I decided that this would be different.
First, the kernel would be assembly, with an external tool First, the kernel would be assembly, with an external tool
to generate the core image. The kernel is in `Rx.md` and the to generate the core image. The kernel is in `image/retro.muri`
assembler is `Muri`. To load the standard library, I wrote a and the assembler is `Muri`. To load the standard library, I
second tool, `Retro-extend`. This separation has allowed me wrote a second tool, `Retro-extend`. This separation has allowed
many fewer headaches as I can make changes more easily and me many fewer headaches as I can make changes more easily and
rebuild from scratch when necessary. rebuild from scratch when necessary.
But I miss self-hosting. So last fall I decided to resolve But I miss self-hosting. So last fall I decided to resolve

View file

@ -43,8 +43,7 @@
.hr { display: block; height: 2px; background: #000000; } .hr { display: block; height: 2px; background: #000000; }
</style> </style>
</head><body> </head><body>
<p><span class="h1">Customizing the Build</span> <p><br/><br/>
<br/><br/>
While a simple <span class="tt">make</span> will suffice for building Retro, there While a simple <span class="tt">make</span> will suffice for building Retro, there
are a number of ways to customize the build to your needs. are a number of ways to customize the build to your needs.
<br/><br/> <br/><br/>
@ -52,7 +51,6 @@ In this chapter, replace <span class="tt">Makefile</span> with <span class="tt">
are using GNU Make (most Linux and macOS users will probably are using GNU Make (most Linux and macOS users will probably
be using this). be using this).
<br/><br/> <br/><br/>
<span class="h2">I/O Devices</span>
<br/><br/> <br/><br/>
Many of the I/O devices are optional. The most common ones are Many of the I/O devices are optional. The most common ones are
enabled by default in the Makefile. Look near the end of the top enabled by default in the Makefile. Look near the end of the top
@ -88,13 +86,11 @@ If you want to build with sockets support, uncomment the
<span class="tt"># ENABLED += -DENABLE_SOCKETS</span> and <span class="tt">DEVICES += interface/sockets.retro</span> <span class="tt"># ENABLED += -DENABLE_SOCKETS</span> and <span class="tt">DEVICES += interface/sockets.retro</span>
lines before building. lines before building.
<br/><br/> <br/><br/>
<span class="h2">Compiler Flags</span>
<br/><br/> <br/><br/>
You may need or want to adjust the compiler flags. In the first You may need or want to adjust the compiler flags. In the first
section of the <span class="tt">Makefile</span>, look for <span class="tt">CFLAGS</span> and add/change as section of the <span class="tt">Makefile</span>, look for <span class="tt">CFLAGS</span> and add/change as
desired to override the defaults. desired to override the defaults.
<br/><br/> <br/><br/>
<span class="h2">VM Tweaks</span>
<br/><br/> <br/><br/>
<span class="h3">64-Bit</span> <span class="h3">64-Bit</span>
<br/><br/> <br/><br/>
@ -103,7 +99,6 @@ this to 64-bit though. For a one-off build:
<br/><br/> <br/><br/>
<tt class='indentedcode'>make&nbsp;OPTIONS=-DBIT64</tt> <tt class='indentedcode'>make&nbsp;OPTIONS=-DBIT64</tt>
<br/><br/> <br/><br/>
<span class="h3">Stack Size</span>
<br/><br/> <br/><br/>
You can alter the stack sizes by defining <span class="tt">STACK_DEPTH</span> and You can alter the stack sizes by defining <span class="tt">STACK_DEPTH</span> and
<span class="tt">ADDRESSES</span>. For a one-off build with a max stack depth of 4000 <span class="tt">ADDRESSES</span>. For a one-off build with a max stack depth of 4000
@ -111,7 +106,6 @@ items and 500 addresses on the return stack:
<br/><br/> <br/><br/>
<tt class='indentedcode'>make&nbsp;OPTIONS="-DSTACK_DEPTH=4000&nbsp;-DADDRESSES=500</tt> <tt class='indentedcode'>make&nbsp;OPTIONS="-DSTACK_DEPTH=4000&nbsp;-DADDRESSES=500</tt>
<br/><br/> <br/><br/>
<span class="h3">Image Size</span>
<br/><br/> <br/><br/>
You can also alter the image size. Again, for a one-off build: You can also alter the image size. Again, for a one-off build:
<br/><br/> <br/><br/>
@ -119,7 +113,6 @@ You can also alter the image size. Again, for a one-off build:
<br/><br/> <br/><br/>
Would build a system with a maximum image size of 4,000,000 cells. Would build a system with a maximum image size of 4,000,000 cells.
<br/><br/> <br/><br/>
<span class="h3">Update the Makefile</span>
<br/><br/> <br/><br/>
If you do any of these routinely, edit the Makefile to include them. If you do any of these routinely, edit the Makefile to include them.
<br/><br/> <br/><br/>
@ -129,7 +122,6 @@ If you do any of these routinely, edit the Makefile to include them.
<tt class='indentedcode'>OPTIONS&nbsp;+=&nbsp;-DADDRESSES=500</tt> <tt class='indentedcode'>OPTIONS&nbsp;+=&nbsp;-DADDRESSES=500</tt>
<tt class='indentedcode'>OPTIONS&nbsp;+=&nbsp;-DIMAGE_SIZE=4000000</tt> <tt class='indentedcode'>OPTIONS&nbsp;+=&nbsp;-DIMAGE_SIZE=4000000</tt>
<br/><br/> <br/><br/>
<span class="h2">Further Image Customization</span>
<br/><br/> <br/><br/>
You can customize the image further by having the build process You can customize the image further by having the build process
include your code in the image. include your code in the image.

View file

@ -43,8 +43,7 @@
.hr { display: block; height: 2px; background: #000000; } .hr { display: block; height: 2px; background: #000000; }
</style> </style>
</head><body> </head><body>
<p><span class="h1">Building Alternative Systems</span> <p><br/><br/>
<br/><br/>
In addition to the C implementation, there are a few other In addition to the C implementation, there are a few other
interfaces that can be built. interfaces that can be built.
<br/><br/> <br/><br/>
@ -126,13 +125,11 @@ Building:
This will require a copy of the <span class="tt">ngaImage</span> in the This will require a copy of the <span class="tt">ngaImage</span> in the
current directory. current directory.
<br/><br/> <br/><br/>
<span class="h2">Python: retro.py</span>
<br/><br/> <br/><br/>
This is an implementation of <span class="tt">retro-repl</span> in Python. As This is an implementation of <span class="tt">retro-repl</span> in Python. As
with <span class="tt">retro-repl</span> it requires the <span class="tt">ngaImage</span> in the current with <span class="tt">retro-repl</span> it requires the <span class="tt">ngaImage</span> in the current
directory when starting. directory when starting.
<br/><br/> <br/><br/>
<span class="h2">C#: retro.cs</span>
<br/><br/> <br/><br/>
This is an implementation of <span class="tt">retro-repl</span> in C#. As with This is an implementation of <span class="tt">retro-repl</span> in C#. As with
<span class="tt">retro-repl</span> it requires the <span class="tt">ngaImage</span> in the current <span class="tt">retro-repl</span> it requires the <span class="tt">ngaImage</span> in the current

View file

@ -43,9 +43,7 @@
.hr { display: block; height: 2px; background: #000000; } .hr { display: block; height: 2px; background: #000000; }
</style> </style>
</head><body> </head><body>
<p><span class="h1">Obtaining Retro</span> <p><br/><br/>
<br/><br/>
<span class="h2">Stable Releases</span>
<br/><br/> <br/><br/>
I periodically make stable releases. This will typically happen I periodically make stable releases. This will typically happen
quarterly. quarterly.
@ -64,7 +62,6 @@ URLs:
&bull; http://forthworks.com/retro/r/latest.tar.gz<br/> &bull; http://forthworks.com/retro/r/latest.tar.gz<br/>
&bull; gopher://forthworks.com/9/retro/r/latest.tar.gz<br/> &bull; gopher://forthworks.com/9/retro/r/latest.tar.gz<br/>
<br/><br/> <br/><br/>
<span class="h2">Fossil Repository</span>
<br/><br/> <br/><br/>
I use a Fossil repository to manage development. To obtain a I use a Fossil repository to manage development. To obtain a
copy of the repository install Fossil and: copy of the repository install Fossil and:
@ -85,7 +82,6 @@ If you have problems, check the version of Fossil you are
using. I am currently using Fossil 2.10, you may experience using. I am currently using Fossil 2.10, you may experience
issues checking out or cloning if using older versions. issues checking out or cloning if using older versions.
<br/><br/> <br/><br/>
<span class="h2">git Repository</span>
<br/><br/> <br/><br/>
There is now a read-only mirror of the fossil repository There is now a read-only mirror of the fossil repository
provided via git. This is hosted on sr.ht. provided via git. This is hosted on sr.ht.

View file

@ -43,8 +43,7 @@
.hr { display: block; height: 2px; background: #000000; } .hr { display: block; height: 2px; background: #000000; }
</style> </style>
</head><body> </head><body>
<p><span class="h1">Building on BSD, Linux, macOS, and other Unix Targets</span> <p><br/><br/>
<br/><br/>
Retro is well supported on BSD (tested on FreeBSD, NetBSD, Retro is well supported on BSD (tested on FreeBSD, NetBSD,
OpenBSD), Linux, and macOS systems. It should build on any OpenBSD), Linux, and macOS systems. It should build on any
of these without issue. of these without issue.
@ -75,7 +74,6 @@ In the <span class="tt">bin/</span> directory, you should see the following:
<tt class='indentedcode'>retro-embedimage</tt> <tt class='indentedcode'>retro-embedimage</tt>
<tt class='indentedcode'>retro-describe</tt> <tt class='indentedcode'>retro-describe</tt>
<br/><br/> <br/><br/>
<span class="h2">Test The Build</span>
<br/><br/> <br/><br/>
You can conduct a quick test of the build by running <span class="tt">bin/retro</span>: You can conduct a quick test of the build by running <span class="tt">bin/retro</span>:
<br/><br/> <br/><br/>
@ -94,7 +92,6 @@ or:
<br/><br/> <br/><br/>
<tt class='indentedcode'>sudo&nbsp;make&nbsp;install</tt> <tt class='indentedcode'>sudo&nbsp;make&nbsp;install</tt>
<br/><br/> <br/><br/>
<span class="h2">Platform Specific Notes</span>
<br/><br/> <br/><br/>
<span class="h3">Linux</span> <span class="h3">Linux</span>
<br/><br/> <br/><br/>

View file

@ -43,8 +43,7 @@
.hr { display: block; height: 2px; background: #000000; } .hr { display: block; height: 2px; background: #000000; }
</style> </style>
</head><body> </head><body>
<p><span class="h1">Building Retro on Windows</span> <p><br/><br/>
<br/><br/>
It is possible to build Retro on Windows, though a few of the It is possible to build Retro on Windows, though a few of the
extensions are not supported: extensions are not supported:
<br/><br/> <br/><br/>
@ -55,7 +54,6 @@ This is currently more difficult than on a Unix host. If you have
Windows 10 and WSL, it may be better to build under that (using Windows 10 and WSL, it may be better to build under that (using
the Unix instructions). the Unix instructions).
<br/><br/> <br/><br/>
<span class="h2">Setup Build Environment</span>
<br/><br/> <br/><br/>
Retro on Windows is built with TCC. Retro on Windows is built with TCC.
<br/><br/> <br/><br/>
@ -65,7 +63,6 @@ Download the <strong>winapi-full</strong> and <strong>tcc-xxxx-bin</strong> pack
system. Decompress them, copy the headers from the winapi system. Decompress them, copy the headers from the winapi
package into the tcc directory. package into the tcc directory.
<br/><br/> <br/><br/>
<span class="h2">Prepare Source</span>
<br/><br/> <br/><br/>
Copy the <span class="tt">vm/nga-c/retro.c</span> and the <span class="tt">vm/nga-c/image.c</span> to Copy the <span class="tt">vm/nga-c/retro.c</span> and the <span class="tt">vm/nga-c/image.c</span> to
the directory you setup tcc into. the directory you setup tcc into.

View file

@ -43,8 +43,7 @@
.hr { display: block; height: 2px; background: #000000; } .hr { display: block; height: 2px; background: #000000; }
</style> </style>
</head><body> </head><body>
<p><span class="h1">Basic Interactions</span> <p><br/><br/>
<br/><br/>
Start Retro in interactive mode: Start Retro in interactive mode:
<br/><br/> <br/><br/>
<span class='codeblock'><span class="tt">```</span><br/><span class="tt">retro -i </span><br/> <span class='codeblock'><span class="tt">```</span><br/><span class="tt">retro -i </span><br/>

View file

@ -54,7 +54,6 @@ United States.
The historical papers are Copyright (c) 1999-2000 by The historical papers are Copyright (c) 1999-2000 by
Tom Novelli. Tom Novelli.
<br/><br/> <br/><br/>
<span class="h2">Legal Text</span>
<br/><br/> <br/><br/>
See https://creativecommons.org/publicdomain/zero/1.0/legalcode See https://creativecommons.org/publicdomain/zero/1.0/legalcode
<br/><br/> <br/><br/>

View file

@ -43,8 +43,7 @@
.hr { display: block; height: 2px; background: #000000; } .hr { display: block; height: 2px; background: #000000; }
</style> </style>
</head><body> </head><body>
<p><span class="h1">Deprecation Policy</span> <p><br/><br/>
<br/><br/>
As Retro evolves, some words will become obsolete and no longer be As Retro evolves, some words will become obsolete and no longer be
needed. In each release, these will be marked as deprecated in the needed. In each release, these will be marked as deprecated in the
glossary. Any deprecated words will be removed in the next quarterly glossary. Any deprecated words will be removed in the next quarterly

View file

@ -43,8 +43,7 @@
.hr { display: block; height: 2px; background: #000000; } .hr { display: block; height: 2px; background: #000000; }
</style> </style>
</head><body> </head><body>
<p><span class="h1">Retro: a Modern, Pragmatic Forth</span> <p><br/><br/>
<br/><br/>
Welcome to Retro, my personal take on the Forth language. This Welcome to Retro, my personal take on the Forth language. This
is a modern system primarily targeting desktop, mobile, and is a modern system primarily targeting desktop, mobile, and
servers, though it can also be used on some larger (ARM, MIPS32) servers, though it can also be used on some larger (ARM, MIPS32)

View file

@ -43,13 +43,11 @@
.hr { display: block; height: 2px; background: #000000; } .hr { display: block; height: 2px; background: #000000; }
</style> </style>
</head><body> </head><body>
<p><span class="h1">Retro's Markdown Syntax</span> <p><br/><br/>
<br/><br/>
I use a variation of Markdown for writing documentation and I use a variation of Markdown for writing documentation and
when commenting code written in Retro. The syntax is when commenting code written in Retro. The syntax is
described below. described below.
<br/><br/> <br/><br/>
<span class="h2">Basic Syntax</span>
<br/><br/> <br/><br/>
<span class="h3">Headings</span> <span class="h3">Headings</span>
<br/><br/> <br/><br/>
@ -65,7 +63,6 @@ level.
My Markdown does not support the alternate underline My Markdown does not support the alternate underline
format for headings. format for headings.
<br/><br/> <br/><br/>
<span class="h3">Paragraphs & Line Breaks</span>
<br/><br/> <br/><br/>
To create paragraphs, use a blank line to separate one or To create paragraphs, use a blank line to separate one or
more lines of text. more lines of text.
@ -96,7 +93,6 @@ To underline text, surround it with underscores.
<br/><br/> <br/><br/>
<tt class='indentedcode'>Underline&nbsp;_some&nbsp;text_.</tt> <tt class='indentedcode'>Underline&nbsp;_some&nbsp;text_.</tt>
<br/><br/> <br/><br/>
<span class="h3">Horizontal Rules</span>
<br/><br/> <br/><br/>
Horizontal rules can be inserted by starting a line with a Horizontal rules can be inserted by starting a line with a
sequence of four or more dashes (<span class="tt">-</span>) or four or more alternating sequence of four or more dashes (<span class="tt">-</span>) or four or more alternating
@ -120,7 +116,6 @@ the list marker can be used.
<br/><br/> <br/><br/>
<span class="h2">Code</span> <span class="h2">Code</span>
<br/><br/> <br/><br/>
<span class="h3">Code Blocks</span>
<br/><br/> <br/><br/>
Code blocks start and end with ~~~ on a line by themselves. Code blocks start and end with ~~~ on a line by themselves.
<br/><br/> <br/><br/>
@ -134,7 +129,6 @@ You can also denote code by starting the line with four spaces.
<br/><br/> <br/><br/>
<tt class='indentedcode'>&nbsp;&nbsp;&nbsp;&nbsp;This&nbsp;line&nbsp;will&nbsp;be&nbsp;treated&nbsp;as&nbsp;code.</tt> <tt class='indentedcode'>&nbsp;&nbsp;&nbsp;&nbsp;This&nbsp;line&nbsp;will&nbsp;be&nbsp;treated&nbsp;as&nbsp;code.</tt>
<br/><br/> <br/><br/>
<span class="h3">Test Blocks</span>
<br/><br/> <br/><br/>
Unit testing blocks start and end with <span class="tt"></span><span class="tt"> on a line by Unit testing blocks start and end with <span class="tt"></span><span class="tt"> on a line by
themselves. themselves.
@ -143,7 +137,6 @@ themselves.
<tt class='indentedcode'>{&nbsp;#10&nbsp;#20&nbsp;#13&nbsp;#4&nbsp;#22&nbsp;}&nbsp;#0&nbsp;[&nbsp;+&nbsp;]&nbsp;a:reduce</tt> <tt class='indentedcode'>{&nbsp;#10&nbsp;#20&nbsp;#13&nbsp;#4&nbsp;#22&nbsp;}&nbsp;#0&nbsp;[&nbsp;+&nbsp;]&nbsp;a:reduce</tt>
<tt class='indentedcode'>```</tt> <tt class='indentedcode'>```</tt>
<br/><br/> <br/><br/>
<span class="h3">Inline Code</span>
<br/><br/> <br/><br/>
To mark a sequence as inline code, surround it with backticks. To mark a sequence as inline code, surround it with backticks.
<br/><br/> <br/><br/>

View file

@ -43,8 +43,7 @@
.hr { display: block; height: 2px; background: #000000; } .hr { display: block; height: 2px; background: #000000; }
</style> </style>
</head><body> </head><body>
<p><span class="h1">A Quick Tutorial</span> <p><br/><br/>
<br/><br/>
Programming in Retro is all about creating words to solve Programming in Retro is all about creating words to solve
the problem at hand. Words operate on data, which can be the problem at hand. Words operate on data, which can be
kept in memory or on the stack. kept in memory or on the stack.

View file

@ -43,8 +43,7 @@
.hr { display: block; height: 2px; background: #000000; } .hr { display: block; height: 2px; background: #000000; }
</style> </style>
</head><body> </head><body>
<p><span class="h1">Unu: Simple, Literate Source Files</span> <p><br/><br/>
<br/><br/>
Retro is written in a literate style. Most of the sources Retro is written in a literate style. Most of the sources
are in a format called Unu. This allows easy mixing of are in a format called Unu. This allows easy mixing of
commentary and code blocks, making it simple to document commentary and code blocks, making it simple to document
@ -87,7 +86,6 @@ This illustrates the format. Only code in the fenced blocks
(Note: this only applies to source files; fences are not used (Note: this only applies to source files; fences are not used
when entering code interactively). when entering code interactively).
<br/><br/> <br/><br/>
<span class="h2">On The Name</span>
<br/><br/> <br/><br/>
The name Unu comes from the Maori language, where it means: The name Unu comes from the Maori language, where it means:
<br/><br/> <br/><br/>

View file

@ -43,8 +43,7 @@
.hr { display: block; height: 2px; background: #000000; } .hr { display: block; height: 2px; background: #000000; }
</style> </style>
</head><body> </head><body>
<p><span class="h1">Starting Retro</span> <p><br/><br/>
<br/><br/>
Retro can be run for scripting or interactive use. Retro can be run for scripting or interactive use.
<br/><br/> <br/><br/>
<span class="h2">Interactive</span> <span class="h2">Interactive</span>
@ -62,7 +61,6 @@ Or:
<span class="tt">```</span></span><br/><br/> <span class="tt">```</span></span><br/><br/>
This should be sufficient for most uses. This should be sufficient for most uses.
<br/><br/> <br/><br/>
<span class="h2">Using In a Pipe</span>
<br/><br/> <br/><br/>
Retro will work with piped input. Retro will work with piped input.
<br/><br/> <br/><br/>
@ -70,7 +68,6 @@ E.g.,
<br/><br/> <br/><br/>
<span class='codeblock'><span class="tt">```</span><br/><span class="tt">echo "'lol s:put nl" <span class='defer'>|</span> retro </span><br/> <span class='codeblock'><span class="tt">```</span><br/><span class="tt">echo "'lol s:put nl" <span class='defer'>|</span> retro </span><br/>
<span class="tt">```</span></span><br/><br/> <span class="tt">```</span></span><br/><br/>
<span class="h2">Running A Program In A File</span>
<br/><br/> <br/><br/>
You can run code in a file very easily. This is simply: You can run code in a file very easily. This is simply:
<br/><br/> <br/><br/>
@ -92,7 +89,6 @@ And make the file executable.
<br/><br/> <br/><br/>
Source files must be written in Unu format. Source files must be written in Unu format.
<br/><br/> <br/><br/>
<span class="h2">Command Line Arguments</span>
<br/><br/> <br/><br/>
For a summary of the full command line arguments available: For a summary of the full command line arguments available:
<br/><br/> <br/><br/>

View file

@ -122,7 +122,6 @@ The major sigils are:
The individual sigils will be covered in more detail in the The individual sigils will be covered in more detail in the
later chapters on working with different data types. later chapters on working with different data types.
<br/><br/> <br/><br/>
<span class="h2">Word Classes</span>
<br/><br/> <br/><br/>
Word classes are words which take a pointer and do something Word classes are words which take a pointer and do something
with it. These are covered in detail in their own chapter, with it. These are covered in detail in their own chapter,

View file

@ -43,8 +43,7 @@
.hr { display: block; height: 2px; background: #000000; } .hr { display: block; height: 2px; background: #000000; }
</style> </style>
</head><body> </head><body>
<p><span class="h1">Calling Retro from C</span> <p><br/><br/>
<br/><br/>
The C implementation of Retro provides several functions for The C implementation of Retro provides several functions for
interacting with code written in Retro. interacting with code written in Retro.
<br/><br/> <br/><br/>

View file

@ -43,8 +43,7 @@
.hr { display: block; height: 2px; background: #000000; } .hr { display: block; height: 2px; background: #000000; }
</style> </style>
</head><body> </head><body>
<p><span class="h1">Internals: The Retro Image</span> <p><br/><br/>
<br/><br/>
The actual Retro language is stored as a memory image for Nga. The actual Retro language is stored as a memory image for Nga.
<br/><br/> <br/><br/>
<span class="h2">Format</span> <span class="h2">Format</span>

View file

@ -43,8 +43,7 @@
.hr { display: block; height: 2px; background: #000000; } .hr { display: block; height: 2px; background: #000000; }
</style> </style>
</head><body> </head><body>
<p><span class="h1">Internals: Interface Layers</span> <p><br/><br/>
<br/><br/>
Nga provides a virtual processor and an extensible way of adding Nga provides a virtual processor and an extensible way of adding
I/O devices, but does not provide any I/O itself. Adding I/O is I/O devices, but does not provide any I/O itself. Adding I/O is
the responsability of the <strong>interface layer</strong>. the responsability of the <strong>interface layer</strong>.

View file

@ -43,8 +43,7 @@
.hr { display: block; height: 2px; background: #000000; } .hr { display: block; height: 2px; background: #000000; }
</style> </style>
</head><body> </head><body>
<p><span class="h1">I/O Devices</span> <p><br/><br/>
<br/><br/>
I/O devices on Nga are exposed via three instructions: I/O devices on Nga are exposed via three instructions:
<br/><br/> <br/><br/>
<tt class='indentedcode'>ie&nbsp;&nbsp;enumerate&nbsp;i/o&nbsp;devices</tt> <tt class='indentedcode'>ie&nbsp;&nbsp;enumerate&nbsp;i/o&nbsp;devices</tt>
@ -54,7 +53,6 @@ I/O devices on Nga are exposed via three instructions:
All devices are registered with the VM. How this occurs is All devices are registered with the VM. How this occurs is
implementation dependent. implementation dependent.
<br/><br/> <br/><br/>
<span class="h2">Counting Devices</span>
<br/><br/> <br/><br/>
Use the <span class="tt">ie</span> instruction to return the number of attached devices. Use the <span class="tt">ie</span> instruction to return the number of attached devices.
<br/><br/> <br/><br/>
@ -63,14 +61,12 @@ Use the <span class="tt">ie</span> instruction to return the number of attached
Upon running, the stack will contain the number of devices. You Upon running, the stack will contain the number of devices. You
can then query these by passing the device number to <span class="tt">iq</span>. can then query these by passing the device number to <span class="tt">iq</span>.
<br/><br/> <br/><br/>
<span class="h2">Query Devices</span>
<br/><br/> <br/><br/>
Use <span class="tt">iq</span> to query an attached device. This will return two values, Use <span class="tt">iq</span> to query an attached device. This will return two values,
a device class and a revision number. a device class and a revision number.
<br/><br/> <br/><br/>
The device class will be the top value on the stack. The device class will be the top value on the stack.
<br/><br/> <br/><br/>
<span class="h2">Invoking a Device</span>
<br/><br/> <br/><br/>
You can trigger an I/O operation by passing the device handle to You can trigger an I/O operation by passing the device handle to
the <span class="tt">ii</span> instruction. the <span class="tt">ii</span> instruction.
@ -83,7 +79,6 @@ E.g., to display a character (ASCII code 98 in this case):
<br/><br/> <br/><br/>
Be sure to pass the device handle, not the device class. Be sure to pass the device handle, not the device class.
<br/><br/> <br/><br/>
<span class="h2">Device Class</span>
<br/><br/> <br/><br/>
Ultimately devices are implementation-specific, but the Ultimately devices are implementation-specific, but the
standard system provides or reserves the following: standard system provides or reserves the following:
@ -107,23 +102,19 @@ It must be noted here that nothing forces devices to use these
class identifiers, and one must take care to use an Nga class identifiers, and one must take care to use an Nga
implementation that provides the devices they need. implementation that provides the devices they need.
<br/><br/> <br/><br/>
<span class="h2">Device Revisions</span>
<br/><br/> <br/><br/>
Over time, the functionality a device provides may change. To allow Over time, the functionality a device provides may change. To allow
detection of this, the query functionality provides a revision number. detection of this, the query functionality provides a revision number.
Your code can use this to ensure that the device provided supports Your code can use this to ensure that the device provided supports
the level of functionality you need. the level of functionality you need.
<br/><br/> <br/><br/>
<span class="h2">Device Class Details</span>
<br/><br/> <br/><br/>
<span class="h3">0000: Generic Output</span>
<br/><br/> <br/><br/>
Supported by all Nga implementations. This is required to be the Supported by all Nga implementations. This is required to be the
first device, and is the only one guaranteed to be provided. It first device, and is the only one guaranteed to be provided. It
consumes a value from the stack, writing to to the host-specific consumes a value from the stack, writing to to the host-specific
output. (This does not need to be a screen). output. (This does not need to be a screen).
<br/><br/> <br/><br/>
<span class="h3">0001: Keyboard</span>
<br/><br/> <br/><br/>
Read and return a keypress. Read and return a keypress.
<br/><br/> <br/><br/>
@ -132,7 +123,6 @@ character that was read.
<br/><br/> <br/><br/>
No subcommands are defined. No subcommands are defined.
<br/><br/> <br/><br/>
<span class="h3">0002: Floating Point</span>
<br/><br/> <br/><br/>
The current revision is 1. The current revision is 1.
<br/><br/> <br/><br/>
@ -169,11 +159,9 @@ It currently provides:
<tt class='indentedcode'>f:pop&nbsp;&nbsp;&nbsp;(f:-f)</tt> <tt class='indentedcode'>f:pop&nbsp;&nbsp;&nbsp;(f:-f)</tt>
<tt class='indentedcode'>f:adepth&nbsp;&nbsp;(-n)</tt> <tt class='indentedcode'>f:adepth&nbsp;&nbsp;(-n)</tt>
<br/><br/> <br/><br/>
<span class="h3">0003: Block Storage</span>
<br/><br/> <br/><br/>
Reserved for future use. Reserved for future use.
<br/><br/> <br/><br/>
<span class="h3">0004: Filesystem</span>
<br/><br/> <br/><br/>
Currently at revision 0. Currently at revision 0.
<br/><br/> <br/><br/>
@ -194,13 +182,11 @@ additional values.
<tt class='indentedcode'>|&nbsp;7&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;s-&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;Delete&nbsp;a&nbsp;file&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|</tt> <tt class='indentedcode'>|&nbsp;7&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;s-&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;Delete&nbsp;a&nbsp;file&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|</tt>
<tt class='indentedcode'>|&nbsp;8&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;h-&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;Flush&nbsp;pending&nbsp;writes&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|</tt> <tt class='indentedcode'>|&nbsp;8&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;h-&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;Flush&nbsp;pending&nbsp;writes&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|</tt>
<br/><br/> <br/><br/>
<span class="h3">0010: Random Number Generator</span>
<br/><br/> <br/><br/>
This is currently at revision 0. This is currently at revision 0.
<br/><br/> <br/><br/>
On invocation, this returns a random number. On invocation, this returns a random number.
<br/><br/> <br/><br/>
<span class="h2">Implementation Details (C)</span>
<br/><br/> <br/><br/>
On the C implementation, each I/O device has the needed support On the C implementation, each I/O device has the needed support
functions defined, then a query function and invocation function functions defined, then a query function and invocation function

View file

@ -43,8 +43,7 @@
.hr { display: block; height: 2px; background: #000000; } .hr { display: block; height: 2px; background: #000000; }
</style> </style>
</head><body> </head><body>
<p><span class="h1">Internals: I/O</span> <p><br/><br/>
<br/><br/>
Retro provides three words for interacting with I/O. These are: Retro provides three words for interacting with I/O. These are:
<br/><br/> <br/><br/>
<tt class='indentedcode'>io:enumerate&nbsp;&nbsp;&nbsp;&nbsp;returns&nbsp;the&nbsp;number&nbsp;of&nbsp;attached&nbsp;devices</tt> <tt class='indentedcode'>io:enumerate&nbsp;&nbsp;&nbsp;&nbsp;returns&nbsp;the&nbsp;number&nbsp;of&nbsp;attached&nbsp;devices</tt>

View file

@ -43,8 +43,7 @@
.hr { display: block; height: 2px; background: #000000; } .hr { display: block; height: 2px; background: #000000; }
</style> </style>
</head><body> </head><body>
<p><span class="h1">Internals: Nga Virtual Machine</span> <p><br/><br/>
<br/><br/>
<span class="h2">Overview</span> <span class="h2">Overview</span>
<br/><br/> <br/><br/>
At the heart of Retro is a simple MISC (minimal instruction At the heart of Retro is a simple MISC (minimal instruction
@ -55,7 +54,6 @@ This is a very simple and straightforward system. There are
bit values. And there are two stacks: one for data and one bit values. And there are two stacks: one for data and one
for return addresses. for return addresses.
<br/><br/> <br/><br/>
<span class="h2">Instruction Table</span>
<br/><br/> <br/><br/>
<tt class='indentedcode'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Stacks&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|</tt> <tt class='indentedcode'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Stacks&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|</tt>
<tt class='indentedcode'>|&nbsp;Opcode&nbsp;|&nbsp;Muri&nbsp;|&nbsp;Full&nbsp;Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;Data&nbsp;&nbsp;|&nbsp;Address&nbsp;|</tt> <tt class='indentedcode'>|&nbsp;Opcode&nbsp;|&nbsp;Muri&nbsp;|&nbsp;Full&nbsp;Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;Data&nbsp;&nbsp;|&nbsp;Address&nbsp;|</tt>
@ -128,7 +126,6 @@ And returns a single one:
If y is positive, this shifts <span class="tt">x</span> right by <span class="tt">y</span> bits. If negative, If y is positive, this shifts <span class="tt">x</span> right by <span class="tt">y</span> bits. If negative,
it shifts left. it shifts left.
<br/><br/> <br/><br/>
<span class="h2">Queries: Memory, Stacks</span>
<br/><br/> <br/><br/>
The <span class="tt">fe</span> instruction allows queries of some data related to The <span class="tt">fe</span> instruction allows queries of some data related to
the Nga VM state. These are returned by reading from negative the Nga VM state. These are returned by reading from negative
@ -142,7 +139,6 @@ addresses:
<tt class='indentedcode'>|&nbsp;-4&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;Minimum&nbsp;Integer&nbsp;Value&nbsp;&nbsp;|</tt> <tt class='indentedcode'>|&nbsp;-4&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;Minimum&nbsp;Integer&nbsp;Value&nbsp;&nbsp;|</tt>
<tt class='indentedcode'>|&nbsp;-5&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;Maximum&nbsp;Integer&nbsp;Value&nbsp;&nbsp;|</tt> <tt class='indentedcode'>|&nbsp;-5&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;Maximum&nbsp;Integer&nbsp;Value&nbsp;&nbsp;|</tt>
<br/><br/> <br/><br/>
<span class="h2">I/O Devices</span>
<br/><br/> <br/><br/>
Nga provides three instructions for interacting with I/O devices. Nga provides three instructions for interacting with I/O devices.
These are: These are:

View file

@ -43,8 +43,7 @@
.hr { display: block; height: 2px; background: #000000; } .hr { display: block; height: 2px; background: #000000; }
</style> </style>
</head><body> </head><body>
<p><span class="h1">The Code It Yourself Manifesto</span> <p><br/><br/>
<br/><br/>
We use software for our everyday needs because we want to get We use software for our everyday needs because we want to get
something done. We have goals to achieve and things to do. something done. We have goals to achieve and things to do.
<br/><br/> <br/><br/>

View file

@ -43,9 +43,7 @@
.hr { display: block; height: 2px; background: #000000; } .hr { display: block; height: 2px; background: #000000; }
</style> </style>
</head><body> </head><body>
<p><span class="h1">Historical Papers and Notes</span> <p><br/><br/>
<br/><br/>
<span class="h2">On the Naming of Retro</span>
<br/><br/> <br/><br/>
Taken from http://lists.tunes.org/archives/tunes-lll/1999-July/000121.html Taken from http://lists.tunes.org/archives/tunes-lll/1999-July/000121.html
<br/><br/> <br/><br/>
@ -89,7 +87,6 @@ software on 90's and 00's hardware :)
&bull; Tom Novelli &lt;tcn@tunes.org&gt;<br/> &bull; Tom Novelli &lt;tcn@tunes.org&gt;<br/>
<br/><br/> <br/><br/>
<br/><br/> <br/><br/>
<span class="h2">The Design Philosophy of Retro Native Forth</span>
<br/><br/> <br/><br/>
Computer software is a technology in its infancy, a mere fifty years Computer software is a technology in its infancy, a mere fifty years
old. The last 25 years in particular have seen an explosion in the old. The last 25 years in particular have seen an explosion in the

View file

@ -43,8 +43,7 @@
.hr { display: block; height: 2px; background: #000000; } .hr { display: block; height: 2px; background: #000000; }
</style> </style>
</head><body> </head><body>
<p><span class="h2">On The Kernel Wordset</span> <p><br/><br/>
<br/><br/>
In implementing the Retro 12 kernel (called Retro Core, and In implementing the Retro 12 kernel (called Retro Core, and
defined in <span class="tt">image/retro.muri</span>) I had to decide on what functionality defined in <span class="tt">image/retro.muri</span>) I had to decide on what functionality
would be needed. It was important to me that this be kept clean would be needed. It was important to me that this be kept clean

View file

@ -43,8 +43,7 @@
.hr { display: block; height: 2px; background: #000000; } .hr { display: block; height: 2px; background: #000000; }
</style> </style>
</head><body> </head><body>
<p><span class="h2">Metacompilation and Assembly</span> <p><br/><br/>
<br/><br/>
Retro 10 and 11 were written in themselves using a metacompiler. Retro 10 and 11 were written in themselves using a metacompiler.
I had been fascinated by this idea for a long time and was able I had been fascinated by this idea for a long time and was able
to explore it heavily. While I still find it to be a good idea, to explore it heavily. While I still find it to be a good idea,

View file

@ -43,8 +43,7 @@
.hr { display: block; height: 2px; background: #000000; } .hr { display: block; height: 2px; background: #000000; }
</style> </style>
</head><body> </head><body>
<p><span class="h2">On The Evolution Of Ngaro Into Nga</span> <p><br/><br/>
<br/><br/>
When I decided to begin work on what became Retro 12, I knew When I decided to begin work on what became Retro 12, I knew
the process would involve updating Ngaro, the virtual machine the process would involve updating Ngaro, the virtual machine
that Retro 10 and 11 ran on. that Retro 10 and 11 ran on.

View file

@ -43,8 +43,7 @@
.hr { display: block; height: 2px; background: #000000; } .hr { display: block; height: 2px; background: #000000; }
</style> </style>
</head><body> </head><body>
<p><span class="h2">Sigils as a Language Element</span> <p><br/><br/>
<br/><br/>
A big change in Retro 12 was the elimination of the traditional A big change in Retro 12 was the elimination of the traditional
parser from the language. This was a sacrifice due to the lack parser from the language. This was a sacrifice due to the lack
of an I/O model. Retro has no way to know <strong>how</strong> input is given of an I/O model. Retro has no way to know <strong>how</strong> input is given

View file

@ -43,8 +43,7 @@
.hr { display: block; height: 2px; background: #000000; } .hr { display: block; height: 2px; background: #000000; }
</style> </style>
</head><body> </head><body>
<p><span class="h2">Retro 11 (2011 - 2019): A Look Back</span> <p><br/><br/>
<br/><br/>
So it's now been about five years since the last release of Retro So it's now been about five years since the last release of Retro
11. While I still see some people obtaining and using it, I've 11. While I still see some people obtaining and using it, I've
moved on to the twelth generation of Retro. It's time for me to moved on to the twelth generation of Retro. It's time for me to

View file

@ -43,12 +43,10 @@
.hr { display: block; height: 2px; background: #000000; } .hr { display: block; height: 2px; background: #000000; }
</style> </style>
</head><body> </head><body>
<p><span class="h1">Security Concerns</span> <p><br/><br/>
<br/><br/>
The standard Retro is not a good choice for applications The standard Retro is not a good choice for applications
needing to be highly secure. needing to be highly secure.
<br/><br/> <br/><br/>
<span class="h2">Runtime Checks</span>
<br/><br/> <br/><br/>
The Retro system performs only minimal checks. It will not The Retro system performs only minimal checks. It will not
load an image larger than the max set at build time. And load an image larger than the max set at build time. And
@ -68,7 +66,6 @@ into the C portions.
I/O presents a bigger issue. Anything involving I/O, especially I/O presents a bigger issue. Anything involving I/O, especially
with the <span class="tt">unix:</span> words, may be a vector for attacks. with the <span class="tt">unix:</span> words, may be a vector for attacks.
<br/><br/> <br/><br/>
<span class="h2">Future Direction</span>
<br/><br/> <br/><br/>
I'm not planning to add anything to the <strong>image</strong> side as, for me, I'm not planning to add anything to the <strong>image</strong> side as, for me,
the performance hit due to added checks is bigger than the the performance hit due to added checks is bigger than the

View file

@ -43,8 +43,7 @@
.hr { display: block; height: 2px; background: #000000; } .hr { display: block; height: 2px; background: #000000; }
</style> </style>
</head><body> </head><body>
<p><span class="h2">The Path to Self Hosting</span> <p><br/><br/>
<br/><br/>
Retro is an image based Forth system running on a lightweight Retro is an image based Forth system running on a lightweight
virtual machine. This is the story of how that image is made. virtual machine. This is the story of how that image is made.
<br/><br/> <br/><br/>
@ -83,10 +82,10 @@ This caused a large number of issues over R11's life.
<br/><br/> <br/><br/>
So on to Retro 12. I decided that this would be different. So on to Retro 12. I decided that this would be different.
First, the kernel would be assembly, with an external tool First, the kernel would be assembly, with an external tool
to generate the core image. The kernel is in <span class="tt">Rx.md</span> and the to generate the core image. The kernel is in <span class="tt">image/retro.muri</span>
assembler is <span class="tt">Muri</span>. To load the standard library, I wrote a and the assembler is <span class="tt">Muri</span>. To load the standard library, I
second tool, <span class="tt">Retro-extend</span>. This separation has allowed me wrote a second tool, <span class="tt">Retro-extend</span>. This separation has allowed
many fewer headaches as I can make changes more easily and me many fewer headaches as I can make changes more easily and
rebuild from scratch when necessary. rebuild from scratch when necessary.
<br/><br/> <br/><br/>
But I miss self-hosting. So last fall I decided to resolve But I miss self-hosting. So last fall I decided to resolve

View file

@ -43,8 +43,7 @@
.hr { display: block; height: 2px; background: #000000; } .hr { display: block; height: 2px; background: #000000; }
</style> </style>
</head><body> </head><body>
<p><span class="h3">On The Use Of Underscores In Word Names</span> <p><br/><br/>
<br/><br/>
In brief: don't use underscores in word names. In brief: don't use underscores in word names.
<br/><br/> <br/><br/>
There is a good reason for this, and it has to do with how Retro There is a good reason for this, and it has to do with how Retro

View file

@ -43,8 +43,7 @@
.hr { display: block; height: 2px; background: #000000; } .hr { display: block; height: 2px; background: #000000; }
</style> </style>
</head><body> </head><body>
<p><span class="h1">Working With Arrays</span> <p><br/><br/>
<br/><br/>
RETRO offers a number of words for operating on statically sized RETRO offers a number of words for operating on statically sized
arrays. arrays.
<br/><br/> <br/><br/>
@ -52,7 +51,6 @@ arrays.
<br/><br/> <br/><br/>
The words operating on arrays are kept in an <span class="tt">a:</span> namespace. The words operating on arrays are kept in an <span class="tt">a:</span> namespace.
<br/><br/> <br/><br/>
<span class="h2">Creating Arrays</span>
<br/><br/> <br/><br/>
The easiest way to create an array is to wrap the values in a The easiest way to create an array is to wrap the values in a
<span class="tt">{</span> and <span class="tt">}</span> pair: <span class="tt">{</span> and <span class="tt">}</span> pair:
@ -67,14 +65,12 @@ values and the number of values to store in the a:
<span class='codeblock'><span class="tt">```</span><br/><span class="tt"><span class='imm'>[</span> <span class='num'>#1</span> <span class='num'>#2</span> <span class='num'>#3</span> &nbsp;<span class='num'>#3</span> <span class='imm'>]</span> a:counted-results </span><br/> <span class='codeblock'><span class="tt">```</span><br/><span class="tt"><span class='imm'>[</span> <span class='num'>#1</span> <span class='num'>#2</span> <span class='num'>#3</span> &nbsp;<span class='num'>#3</span> <span class='imm'>]</span> a:counted-results </span><br/>
<span class="tt"><span class='imm'>[</span> <span class='num'>#1</span> <span class='num'>#2</span> <span class='num'>#3</span> &nbsp;<span class='num'>#3</span> <span class='imm'>]</span> a:make </span><br/> <span class="tt"><span class='imm'>[</span> <span class='num'>#1</span> <span class='num'>#2</span> <span class='num'>#3</span> &nbsp;<span class='num'>#3</span> <span class='imm'>]</span> a:make </span><br/>
<span class="tt">```</span></span><br/><br/> <span class="tt">```</span></span><br/><br/>
<span class="h2">Accessing Elements</span>
<br/><br/> <br/><br/>
You can access a specific value with <span class="tt">a:th</span> and <span class="tt">fetch</span> or You can access a specific value with <span class="tt">a:th</span> and <span class="tt">fetch</span> or
<span class="tt">store</span>: <span class="tt">store</span>:
<br/><br/> <br/><br/>
<span class='codeblock'><span class="tt">```</span><br/><span class="tt"><span class='imm'>{</span> <span class='num'>#1</span> <span class='num'>#2</span> <span class='num'>#3</span> <span class='num'>#4</span> <span class='imm'>}</span> <span class='num'>#3</span> a:th <span class='prim'>fetch</span> </span><br/> <span class='codeblock'><span class="tt">```</span><br/><span class="tt"><span class='imm'>{</span> <span class='num'>#1</span> <span class='num'>#2</span> <span class='num'>#3</span> <span class='num'>#4</span> <span class='imm'>}</span> <span class='num'>#3</span> a:th <span class='prim'>fetch</span> </span><br/>
<span class="tt">```</span></span><br/><br/> <span class="tt">```</span></span><br/><br/>
<span class="h2">Find The Length</span>
<br/><br/> <br/><br/>
Use <span class="tt">a:length</span> to find the size of the array. Use <span class="tt">a:length</span> to find the size of the array.
<br/><br/> <br/><br/>

View file

@ -43,15 +43,13 @@
.hr { display: block; height: 2px; background: #000000; } .hr { display: block; height: 2px; background: #000000; }
</style> </style>
</head><body> </head><body>
<p><span class="h1">Working With Assembly Language</span> <p><br/><br/>
<br/><br/>
RETRO runs on a virtual machine called Nga. It provides a RETRO runs on a virtual machine called Nga. It provides a
standard assembler for this called <strong>Muri</strong>. standard assembler for this called <strong>Muri</strong>.
<br/><br/> <br/><br/>
Muri is a simple, multipass model that's not fancy, but Muri is a simple, multipass model that's not fancy, but
suffices for RETRO's needs. suffices for RETRO's needs.
<br/><br/> <br/><br/>
<span class="h2">Assembling A Standalone File</span>
<br/><br/> <br/><br/>
A small example (<strong>test.muri</strong>) A small example (<strong>test.muri</strong>)
<br/><br/> <br/><br/>
@ -113,7 +111,6 @@ each I/O instruction name. So a bundle may look like:
<br/><br/> <br/><br/>
(This would correspond to <span class="tt">dup multiply return nop</span>). (This would correspond to <span class="tt">dup multiply return nop</span>).
<br/><br/> <br/><br/>
<span class="h2">Runtime Assembler</span>
<br/><br/> <br/><br/>
RETRO also has a runtime variation of Muri that can be used RETRO also has a runtime variation of Muri that can be used
when you need to generate more optimal code. So one can write: when you need to generate more optimal code. So one can write:

View file

@ -43,8 +43,7 @@
.hr { display: block; height: 2px; background: #000000; } .hr { display: block; height: 2px; background: #000000; }
</style> </style>
</head><body> </head><body>
<p><span class="h1">Working With a Buffer</span> <p><br/><br/>
<br/><br/>
RETRO provides words for operating on a linear memory area. RETRO provides words for operating on a linear memory area.
This can be useful in building strings or custom data This can be useful in building strings or custom data
structures. structures.
@ -71,7 +70,6 @@ Only one buffer can be active at a time. RETRO provides a
<span class="tt">buffer:preserve</span> combinator to allow using a second one <span class="tt">buffer:preserve</span> combinator to allow using a second one
before returning to the prior one. before returning to the prior one.
<br/><br/> <br/><br/>
<span class="h2">Set The Active Buffer</span>
<br/><br/> <br/><br/>
To set a buffer as the active one use <span class="tt">buffer:set</span>. This takes To set a buffer as the active one use <span class="tt">buffer:set</span>. This takes
an address. an address.
@ -79,19 +77,16 @@ an address.
The buffer will be assumed to be empty. The initial value will The buffer will be assumed to be empty. The initial value will
be set to ASCII:NULL. be set to ASCII:NULL.
<br/><br/> <br/><br/>
<span class="h2">Add Value</span>
<br/><br/> <br/><br/>
Use <span class="tt">buffer:add</span> to append a value to the buffer. This takes Use <span class="tt">buffer:add</span> to append a value to the buffer. This takes
a single value and will also add an ASCII:NULL after the end a single value and will also add an ASCII:NULL after the end
of the buffer. of the buffer.
<br/><br/> <br/><br/>
<span class="h2">Fetch Last Value</span>
<br/><br/> <br/><br/>
To return the last value in the buffer you can use <span class="tt">buffer:get</span>. To return the last value in the buffer you can use <span class="tt">buffer:get</span>.
This removes the value and sets an ASCII:NULL in the memory This removes the value and sets an ASCII:NULL in the memory
location the returned value occupied. location the returned value occupied.
<br/><br/> <br/><br/>
<span class="h2">Get Data About The Buffer</span>
<br/><br/> <br/><br/>
RETRO provides <span class="tt">buffer:start</span> to get the initial address in RETRO provides <span class="tt">buffer:start</span> to get the initial address in
the buffer, <span class="tt">buffer:end</span> to get the last address (ignoring the the buffer, <span class="tt">buffer:end</span> to get the last address (ignoring the

View file

@ -43,8 +43,7 @@
.hr { display: block; height: 2px; background: #000000; } .hr { display: block; height: 2px; background: #000000; }
</style> </style>
</head><body> </head><body>
<p><span class="h1">Working With Characters</span> <p><br/><br/>
<br/><br/>
RETRO provides words for working with ASCII characters. RETRO provides words for working with ASCII characters.
<br/><br/> <br/><br/>
<span class="h2">Sigil</span> <span class="h2">Sigil</span>

View file

@ -43,8 +43,7 @@
.hr { display: block; height: 2px; background: #000000; } .hr { display: block; height: 2px; background: #000000; }
</style> </style>
</head><body> </head><body>
<p><span class="h1">Checking The Version</span> <p><br/><br/>
<br/><br/>
RETRO releases add and change things. You can use the <span class="tt">Version</span> RETRO releases add and change things. You can use the <span class="tt">Version</span>
variable to determine the version in use and react accordingly. variable to determine the version in use and react accordingly.
<br/><br/> <br/><br/>
@ -55,7 +54,6 @@ This can be also be used to conditionally load compatibility files:
<span class='codeblock'><span class="tt">```</span><br/><span class="tt"><span class='note'>(If_newer_than_2016.6,_load_aliases_for_renamed_words)</span> </span><br/> <span class='codeblock'><span class="tt">```</span><br/><span class="tt"><span class='note'>(If_newer_than_2016.6,_load_aliases_for_renamed_words)</span> </span><br/>
<span class="tt"><span class='fetch'>@Version</span> <span class='num'>#201906</span> <span class='prim'>gt?</span> <span class='imm'>[</span> <span class='str'>'Renamed_2019.6.forth</span> include <span class='imm'>]</span> <span class='prim'>if</span> </span><br/> <span class="tt"><span class='fetch'>@Version</span> <span class='num'>#201906</span> <span class='prim'>gt?</span> <span class='imm'>[</span> <span class='str'>'Renamed_2019.6.forth</span> include <span class='imm'>]</span> <span class='prim'>if</span> </span><br/>
<span class="tt">```</span></span><br/><br/> <span class="tt">```</span></span><br/><br/>
<span class="h2">Version Number Format</span>
<br/><br/> <br/><br/>
The version is a six digit number encoding the year and month of The version is a six digit number encoding the year and month of
the release. So: the release. So:

View file

@ -43,8 +43,7 @@
.hr { display: block; height: 2px; background: #000000; } .hr { display: block; height: 2px; background: #000000; }
</style> </style>
</head><body> </head><body>
<p><span class="h1">Defining Words</span> <p><br/><br/>
<br/><br/>
Words are named functions. To start a word, preceed it's name Words are named functions. To start a word, preceed it's name
with a colon. Follow this by the definition, and end with a with a colon. Follow this by the definition, and end with a
semicolon. semicolon.

View file

@ -43,8 +43,7 @@
.hr { display: block; height: 2px; background: #000000; } .hr { display: block; height: 2px; background: #000000; }
</style> </style>
</head><body> </head><body>
<p><span class="h1">Working With The Dictionary</span> <p><br/><br/>
<br/><br/>
The Dictionary is a linked list containing the dictionary The Dictionary is a linked list containing the dictionary
headers. headers.
<br/><br/> <br/><br/>
@ -57,7 +56,6 @@ Words operating on the dictionary are in the <span class="tt">d:</span> namespac
<span class="tt">Dictionary</span> is a variable holding a pointer to the most recent <span class="tt">Dictionary</span> is a variable holding a pointer to the most recent
header. header.
<br/><br/> <br/><br/>
<span class="h2">Header Structure</span>
<br/><br/> <br/><br/>
Each entry follows the following structure: Each entry follows the following structure:
<br/><br/> <br/><br/>
@ -73,14 +71,12 @@ RETRO provides words for accessing the fields in a portable
manner. It's recommended to use these to allow for future manner. It's recommended to use these to allow for future
revision of the header structure. revision of the header structure.
<br/><br/> <br/><br/>
<span class="h2">Accessing Fields</span>
<br/><br/> <br/><br/>
Given a pointer to a header, you can use <span class="tt">d:xt</span>, <span class="tt">d:class</span>, Given a pointer to a header, you can use <span class="tt">d:xt</span>, <span class="tt">d:class</span>,
and <span class="tt">d:name</span> to access the address of each specific field. and <span class="tt">d:name</span> to access the address of each specific field.
There is no <span class="tt">d:link</span>, as the link will always be the first There is no <span class="tt">d:link</span>, as the link will always be the first
field. field.
<br/><br/> <br/><br/>
<span class="h2">Shortcuts For The Latest Header</span>
<br/><br/> <br/><br/>
RETRO provides several words for operating on the most recent RETRO provides several words for operating on the most recent
header. header.
@ -89,7 +85,6 @@ header.
will give the contents of the <span class="tt">d:xt</span> field for the latest will give the contents of the <span class="tt">d:xt</span> field for the latest
header. There are also <span class="tt">d:last.class</span> and <span class="tt">d:last.name</span>. header. There are also <span class="tt">d:last.class</span> and <span class="tt">d:last.name</span>.
<br/><br/> <br/><br/>
<span class="h2">Adding Headers</span>
<br/><br/> <br/><br/>
Two words exist for making new headers. The easy one is Two words exist for making new headers. The easy one is
<span class="tt">d:create</span>. This takes a string for the name and makes a <span class="tt">d:create</span>. This takes a string for the name and makes a
@ -131,7 +126,6 @@ of all words:
For each entry, this combinator will push a pointer to the For each entry, this combinator will push a pointer to the
entry to the stack and call the quotation. entry to the stack and call the quotation.
<br/><br/> <br/><br/>
<span class="h2">Listing Words</span>
<br/><br/> <br/><br/>
Most Forth systems provide WORDS for listing the names of all Most Forth systems provide WORDS for listing the names of all
words in the dictionary. RETRO does as well, but this is named words in the dictionary. RETRO does as well, but this is named

View file

@ -43,15 +43,13 @@
.hr { display: block; height: 2px; background: #000000; } .hr { display: block; height: 2px; background: #000000; }
</style> </style>
</head><body> </head><body>
<p><span class="h1">Working With Files</span> <p><br/><br/>
<br/><br/>
On Unix and Windows systems RETRO provides a set of words for On Unix and Windows systems RETRO provides a set of words for
working with files. As a pragmatic choice these are mostly working with files. As a pragmatic choice these are mostly
modeled after the file functions in libc. modeled after the file functions in libc.
<br/><br/> <br/><br/>
The file words are in the <span class="tt">file:</span> namespace. The file words are in the <span class="tt">file:</span> namespace.
<br/><br/> <br/><br/>
<span class="h2">File Access Modes</span>
<br/><br/> <br/><br/>
You can open a file for various operations. The functionality You can open a file for various operations. The functionality
allowed depends on the file access mode. Valid modes in RETRO allowed depends on the file access mode. Valid modes in RETRO
@ -62,7 +60,6 @@ are:
<tt class='indentedcode'>file:R+&nbsp;&nbsp;&nbsp;Open&nbsp;for&nbsp;reading&nbsp;and&nbsp;writing</tt> <tt class='indentedcode'>file:R+&nbsp;&nbsp;&nbsp;Open&nbsp;for&nbsp;reading&nbsp;and&nbsp;writing</tt>
<tt class='indentedcode'>file:W&nbsp;&nbsp;&nbsp;&nbsp;Open&nbsp;for&nbsp;writing</tt> <tt class='indentedcode'>file:W&nbsp;&nbsp;&nbsp;&nbsp;Open&nbsp;for&nbsp;writing</tt>
<br/><br/> <br/><br/>
<span class="h2">Opening A File</span>
<br/><br/> <br/><br/>
To open a file, pass the file name and a file mode to <span class="tt">file:open</span>. To open a file, pass the file name and a file mode to <span class="tt">file:open</span>.
<br/><br/> <br/><br/>
@ -93,13 +90,11 @@ To open a file for append operations:
As with <span class="tt">file:open-for-reading</span>, this returns both the size of As with <span class="tt">file:open-for-reading</span>, this returns both the size of
the file and the file handle. the file and the file handle.
<br/><br/> <br/><br/>
<span class="h2">Closing A File</span>
<br/><br/> <br/><br/>
To close a file, pass the file handle to <span class="tt">file:close</span>. To close a file, pass the file handle to <span class="tt">file:close</span>.
<br/><br/> <br/><br/>
<tt class='indentedcode'>'/etc/motd&nbsp;file:A&nbsp;file:open&nbsp;file:close</tt> <tt class='indentedcode'>'/etc/motd&nbsp;file:A&nbsp;file:open&nbsp;file:close</tt>
<br/><br/> <br/><br/>
<span class="h2">Reading From A File</span>
<br/><br/> <br/><br/>
To read a byte from an open file, pass the file handle to the To read a byte from an open file, pass the file handle to the
<span class="tt">file:read</span> word. <span class="tt">file:read</span> word.
@ -116,7 +111,6 @@ text to a safe place if you aren't using it quickly or if
the length of the line is bigger than the size of a temporary the length of the line is bigger than the size of a temporary
string. string.
<br/><br/> <br/><br/>
<span class="h2">Writing To A File</span>
<br/><br/> <br/><br/>
To write a byte to a file, pass it and the file handle to To write a byte to a file, pass it and the file handle to
<span class="tt">file:write</span>. <span class="tt">file:write</span>.
@ -130,13 +124,11 @@ To write a byte to a file, pass it and the file handle to
Though cells are 32 or 64 bits in size, only the byte value will Though cells are 32 or 64 bits in size, only the byte value will
be written to the file. be written to the file.
<br/><br/> <br/><br/>
<span class="h2">Deleting Files</span>
<br/><br/> <br/><br/>
You can delete a file by passing the file name to <span class="tt">file:delete</span>. You can delete a file by passing the file name to <span class="tt">file:delete</span>.
<br/><br/> <br/><br/>
<tt class='indentedcode'>/tmp/test&nbsp;file:delete</tt> <tt class='indentedcode'>/tmp/test&nbsp;file:delete</tt>
<br/><br/> <br/><br/>
<span class="h2">Check For File Existance</span>
<br/><br/> <br/><br/>
Use <span class="tt">file:exists?</span> to detect the existance of a file. Pass it a Use <span class="tt">file:exists?</span> to detect the existance of a file. Pass it a
file name and it will return <span class="tt">TRUE</span> if existing or <span class="tt">FALSE</span> if file name and it will return <span class="tt">TRUE</span> if existing or <span class="tt">FALSE</span> if
@ -146,14 +138,12 @@ it does not.
<br/><br/> <br/><br/>
This will also return <span class="tt">TRUE</span> if the filename is a directory. This will also return <span class="tt">TRUE</span> if the filename is a directory.
<br/><br/> <br/><br/>
<span class="h2">Flush Caches</span>
<br/><br/> <br/><br/>
Use <span class="tt">file:flush</span> to flush the system caches for a file. Pass a Use <span class="tt">file:flush</span> to flush the system caches for a file. Pass a
file handle to this. file handle to this.
<br/><br/> <br/><br/>
<tt class='indentedcode'>@FID&nbsp;file:flush</tt> <tt class='indentedcode'>@FID&nbsp;file:flush</tt>
<br/><br/> <br/><br/>
<span class="h2">Seek A Position Within A File</span>
<br/><br/> <br/><br/>
You can use <span class="tt">file:seek</span> to move the internal file pointer You can use <span class="tt">file:seek</span> to move the internal file pointer
for a given file. Pass this the new location and a file. for a given file. Pass this the new location and a file.
@ -163,7 +153,6 @@ for a given file. Pass this the new location and a file.
The location for the file pointer is a fixed offset from the The location for the file pointer is a fixed offset from the
start of the file, not a relative offset. start of the file, not a relative offset.
<br/><br/> <br/><br/>
<span class="h2">Get The Current Position Within A File</span>
<br/><br/> <br/><br/>
To find the current value of the file pointer within a file To find the current value of the file pointer within a file
just pass the file handle to <span class="tt">file:tell</span>. just pass the file handle to <span class="tt">file:tell</span>.
@ -173,7 +162,6 @@ just pass the file handle to <span class="tt">file:tell</span>.
This returns a number that is the number of bytes into the file This returns a number that is the number of bytes into the file
that the file pointer is currently at. that the file pointer is currently at.
<br/><br/> <br/><br/>
<span class="h2">Determine The Size Of A File</span>
<br/><br/> <br/><br/>
Use <span class="tt">file:size</span> to return the size of a file. Pass this a file Use <span class="tt">file:size</span> to return the size of a file. Pass this a file
handle and it will return the size of a file, or 0 if empty. If handle and it will return the size of a file, or 0 if empty. If
@ -181,7 +169,6 @@ the file is a directory, it returns -1.
<br/><br/> <br/><br/>
<tt class='indentedcode'>@FID&nbsp;file:size</tt> <tt class='indentedcode'>@FID&nbsp;file:size</tt>
<br/><br/> <br/><br/>
<span class="h2">Reading An Entire File</span>
<br/><br/> <br/><br/>
If you want to read an entire file into memory you can use If you want to read an entire file into memory you can use
<span class="tt">file:slurp</span>. This takes the starting address of a memory <span class="tt">file:slurp</span>. This takes the starting address of a memory
@ -192,7 +179,6 @@ region and the name of the file.
Take care that the memory buffer is large enough for the file Take care that the memory buffer is large enough for the file
being read or you will run into problems. being read or you will run into problems.
<br/><br/> <br/><br/>
<span class="h2">Writing A String To A File</span>
<br/><br/> <br/><br/>
If you have a string that you want to write to a file, replacing If you have a string that you want to write to a file, replacing
any existing contents, you can use <span class="tt">file:spew</span>. This takes the any existing contents, you can use <span class="tt">file:spew</span>. This takes the
@ -200,7 +186,6 @@ string to write and a file name.
<br/><br/> <br/><br/>
<tt class='indentedcode'>'hello_world&nbsp;'/tmp/test.txt&nbsp;file:spew</tt> <tt class='indentedcode'>'hello_world&nbsp;'/tmp/test.txt&nbsp;file:spew</tt>
<br/><br/> <br/><br/>
<span class="h2">Iterating Over A File, Line By Line</span>
<br/><br/> <br/><br/>
You can easily iterate over each line in a file using the word You can easily iterate over each line in a file using the word
<span class="tt">file:for-each-line</span>. This will take a file name and a quote, <span class="tt">file:for-each-line</span>. This will take a file name and a quote,

View file

@ -43,8 +43,7 @@
.hr { display: block; height: 2px; background: #000000; } .hr { display: block; height: 2px; background: #000000; }
</style> </style>
</head><body> </head><body>
<p><span class="h1">Working With Floating Point</span> <p><br/><br/>
<br/><br/>
Some RETRO systems include support for floating point numbers. Some RETRO systems include support for floating point numbers.
When present, this is built over the system <span class="tt">libm</span> using the When present, this is built over the system <span class="tt">libm</span> using the
C <span class="tt">double</span> type. C <span class="tt">double</span> type.
@ -136,7 +135,6 @@ like infinity and NaN.
&bull; <span class="tt">f:inf?</span><br/> &bull; <span class="tt">f:inf?</span><br/>
&bull; <span class="tt">f:nan?</span><br/> &bull; <span class="tt">f:nan?</span><br/>
<br/><br/> <br/><br/>
<span class="h2">Basic Math</span>
<br/><br/> <br/><br/>
&bull; <span class="tt">f:*</span><br/> &bull; <span class="tt">f:*</span><br/>
&bull; <span class="tt">f:+</span><br/> &bull; <span class="tt">f:+</span><br/>
@ -174,7 +172,6 @@ related calculations.
| <span class="tt">f:sin</span> | sine | | <span class="tt">f:sin</span> | sine |
| <span class="tt">f:tan</span> | tangent | | <span class="tt">f:tan</span> | tangent |
<br/><br/> <br/><br/>
<span class="h2">Storage and Retrieval</span>
<br/><br/> <br/><br/>
By leveraging the encoded value functions, RETRO is able to By leveraging the encoded value functions, RETRO is able to
allow storage of floating point values in memory. This does allow storage of floating point values in memory. This does
@ -196,7 +193,6 @@ store and retrieve values using multiple cells.
The floating point vocabulary has a single I/O word, <span class="tt">f:put</span>, The floating point vocabulary has a single I/O word, <span class="tt">f:put</span>,
for the display of floating point numbers. for the display of floating point numbers.
<br/><br/> <br/><br/>
<span class="h2">Encoded Values</span>
<br/><br/> <br/><br/>
RETRO provides a means of encoding and decoding floating point RETRO provides a means of encoding and decoding floating point
values into standard integer cells. This is based on the paper values into standard integer cells. This is based on the paper

View file

@ -43,8 +43,7 @@
.hr { display: block; height: 2px; background: #000000; } .hr { display: block; height: 2px; background: #000000; }
</style> </style>
</head><body> </head><body>
<p><span class="h1">Lexical Scope</span> <p><br/><br/>
<br/><br/>
RETRO has a single dictionary, but does provide a means of using RETRO has a single dictionary, but does provide a means of using
lexical scope to keep this dictionary clean. lexical scope to keep this dictionary clean.
<br/><br/> <br/><br/>
@ -90,7 +89,6 @@ example:
In this, after <span class="tt">}}</span> closes the area, the <span class="tt">:a #2 ;</span> is hidden and In this, after <span class="tt">}}</span> closes the area, the <span class="tt">:a #2 ;</span> is hidden and
the <span class="tt">s:evaluate</span> will find the <span class="tt">:a #1 ;</span> when <span class="tt">b</span> is run. the <span class="tt">s:evaluate</span> will find the <span class="tt">:a #1 ;</span> when <span class="tt">b</span> is run.
<br/><br/> <br/><br/>
<span class="h2">A Word of Warning</span>
<br/><br/> <br/><br/>
Use of these words can result in a corrupt dictionary and system Use of these words can result in a corrupt dictionary and system
crashes. Specifically, use of <span class="tt">---reveal---</span> with an empty private crashes. Specifically, use of <span class="tt">---reveal---</span> with an empty private

View file

@ -47,7 +47,6 @@
<br/><br/> <br/><br/>
RETRO provides several words for creating loops. RETRO provides several words for creating loops.
<br/><br/> <br/><br/>
<span class="h2">Unconditional Loops</span>
<br/><br/> <br/><br/>
An unconditional loop begins with <span class="tt">repeat</span> and ends with <span class="tt">again</span>. An unconditional loop begins with <span class="tt">repeat</span> and ends with <span class="tt">again</span>.
<br/><br/> <br/><br/>
@ -72,7 +71,6 @@ Be careful with recursion as the virtual machine will have a limited
amount of space for the address stack and recursing too many times amount of space for the address stack and recursing too many times
can cause a stack overflow. can cause a stack overflow.
<br/><br/> <br/><br/>
<span class="h2">Conditional Loops</span>
<br/><br/> <br/><br/>
There are two conditional looping combinators: <span class="tt">while</span> and <span class="tt">until</span>. There are two conditional looping combinators: <span class="tt">while</span> and <span class="tt">until</span>.
Both take a quote and execute it, checking a returned flag to decide Both take a quote and execute it, checking a returned flag to decide
@ -81,7 +79,6 @@ when to stop running.
<tt class='indentedcode'>#0&nbsp;[&nbsp;dup&nbsp;n:put&nbsp;sp&nbsp;n:inc&nbsp;dup&nbsp;#10&nbsp;eq?&nbsp;]&nbsp;until</tt> <tt class='indentedcode'>#0&nbsp;[&nbsp;dup&nbsp;n:put&nbsp;sp&nbsp;n:inc&nbsp;dup&nbsp;#10&nbsp;eq?&nbsp;]&nbsp;until</tt>
<tt class='indentedcode'>#10&nbsp;[&nbsp;dup&nbsp;n:put&nbsp;sp&nbsp;n:dec&nbsp;dup&nbsp;n:-zero?&nbsp;]&nbsp;while</tt> <tt class='indentedcode'>#10&nbsp;[&nbsp;dup&nbsp;n:put&nbsp;sp&nbsp;n:dec&nbsp;dup&nbsp;n:-zero?&nbsp;]&nbsp;while</tt>
<br/><br/> <br/><br/>
<span class="h2">Counted Loops</span>
<br/><br/> <br/><br/>
There are two combinators for counted loops. These are <span class="tt">times</span> and There are two combinators for counted loops. These are <span class="tt">times</span> and
<span class="tt">indexed-times</span>. <span class="tt">indexed-times</span>.

View file

@ -43,8 +43,7 @@
.hr { display: block; height: 2px; background: #000000; } .hr { display: block; height: 2px; background: #000000; }
</style> </style>
</head><body> </head><body>
<p><span class="h1">Multiple Cores</span> <p><br/><br/>
<br/><br/>
Nga has optional support for multiple virtual cores. These Nga has optional support for multiple virtual cores. These
are not directly comparable to actual CPU cores, but do are not directly comparable to actual CPU cores, but do
allow for a degree of multitasking. allow for a degree of multitasking.
@ -84,7 +83,6 @@ Example:
<br/><br/> <br/><br/>
<tt class='indentedcode'>#4&nbsp;core:init</tt> <tt class='indentedcode'>#4&nbsp;core:init</tt>
<br/><br/> <br/><br/>
<span class="h2">Starting a Core</span>
<br/><br/> <br/><br/>
Initialization does not activate a core. To do this, you need Initialization does not activate a core. To do this, you need
to use <span class="tt">core:start</span>. Pass this the address of the word to to use <span class="tt">core:start</span>. Pass this the address of the word to
@ -95,7 +93,6 @@ Example:
<tt class='indentedcode'>:a&nbsp;[&nbsp;$a&nbsp;c:put&nbsp;]&nbsp;forever&nbsp;;</tt> <tt class='indentedcode'>:a&nbsp;[&nbsp;$a&nbsp;c:put&nbsp;]&nbsp;forever&nbsp;;</tt>
<tt class='indentedcode'>&amp;a&nbsp;#4&nbsp;core:start</tt> <tt class='indentedcode'>&amp;a&nbsp;#4&nbsp;core:start</tt>
<br/><br/> <br/><br/>
<span class="h2">Pausing a Core</span>
<br/><br/> <br/><br/>
Two words are provided for suspending a core. The first is Two words are provided for suspending a core. The first is
<span class="tt">core:pause</span>. Pass this the core number to pause. <span class="tt">core:pause</span>. Pass this the core number to pause.
@ -111,7 +108,6 @@ Example:
<br/><br/> <br/><br/>
<tt class='indentedcode'>core:pause-current</tt> <tt class='indentedcode'>core:pause-current</tt>
<br/><br/> <br/><br/>
<span class="h2">Resuming a Core</span>
<br/><br/> <br/><br/>
To reactive a core, use <span class="tt">core:resume</span>. This takes the core To reactive a core, use <span class="tt">core:resume</span>. This takes the core
number to activate. number to activate.
@ -139,7 +135,6 @@ usable on Retro/Napia with minimal changes.
The main differences are that under Nga, this is an optional The main differences are that under Nga, this is an optional
extension, but in Napia, it is part of the standard system. extension, but in Napia, it is part of the standard system.
<br/><br/> <br/><br/>
<span class="h2">Other Notes</span>
<br/><br/> <br/><br/>
On startup, execution occurs on core 0, with only core 0 being On startup, execution occurs on core 0, with only core 0 being
initialized. initialized.

View file

@ -43,11 +43,9 @@
.hr { display: block; height: 2px; background: #000000; } .hr { display: block; height: 2px; background: #000000; }
</style> </style>
</head><body> </head><body>
<p><span class="h1">Naming Conventions</span> <p><br/><br/>
<br/><br/>
Word names in RETRO generally follow the following conventions. Word names in RETRO generally follow the following conventions.
<br/><br/> <br/><br/>
<span class="h2">General Guidelines</span>
<br/><br/> <br/><br/>
&bull; Readability is important<br/> &bull; Readability is important<br/>
&bull; Be consistent<br/> &bull; Be consistent<br/>
@ -57,7 +55,6 @@ Word names in RETRO generally follow the following conventions.
&bull; Word names start with a <span class="tt">-</span> for "not"<br/> &bull; Word names start with a <span class="tt">-</span> for "not"<br/>
&bull; Words returning a flag end in ?<br/> &bull; Words returning a flag end in ?<br/>
<br/><br/> <br/><br/>
<span class="h2">Typical Format</span>
<br/><br/> <br/><br/>
The word names will generally follow a form like: The word names will generally follow a form like:
<br/><br/> <br/><br/>
@ -115,7 +112,6 @@ The common namespaces are:
<br/><br/> <br/><br/>
<span class="h2">Tips</span> <span class="h2">Tips</span>
<br/><br/> <br/><br/>
<span class="h3">Don't Start Names With Sigil Characters</span>
<br/><br/> <br/><br/>
Avoid using a sigil as the first character of a word name. RETRO Avoid using a sigil as the first character of a word name. RETRO
will look for sigils first, this will prevent direct use of will look for sigils first, this will prevent direct use of
@ -125,7 +121,6 @@ To find a list of sigil characters, do:
<br/><br/> <br/><br/>
<tt class='indentedcode'>'sigil:&nbsp;d:words-with</tt> <tt class='indentedcode'>'sigil:&nbsp;d:words-with</tt>
<br/><br/> <br/><br/>
<span class="h3">Don't Use Underscores</span>
<br/><br/> <br/><br/>
Underscores in strings are replaced by spaces. This is problematic, Underscores in strings are replaced by spaces. This is problematic,
especially with variables. Consider: especially with variables. Consider:

View file

@ -43,8 +43,7 @@
.hr { display: block; height: 2px; background: #000000; } .hr { display: block; height: 2px; background: #000000; }
</style> </style>
</head><body> </head><body>
<p><span class="h1">Working With Numbers</span> <p><br/><br/>
<br/><br/>
Numbers in RETRO are signed integers. Numbers in RETRO are signed integers.
<br/><br/> <br/><br/>
<span class="h2">Sigil</span> <span class="h2">Sigil</span>
@ -55,7 +54,6 @@ All numbers start with a <span class="tt">#</span> sigil.
<br/><br/> <br/><br/>
Most words operating on numbers are in the <span class="tt">n:</span> namespace. Most words operating on numbers are in the <span class="tt">n:</span> namespace.
<br/><br/> <br/><br/>
<span class="h2">Range of Values</span>
<br/><br/> <br/><br/>
A default RETRO system with 32 bit cells provides a range of A default RETRO system with 32 bit cells provides a range of
-2,147,483,648 to 2,147,483,647. For 64 bit systems, the range -2,147,483,648 to 2,147,483,647. For 64 bit systems, the range
@ -92,7 +90,6 @@ Additionally RETRO also provides:
<tt class='indentedcode'>n:strictly-positive?</tt> <tt class='indentedcode'>n:strictly-positive?</tt>
<tt class='indentedcode'>n:zero?</tt> <tt class='indentedcode'>n:zero?</tt>
<br/><br/> <br/><br/>
<span class="h2">Basic Operations</span>
<br/><br/> <br/><br/>
<tt class='indentedcode'>+</tt> <tt class='indentedcode'>+</tt>
<tt class='indentedcode'>-</tt> <tt class='indentedcode'>-</tt>

View file

@ -43,8 +43,7 @@
.hr { display: block; height: 2px; background: #000000; } .hr { display: block; height: 2px; background: #000000; }
</style> </style>
</head><body> </head><body>
<p><span class="h1">Working With Pointers</span> <p><br/><br/>
<br/><br/>
<span class="h2">Sigil</span> <span class="h2">Sigil</span>
<br/><br/> <br/><br/>
Pointers are returned by the <span class="tt">&amp;</span> sigil. Pointers are returned by the <span class="tt">&amp;</span> sigil.

View file

@ -48,7 +48,6 @@
Quotes are anonymous functions. RETRO uses these as the basis for Quotes are anonymous functions. RETRO uses these as the basis for
executable flow control and combinatorial logic. executable flow control and combinatorial logic.
<br/><br/> <br/><br/>
<span class="h2">Using Quotations</span>
<br/><br/> <br/><br/>
To make a quotation, surround the code with square brackets. E.g., To make a quotation, surround the code with square brackets. E.g.,
<br/><br/> <br/><br/>
@ -79,7 +78,6 @@ A quotation is compiled as:
<tt class='indentedcode'>d&nbsp;address&nbsp;of&nbsp;code&nbsp;for&nbsp;quotation</tt> <tt class='indentedcode'>d&nbsp;address&nbsp;of&nbsp;code&nbsp;for&nbsp;quotation</tt>
<tt class='indentedcode'>...&nbsp;code&nbsp;after&nbsp;quotation&nbsp;....</tt> <tt class='indentedcode'>...&nbsp;code&nbsp;after&nbsp;quotation&nbsp;....</tt>
<br/><br/> <br/><br/>
<span class="h2">Other Notes</span>
<br/><br/> <br/><br/>
Quotations are used heavily in RETRO. They give the source a Quotations are used heavily in RETRO. They give the source a
feel that's different from traditional Forth, and allow for feel that's different from traditional Forth, and allow for

View file

@ -43,8 +43,7 @@
.hr { display: block; height: 2px; background: #000000; } .hr { display: block; height: 2px; background: #000000; }
</style> </style>
</head><body> </head><body>
<p><span class="h1">The Return Stack</span> <p><br/><br/>
<br/><br/>
RETRO has two stacks. The primary one is used to pass data RETRO has two stacks. The primary one is used to pass data
between words. The second one primarily holds return addresses. between words. The second one primarily holds return addresses.
<br/><br/> <br/><br/>

View file

@ -43,8 +43,7 @@
.hr { display: block; height: 2px; background: #000000; } .hr { display: block; height: 2px; background: #000000; }
</style> </style>
</head><body> </head><body>
<p><span class="h1">Unix Scripting</span> <p><br/><br/>
<br/><br/>
RETRO on Unix hosts is designed to play well with scripting. RETRO on Unix hosts is designed to play well with scripting.
<br/><br/> <br/><br/>
Shebang Shebang

View file

@ -48,7 +48,6 @@
On Unix hosts, RETRO provides an optional set of words for using On Unix hosts, RETRO provides an optional set of words for using
network sockets. network sockets.
<br/><br/> <br/><br/>
<span class="h2">Create a Socket</span>
<br/><br/> <br/><br/>
To create a new socket, just run: To create a new socket, just run:
<br/><br/> <br/><br/>
@ -56,7 +55,6 @@ To create a new socket, just run:
<br/><br/> <br/><br/>
This will return a socket handle. This will return a socket handle.
<br/><br/> <br/><br/>
<span class="h2">Bind To A Port</span>
<br/><br/> <br/><br/>
To bind to a port, pass the port number and socket handle To bind to a port, pass the port number and socket handle
to <span class="tt">socket:bind</span>. The port should be a string. This will return to <span class="tt">socket:bind</span>. The port should be a string. This will return
@ -64,7 +62,6 @@ to <span class="tt">socket:bind</span>. The port should be a string. This will r
<br/><br/> <br/><br/>
<tt class='indentedcode'>'9998&nbsp;@Sock&nbsp;socket:bind</tt> <tt class='indentedcode'>'9998&nbsp;@Sock&nbsp;socket:bind</tt>
<br/><br/> <br/><br/>
<span class="h2">Configure To Allow Incoming Connections</span>
<br/><br/> <br/><br/>
To prepare a socket for incoming connections use socket:listen. This To prepare a socket for incoming connections use socket:listen. This
will take a backlog count and a socket handle. It returns a flag will take a backlog count and a socket handle. It returns a flag
@ -72,14 +69,12 @@ will take a backlog count and a socket handle. It returns a flag
<br/><br/> <br/><br/>
<tt class='indentedcode'>#3&nbsp;@Sock&nbsp;socket:listen</tt> <tt class='indentedcode'>#3&nbsp;@Sock&nbsp;socket:listen</tt>
<br/><br/> <br/><br/>
<span class="h2">Accept Connections</span>
<br/><br/> <br/><br/>
To accept connections pass the socket handle to <span class="tt">socket:accept</span>. To accept connections pass the socket handle to <span class="tt">socket:accept</span>.
This returns a new socket for the connection and an error code. This returns a new socket for the connection and an error code.
<br/><br/> <br/><br/>
<tt class='indentedcode'>@Sock&nbsp;socket:accept</tt> <tt class='indentedcode'>@Sock&nbsp;socket:accept</tt>
<br/><br/> <br/><br/>
<span class="h2">Make A Connection</span>
<br/><br/> <br/><br/>
To connect to a server using the socket: To connect to a server using the socket:
<br/><br/> <br/><br/>
@ -88,7 +83,6 @@ To connect to a server using the socket:
<br/><br/> <br/><br/>
<span class="tt">socket:connect</span> will return a status code and an error code. <span class="tt">socket:connect</span> will return a status code and an error code.
<br/><br/> <br/><br/>
<span class="h2">Writing To A Socket</span>
<br/><br/> <br/><br/>
To write a string to a socket, use <span class="tt">socket:send</span>. This will To write a string to a socket, use <span class="tt">socket:send</span>. This will
take a string and a socket handle and will return the number take a string and a socket handle and will return the number
@ -96,7 +90,6 @@ of bytes sent and an error code.
<br/><br/> <br/><br/>
<tt class='indentedcode'>'test&nbsp;@Sock&nbsp;socket:send</tt> <tt class='indentedcode'>'test&nbsp;@Sock&nbsp;socket:send</tt>
<br/><br/> <br/><br/>
<span class="h2">Reading From A Socket</span>
<br/><br/> <br/><br/>
To read data from a socket pass an address, a maximum number of To read data from a socket pass an address, a maximum number of
bytes, and the socket handle to <span class="tt">socket:recv</span>. This will return bytes, and the socket handle to <span class="tt">socket:recv</span>. This will return
@ -105,7 +98,6 @@ be stored in memory starting at the specified address.
<br/><br/> <br/><br/>
<tt class='indentedcode'>here&nbsp;#1024&nbsp;@Sock&nbsp;socket:recv</tt> <tt class='indentedcode'>here&nbsp;#1024&nbsp;@Sock&nbsp;socket:recv</tt>
<br/><br/> <br/><br/>
<span class="h2">Close a Socket</span>
<br/><br/> <br/><br/>
To close a socket, pass the socket handle to <span class="tt">socket:close</span>. To close a socket, pass the socket handle to <span class="tt">socket:close</span>.
<br/><br/> <br/><br/>

View file

@ -43,8 +43,7 @@
.hr { display: block; height: 2px; background: #000000; } .hr { display: block; height: 2px; background: #000000; }
</style> </style>
</head><body> </head><body>
<p><span class="h1">Stack Diagrams</span> <p><br/><br/>
<br/><br/>
Most words in RETRO have a stack comment. These look like: Most words in RETRO have a stack comment. These look like:
<br/><br/> <br/><br/>
<tt class='indentedcode'>(-)</tt> <tt class='indentedcode'>(-)</tt>

View file

@ -43,8 +43,7 @@
.hr { display: block; height: 2px; background: #000000; } .hr { display: block; height: 2px; background: #000000; }
</style> </style>
</head><body> </head><body>
<p><span class="h1">Working With Strings</span> <p><br/><br/>
<br/><br/>
Strings in RETRO are NULL terminated sequences of values Strings in RETRO are NULL terminated sequences of values
representing characters. Being NULL terminated, they can't representing characters. Being NULL terminated, they can't
contain a NULL (ASCII 0). contain a NULL (ASCII 0).
@ -178,7 +177,6 @@ which let you trim just the leading or trailing end as desired.
&bull; <span class="tt">s:format</span><br/> &bull; <span class="tt">s:format</span><br/>
&bull; <span class="tt">s:empty</span><br/> &bull; <span class="tt">s:empty</span><br/>
<br/><br/> <br/><br/>
<span class="h2">Controlling The Temporary Buffers</span>
<br/><br/> <br/><br/>
As dicussed in the Lifetime subsection, temporary strings are As dicussed in the Lifetime subsection, temporary strings are
allocated in a rotating buffer. The details of this can be allocated in a rotating buffer. The details of this can be

View file

@ -43,8 +43,7 @@
.hr { display: block; height: 2px; background: #000000; } .hr { display: block; height: 2px; background: #000000; }
</style> </style>
</head><body> </head><body>
<p><span class="h1">The Stacks</span> <p><br/><br/>
<br/><br/>
The stacks are a defining feature of Forth. They are are used The stacks are a defining feature of Forth. They are are used
to pass data between words and to track return addresses for to pass data between words and to track return addresses for
function calls. function calls.
@ -52,14 +51,12 @@ function calls.
RETRO always has two stacks, and optionally (if built with RETRO always has two stacks, and optionally (if built with
floating point support) a third. floating point support) a third.
<br/><br/> <br/><br/>
<span class="h2">Data Stack</span>
<br/><br/> <br/><br/>
This is the primary stack. Values are placed here, passed to This is the primary stack. Values are placed here, passed to
words which consume them and then return results. When I words which consume them and then return results. When I
refer to "the stack", this is the one I mean. Learning to use refer to "the stack", this is the one I mean. Learning to use
the stack is a crucial part to making effective use of RETRO. the stack is a crucial part to making effective use of RETRO.
<br/><br/> <br/><br/>
<span class="h3">Placing Values On The Stack</span>
<br/><br/> <br/><br/>
Values can be placed on the stack directly. Values can be placed on the stack directly.
<br/><br/> <br/><br/>
@ -70,7 +67,6 @@ Values can be placed on the stack directly.
<tt class='indentedcode'>|&nbsp;`'hello_world`&nbsp;|&nbsp;Push&nbsp;a&nbsp;pointer&nbsp;to&nbsp;a&nbsp;string&nbsp;to&nbsp;the&nbsp;stack&nbsp;&nbsp;|</tt> <tt class='indentedcode'>|&nbsp;`'hello_world`&nbsp;|&nbsp;Push&nbsp;a&nbsp;pointer&nbsp;to&nbsp;a&nbsp;string&nbsp;to&nbsp;the&nbsp;stack&nbsp;&nbsp;|</tt>
<tt class='indentedcode'>|&nbsp;`&amp;fetch`&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;Push&nbsp;the&nbsp;address&nbsp;of&nbsp;`fetch`&nbsp;to&nbsp;the&nbsp;stack&nbsp;|</tt> <tt class='indentedcode'>|&nbsp;`&amp;fetch`&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;Push&nbsp;the&nbsp;address&nbsp;of&nbsp;`fetch`&nbsp;to&nbsp;the&nbsp;stack&nbsp;|</tt>
<br/><br/> <br/><br/>
<span class="h3">Reordering The Stack</span>
<br/><br/> <br/><br/>
RETRO provides a number of <strong>shufflers</strong> for reordering items RETRO provides a number of <strong>shufflers</strong> for reordering items
on the stack. on the stack.
@ -113,19 +109,15 @@ states:
<br/><br/> <br/><br/>
<tt class='indentedcode'>'abcd&nbsp;'dcba&nbsp;reorder</tt> <tt class='indentedcode'>'abcd&nbsp;'dcba&nbsp;reorder</tt>
<br/><br/> <br/><br/>
<span class="h3">Resetting The Stack</span>
<br/><br/> <br/><br/>
If you need to quickly empty the stack, use <span class="tt">reset</span>. If you need to quickly empty the stack, use <span class="tt">reset</span>.
<br/><br/> <br/><br/>
<span class="h3">Get The Stack Depth</span>
<br/><br/> <br/><br/>
To find out how many items are on the stack, use <span class="tt">depth</span>. To find out how many items are on the stack, use <span class="tt">depth</span>.
<br/><br/> <br/><br/>
<span class="h3">Displaying The Stack</span>
<br/><br/> <br/><br/>
You can display the stack by running <span class="tt">dump-stack</span>. You can display the stack by running <span class="tt">dump-stack</span>.
<br/><br/> <br/><br/>
<span class="h3">Data Flow Combinators</span>
<br/><br/> <br/><br/>
RETRO provides <strong>combinators</strong> for working with data order on RETRO provides <strong>combinators</strong> for working with data order on
the stack. These are covered in a later chapter and are worth the stack. These are covered in a later chapter and are worth
@ -137,14 +129,12 @@ structured means of working.
The stack is <strong>not</strong> an array in addressable memory. Don't try The stack is <strong>not</strong> an array in addressable memory. Don't try
to treat it like one. to treat it like one.
<br/><br/> <br/><br/>
<span class="h2">Address Stack</span>
<br/><br/> <br/><br/>
This stack primarily holds return addresses for function calls. This stack primarily holds return addresses for function calls.
You normally won't need to directly interact with this stack, You normally won't need to directly interact with this stack,
but you can use <span class="tt">push</span> and <span class="tt">pop</span> to move values between the but you can use <span class="tt">push</span> and <span class="tt">pop</span> to move values between the
data stack and this. data stack and this.
<br/><br/> <br/><br/>
<span class="h2">Floating Point Stack</span>
<br/><br/> <br/><br/>
If you are using a build with floating point support a third If you are using a build with floating point support a third
stack will be present. Floating point values are kept and stack will be present. Floating point values are kept and

View file

@ -43,12 +43,10 @@
.hr { display: block; height: 2px; background: #000000; } .hr { display: block; height: 2px; background: #000000; }
</style> </style>
</head><body> </head><body>
<p><span class="h1">Using Combinators</span> <p><br/><br/>
<br/><br/>
A combinator is a function that consumes functions as input. A combinator is a function that consumes functions as input.
They are used heavily by the RETRO system. They are used heavily by the RETRO system.
<br/><br/> <br/><br/>
<span class="h2">Types of Combinators</span>
<br/><br/> <br/><br/>
Combinators are divided into three primary types: compositional, Combinators are divided into three primary types: compositional,
execution flow, and data flow. execution flow, and data flow.
@ -74,7 +72,6 @@ the latest value. So:
<span class="tt"><span class='prim'>dup</span> <span class='prim'>call</span> n:put </span><br/> <span class="tt"><span class='prim'>dup</span> <span class='prim'>call</span> n:put </span><br/>
<span class="tt"><span class='prim'>dup</span> <span class='prim'>call</span> n:put </span><br/> <span class="tt"><span class='prim'>dup</span> <span class='prim'>call</span> n:put </span><br/>
<span class="tt">```</span></span><br/><br/> <span class="tt">```</span></span><br/><br/>
<span class="h2">Execution Flow</span>
<br/><br/> <br/><br/>
Combinators of this type execute other functions. Combinators of this type execute other functions.
<br/><br/> <br/><br/>
@ -154,7 +151,6 @@ access to the loop index (via <span class="tt">I</span>) and parent loop indexes
<br/><br/> <br/><br/>
<span class='codeblock'><span class="tt">```</span><br/><span class="tt"><span class='num'>#10</span> <span class='imm'>[</span> I n:put sp <span class='imm'>]</span> indexed-times </span><br/> <span class='codeblock'><span class="tt">```</span><br/><span class="tt"><span class='num'>#10</span> <span class='imm'>[</span> I n:put sp <span class='imm'>]</span> indexed-times </span><br/>
<span class="tt">```</span></span><br/><br/> <span class="tt">```</span></span><br/><br/>
<span class="h2">Data Flow</span>
<br/><br/> <br/><br/>
These combinators exist to simplify stack usage in various These combinators exist to simplify stack usage in various
circumstances. circumstances.

View file

@ -43,8 +43,7 @@
.hr { display: block; height: 2px; background: #000000; } .hr { display: block; height: 2px; background: #000000; }
</style> </style>
</head><body> </head><body>
<p><span class="h1">Word Classes</span> <p><br/><br/>
<br/><br/>
Word classes are one of the two elements at the heart of Word classes are one of the two elements at the heart of
RETRO's interpreter. RETRO's interpreter.
<br/><br/> <br/><br/>
@ -56,7 +55,6 @@ In RETRO I define special words which receive a pointer and
decide how to deal with it. These are grouped into a <span class="tt">class:</span> decide how to deal with it. These are grouped into a <span class="tt">class:</span>
namespace. namespace.
<br/><br/> <br/><br/>
<span class="h2">How It Works</span>
<br/><br/> <br/><br/>
When a word is found in the dictionary, RETRO will push a When a word is found in the dictionary, RETRO will push a
pointer to the definition (the <span class="tt">d:xt</span> field) to the stack pointer to the definition (the <span class="tt">d:xt</span> field) to the stack
@ -79,7 +77,6 @@ like:
<br/><br/> <br/><br/>
<span class='codeblock'><span class="tt">```</span><br/><span class="tt"><span class='colon'>:class:word</span> <span class='note'>(a-)</span> compiling? <span class='imm'>[</span> compile:call <span class='imm'>]</span> <span class='imm'>[</span> <span class='prim'>call</span> <span class='imm'>]</span> choose <span class='imm'>;</span> </span><br/> <span class='codeblock'><span class="tt">```</span><br/><span class="tt"><span class='colon'>:class:word</span> <span class='note'>(a-)</span> compiling? <span class='imm'>[</span> compile:call <span class='imm'>]</span> <span class='imm'>[</span> <span class='prim'>call</span> <span class='imm'>]</span> choose <span class='imm'>;</span> </span><br/>
<span class="tt">```</span></span><br/><br/> <span class="tt">```</span></span><br/><br/>
<span class="h2">Using Classes</span>
<br/><br/> <br/><br/>
The ability to add new classes is useful. If I wanted to add The ability to add new classes is useful. If I wanted to add
a category of word that preserves an input value, I could do a category of word that preserves an input value, I could do

View file

@ -43,8 +43,7 @@
.hr { display: block; height: 2px; background: #000000; } .hr { display: block; height: 2px; background: #000000; }
</style> </style>
</head><body> </head><body>
<p><span class="h1">Additional Tools</span> <p><br/><br/>
<br/><br/>
In addition to the core <span class="tt">retro</span> binary, the <span class="tt">bin</span> directory In addition to the core <span class="tt">retro</span> binary, the <span class="tt">bin</span> directory
will contain a few other tools. will contain a few other tools.
<br/><br/> <br/><br/>
@ -96,7 +95,6 @@ RETRO kernel and can be used by other tools as well.
<br/><br/> <br/><br/>
<tt class='indentedcode'>retro-muri&nbsp;retro.muri</tt> <tt class='indentedcode'>retro-muri&nbsp;retro.muri</tt>
<br/><br/> <br/><br/>
<span class="h2">retro-tags and retro-locate</span>
<br/><br/> <br/><br/>
These tools are intended to be used together. The first tool, These tools are intended to be used together. The first tool,
<span class="tt">retro-tags</span>, will recursively scan the current directory for <span class="tt">retro-tags</span>, will recursively scan the current directory for

View file

@ -43,8 +43,7 @@
.hr { display: block; height: 2px; background: #000000; } .hr { display: block; height: 2px; background: #000000; }
</style> </style>
</head><body> </head><body>
<p><span class="h1">The Optional Retro Compiler</span> <p><br/><br/>
<br/><br/>
In addition to the base system, users of RETRO on Unix hosts In addition to the base system, users of RETRO on Unix hosts
with ELF executables can build and use the <span class="tt">retro-compiler</span> with ELF executables can build and use the <span class="tt">retro-compiler</span>
to generate turnkey executables. to generate turnkey executables.
@ -84,7 +83,6 @@ Use:
The compiler will generate an <span class="tt">a.out</span> file which you can The compiler will generate an <span class="tt">a.out</span> file which you can
then rename. then rename.
<br/><br/> <br/><br/>
<span class="h2">Known Limitations</span>
<br/><br/> <br/><br/>
This does not provide the scripting support for command line This does not provide the scripting support for command line
arguments that the standard <span class="tt">retro</span> interface offers. arguments that the standard <span class="tt">retro</span> interface offers.