Whitespace-only changes: apply accepted line breaking style as a
pre-cursor to other markup changes. Accepted in principle by the author.
This commit is contained in:
parent
37f653195d
commit
0c74e83819
@ -38,22 +38,24 @@ The program called
|
|||||||
is the final stage of FreeBSD's kernel bootstrapping process.
|
is the final stage of FreeBSD's kernel bootstrapping process.
|
||||||
On IA32 (i386) architectures, it is a
|
On IA32 (i386) architectures, it is a
|
||||||
.Pa BTX
|
.Pa BTX
|
||||||
client. It is linked statically to
|
client.
|
||||||
|
It is linked statically to
|
||||||
.Xr libstand 3
|
.Xr libstand 3
|
||||||
and usually located in the directory
|
and usually located in the directory
|
||||||
.Pa /boot .
|
.Pa /boot .
|
||||||
.Pp
|
.Pp
|
||||||
It provides a scripting language that can be used to
|
It provides a scripting language that can be used to
|
||||||
automate tasks, do pre-configuration or assist in recovery
|
automate tasks, do pre-configuration or assist in recovery
|
||||||
procedures. This scripting language is roughly divided in
|
procedures.
|
||||||
two main components. The smaller one is a set of commands
|
This scripting language is roughly divided in
|
||||||
|
two main components.
|
||||||
|
The smaller one is a set of commands
|
||||||
designed for direct use by the casual user, called "builtin
|
designed for direct use by the casual user, called "builtin
|
||||||
commands" for historical reasons. The main drive behind
|
commands" for historical reasons.
|
||||||
these commands is user-friendlyness. The bigger component
|
The main drive behind these commands is user-friendlyness.
|
||||||
is an
|
The bigger component is an
|
||||||
.Tn ANS
|
.Tn ANS
|
||||||
Forth compatible Forth interpreter based on
|
Forth compatible Forth interpreter based on ficl, by
|
||||||
ficl, by
|
|
||||||
.An John Sadler .
|
.An John Sadler .
|
||||||
.Pp
|
.Pp
|
||||||
During initialization,
|
During initialization,
|
||||||
@ -62,18 +64,21 @@ will probe for a console and set the
|
|||||||
.Va console
|
.Va console
|
||||||
variable, or set it to serial console
|
variable, or set it to serial console
|
||||||
.Pq Dq comconsole
|
.Pq Dq comconsole
|
||||||
if the previous boot stage used that. Then, devices are probed,
|
if the previous boot stage used that.
|
||||||
|
Then, devices are probed,
|
||||||
.Va currdev
|
.Va currdev
|
||||||
and
|
and
|
||||||
.Va loaddev
|
.Va loaddev
|
||||||
are set, and
|
are set, and
|
||||||
.Va LINES
|
.Va LINES
|
||||||
is set to 24 . Next,
|
is set to 24.
|
||||||
|
Next,
|
||||||
.Tn FICL
|
.Tn FICL
|
||||||
is initialized, the builtin words are added to its vocabulary, and
|
is initialized, the builtin words are added to its vocabulary, and
|
||||||
.Pa /boot/boot.4th
|
.Pa /boot/boot.4th
|
||||||
will be processed if it exists. No disk switching is possible while
|
will be processed if it exists.
|
||||||
that file is being read. The inner interpreter
|
No disk switching is possible while that file is being read.
|
||||||
|
The inner interpreter
|
||||||
.Nm
|
.Nm
|
||||||
will use with
|
will use with
|
||||||
.Tn FICL
|
.Tn FICL
|
||||||
@ -81,12 +86,13 @@ is then set to
|
|||||||
.Ic interpret ,
|
.Ic interpret ,
|
||||||
which is
|
which is
|
||||||
.Tn FICL Ns 's
|
.Tn FICL Ns 's
|
||||||
default. After that,
|
default.
|
||||||
|
After that,
|
||||||
.Pa /boot/loader.rc
|
.Pa /boot/loader.rc
|
||||||
is processed if available, and, failing that,
|
is processed if available, and, failing that,
|
||||||
.Pa /boot/boot.conf
|
.Pa /boot/boot.conf
|
||||||
will be read for historical reasons. These files are processed
|
will be read for historical reasons.
|
||||||
through the
|
These files are processed through the
|
||||||
.Ic include
|
.Ic include
|
||||||
command, which read all of them into memory before processing them,
|
command, which read all of them into memory before processing them,
|
||||||
making disk changes possible.
|
making disk changes possible.
|
||||||
@ -99,21 +105,25 @@ is not set to
|
|||||||
.Dq NO
|
.Dq NO
|
||||||
(not case sensitive), then an
|
(not case sensitive), then an
|
||||||
.Ic autoboot
|
.Ic autoboot
|
||||||
will be tried. If the system gets past this point,
|
will be tried.
|
||||||
|
If the system gets past this point,
|
||||||
.Va prompt
|
.Va prompt
|
||||||
will be set and
|
will be set and
|
||||||
.Nm
|
.Nm
|
||||||
will engage interactive mode.
|
will engage interactive mode.
|
||||||
.Sh BUILTIN COMMANDS
|
.Sh BUILTIN COMMANDS
|
||||||
.Nm Loader Ns No 's
|
.Nm Loader Ns No 's
|
||||||
builtin commands take its parameters from the command line. Presently,
|
builtin commands take its parameters from the command line.
|
||||||
|
Presently,
|
||||||
the only way to call them from a script is by using
|
the only way to call them from a script is by using
|
||||||
.Pa evaluate
|
.Pa evaluate
|
||||||
on a string. If an error condition occurs, an exception will be
|
on a string.
|
||||||
generated, which can be intercepted using
|
If an error condition occurs, an exception will be generated,
|
||||||
|
which can be intercepted using
|
||||||
.Tn ANS
|
.Tn ANS
|
||||||
Forth exception handling
|
Forth exception handling
|
||||||
words. If not intercepted, an error message will be displayed and
|
words.
|
||||||
|
If not intercepted, an error message will be displayed and
|
||||||
the interpreter's state will be reset, emptying the stack and restoring
|
the interpreter's state will be reset, emptying the stack and restoring
|
||||||
interpreting mode.
|
interpreting mode.
|
||||||
.Pp
|
.Pp
|
||||||
@ -122,31 +132,37 @@ The builtin commands available are:
|
|||||||
.Bl -tag -width Ds -compact -offset indent
|
.Bl -tag -width Ds -compact -offset indent
|
||||||
.It Ic autoboot Op Ar seconds
|
.It Ic autoboot Op Ar seconds
|
||||||
Proceeds to bootstrap the system after a number of seconds, if not
|
Proceeds to bootstrap the system after a number of seconds, if not
|
||||||
interrupted by the user. Displays a countdown prompt warning the
|
interrupted by the user.
|
||||||
user the system is about to be booted, unless interrupted by a key
|
Displays a countdown prompt
|
||||||
press. The kernel will be loaded first if necessary. Defaults to
|
warning the user the system is about to be booted,
|
||||||
10 seconds.
|
unless interrupted by a key press.
|
||||||
|
The kernel will be loaded first if necessary.
|
||||||
|
Defaults to 10 seconds.
|
||||||
.Pp
|
.Pp
|
||||||
.It Ic bcachestat
|
.It Ic bcachestat
|
||||||
Displays statistics about disk cache usage. For depuration only.
|
Displays statistics about disk cache usage.
|
||||||
|
For depuration only.
|
||||||
.Pp
|
.Pp
|
||||||
.It Ic boot
|
.It Ic boot
|
||||||
.It Ic boot Ar kernelname Op Cm ...
|
.It Ic boot Ar kernelname Op Cm ...
|
||||||
.It Ic boot Fl flag Cm ...
|
.It Ic boot Fl flag Cm ...
|
||||||
Immediately proceeds to bootstrap the system, loading the kernel
|
Immediately proceeds to bootstrap the system, loading the kernel
|
||||||
if necessary. Any flags or arguments are passed to the kernel, but they
|
if necessary.
|
||||||
|
Any flags or arguments are passed to the kernel, but they
|
||||||
must precede the kernel name, if a kernel name is provided.
|
must precede the kernel name, if a kernel name is provided.
|
||||||
.Pp
|
.Pp
|
||||||
.It Ic echo Xo
|
.It Ic echo Xo
|
||||||
.Op Fl n
|
.Op Fl n
|
||||||
.Op Aq message
|
.Op Aq message
|
||||||
.Xc
|
.Xc
|
||||||
Displays a text on the screen. A new line will be printed unless
|
Displays a text on the screen.
|
||||||
|
A new line will be printed unless
|
||||||
.Fl n
|
.Fl n
|
||||||
is specified.
|
is specified.
|
||||||
.Pp
|
.Pp
|
||||||
.It Ic heap
|
.It Ic heap
|
||||||
Displays memory usage statistics. For debugging purposes only.
|
Displays memory usage statistics.
|
||||||
|
For debugging purposes only.
|
||||||
.Pp
|
.Pp
|
||||||
.It Ic help Op topic Op subtopic
|
.It Ic help Op topic Op subtopic
|
||||||
Shows help messages read from
|
Shows help messages read from
|
||||||
@ -156,9 +172,10 @@ The special topic
|
|||||||
will list the topics available.
|
will list the topics available.
|
||||||
.Pp
|
.Pp
|
||||||
.It Ic include Ar file Op Ar
|
.It Ic include Ar file Op Ar
|
||||||
Process script files. Each file is, at a turn, completely read into
|
Process script files.
|
||||||
memory, and then have each of its lines passed to the command line
|
Each file is, at a turn, completely read into memory,
|
||||||
interpreter. If any error is returned by the interpreter, the include
|
and then have each of its lines passed to the command line interpreter.
|
||||||
|
If any error is returned by the interpreter, the include
|
||||||
commands aborts immediately, without reading any other files, and
|
commands aborts immediately, without reading any other files, and
|
||||||
returns an error itself (see
|
returns an error itself (see
|
||||||
.Sx ERRORS ) .
|
.Sx ERRORS ) .
|
||||||
@ -170,10 +187,10 @@ returns an error itself (see
|
|||||||
Loads a kernel, kernel loadable module (kld), or a file of opaque
|
Loads a kernel, kernel loadable module (kld), or a file of opaque
|
||||||
contents tagged as being of the type
|
contents tagged as being of the type
|
||||||
.Ar type .
|
.Ar type .
|
||||||
Kernel and modules can be either in a.out or elf format. Any arguments
|
Kernel and modules can be either in a.out or elf format.
|
||||||
passed after the name of the file to be loaded will be passed as
|
Any arguments passed after the name of the file to be loaded
|
||||||
arguments to that file. Notice, though, that, at the present, this does
|
will be passed as arguments to that file.
|
||||||
not work for the kernel.
|
Notice, though, that, at the present, this does not work for the kernel.
|
||||||
.Pp
|
.Pp
|
||||||
.It Ic ls Xo
|
.It Ic ls Xo
|
||||||
.Op Fl l
|
.Op Fl l
|
||||||
@ -183,17 +200,20 @@ Displays a listing of files in the directory
|
|||||||
.Ar path ,
|
.Ar path ,
|
||||||
or the root directory if
|
or the root directory if
|
||||||
.Ar path
|
.Ar path
|
||||||
is not specified. If
|
is not specified.
|
||||||
|
If
|
||||||
.Fl l
|
.Fl l
|
||||||
is specified, file sizes will be shown too.
|
is specified, file sizes will be shown too.
|
||||||
.Pp
|
.Pp
|
||||||
.It Ic lsdev Op Fl v
|
.It Ic lsdev Op Fl v
|
||||||
Lists all of the devices from which it may be possible to load modules. If
|
Lists all of the devices from which it may be possible to load modules.
|
||||||
|
If
|
||||||
.Fl v
|
.Fl v
|
||||||
is specified, more details are printed.
|
is specified, more details are printed.
|
||||||
.Pp
|
.Pp
|
||||||
.It Ic lsmod Op Fl v
|
.It Ic lsmod Op Fl v
|
||||||
Displays loaded modules. If
|
Displays loaded modules.
|
||||||
|
If
|
||||||
.Fl v
|
.Fl v
|
||||||
is specified, more details are shown.
|
is specified, more details are shown.
|
||||||
.Pp
|
.Pp
|
||||||
@ -203,7 +223,8 @@ Display the files specified, with a pause at each
|
|||||||
displayed.
|
displayed.
|
||||||
.Pp
|
.Pp
|
||||||
.It Ic pnpscan Op Fl v
|
.It Ic pnpscan Op Fl v
|
||||||
Scans for Plug-and-Play devices. This is not functional at the present.
|
Scans for Plug-and-Play devices.
|
||||||
|
This is not functional at the present.
|
||||||
.Pp
|
.Pp
|
||||||
.It Ic read Xo
|
.It Ic read Xo
|
||||||
.Op Fl t Ar seconds
|
.Op Fl t Ar seconds
|
||||||
@ -212,10 +233,11 @@ Scans for Plug-and-Play devices. This is not functional at the present.
|
|||||||
.Xc
|
.Xc
|
||||||
Reads a line of input from the terminal, storing it in
|
Reads a line of input from the terminal, storing it in
|
||||||
.Va variable
|
.Va variable
|
||||||
if specified. A timeout can be specified with
|
if specified.
|
||||||
|
A timeout can be specified with
|
||||||
.Fl t ,
|
.Fl t ,
|
||||||
though it will be canceled at the first key pressed. A prompt may
|
though it will be canceled at the first key pressed.
|
||||||
also be displayed through the
|
A prompt may also be displayed through the
|
||||||
.Fl p
|
.Fl p
|
||||||
flag.
|
flag.
|
||||||
.Pp
|
.Pp
|
||||||
@ -250,11 +272,12 @@ The
|
|||||||
.Nm
|
.Nm
|
||||||
has actually two different kinds of
|
has actually two different kinds of
|
||||||
.Sq environment
|
.Sq environment
|
||||||
variables. There are ANS Forth's
|
variables.
|
||||||
|
There are ANS Forth's
|
||||||
.Em environmental queries ,
|
.Em environmental queries ,
|
||||||
and a separate space of environment variables used by builtins, which
|
and a separate space of environment variables used by builtins, which
|
||||||
are not directly available to Forth words. It is the later ones that
|
are not directly available to Forth words.
|
||||||
this session covers.
|
It is the later ones that this session covers.
|
||||||
.Pp
|
.Pp
|
||||||
Environment variables can be set and unset through the use of the
|
Environment variables can be set and unset through the use of the
|
||||||
.Ic set
|
.Ic set
|
||||||
@ -263,7 +286,8 @@ and
|
|||||||
builtins, and have their value interactively examined through the
|
builtins, and have their value interactively examined through the
|
||||||
use of the
|
use of the
|
||||||
.Ic show
|
.Ic show
|
||||||
builtin. Their values can also be accessed as described in
|
builtin.
|
||||||
|
Their values can also be accessed as described in
|
||||||
.Sx BUILTIN PARSER .
|
.Sx BUILTIN PARSER .
|
||||||
.Pp
|
.Pp
|
||||||
Notice that this environment variables are not inherited by any shell
|
Notice that this environment variables are not inherited by any shell
|
||||||
@ -273,13 +297,16 @@ A few variables are set automatically by
|
|||||||
.Nm loader .
|
.Nm loader .
|
||||||
Others can affect either
|
Others can affect either
|
||||||
.Nm
|
.Nm
|
||||||
or kernel's behavior at boot. While some of these may require a value,
|
or kernel's behavior at boot.
|
||||||
others define behavior just by being set. These are described below.
|
While some of these may require a value,
|
||||||
|
others define behavior just by being set.
|
||||||
|
These are described below.
|
||||||
.Bl -tag -width bootfile -offset indent
|
.Bl -tag -width bootfile -offset indent
|
||||||
.It Va autoboot_delay
|
.It Va autoboot_delay
|
||||||
Number of seconds
|
Number of seconds
|
||||||
.Ic autoboot
|
.Ic autoboot
|
||||||
will wait before booting. If this variable is not defined,
|
will wait before booting.
|
||||||
|
If this variable is not defined,
|
||||||
.Ic autoboot
|
.Ic autoboot
|
||||||
will default to 10 seconds.
|
will default to 10 seconds.
|
||||||
.Pp
|
.Pp
|
||||||
@ -310,16 +337,18 @@ be run when the kernel is booted.
|
|||||||
Setting this variable causes extra debugging information to be printed
|
Setting this variable causes extra debugging information to be printed
|
||||||
by the kernel during the boot phase.
|
by the kernel during the boot phase.
|
||||||
.It Va bootfile
|
.It Va bootfile
|
||||||
List of semicolon-separated search path for bootable kernels. The default
|
List of semicolon-separated search path for bootable kernels.
|
||||||
is
|
The default is
|
||||||
.Li Dq kernel;kernel.old .
|
.Li Dq kernel;kernel.old .
|
||||||
.It Va console
|
.It Va console
|
||||||
Defines the current console.
|
Defines the current console.
|
||||||
.It Va currdev
|
.It Va currdev
|
||||||
Selects the default device. Syntax for devices is odd.
|
Selects the default device.
|
||||||
|
Syntax for devices is odd.
|
||||||
.It Va init_path
|
.It Va init_path
|
||||||
Sets the list of binaries which the kernel will try to run as initial
|
Sets the list of binaries which the kernel will try to run as initial
|
||||||
process. The default is
|
process.
|
||||||
|
The default is
|
||||||
.Li Dq /sbin/init:/sbin/oinit:/sbin/init.bak:/stand/sysinstall .
|
.Li Dq /sbin/init:/sbin/oinit:/sbin/init.bak:/stand/sysinstall .
|
||||||
.It Va interpret
|
.It Va interpret
|
||||||
Has the value
|
Has the value
|
||||||
@ -329,17 +358,19 @@ if the Forth's current state is interpreting.
|
|||||||
Define the number of lines on the screen, to be used by the pager.
|
Define the number of lines on the screen, to be used by the pager.
|
||||||
.It Va module_path
|
.It Va module_path
|
||||||
Sets the list of directories which will be searched in for modules
|
Sets the list of directories which will be searched in for modules
|
||||||
named in a load command or implicitly required by a dependancy. The
|
named in a load command or implicitly required by a dependancy.
|
||||||
default value for this variable is
|
The default value for this variable is
|
||||||
.Li Dq /;/boot;/modules .
|
.Li Dq /;/boot;/modules .
|
||||||
.It Va num_ide_disks
|
.It Va num_ide_disks
|
||||||
Sets the number of IDE disks as a work around for some problems in
|
Sets the number of IDE disks as a work around for some problems in
|
||||||
finding the root disk at boot. This has been deprecated in favour of
|
finding the root disk at boot.
|
||||||
|
This has been deprecated in favour of
|
||||||
.Va root_disk_unit .
|
.Va root_disk_unit .
|
||||||
.It Va prompt
|
.It Va prompt
|
||||||
Value of
|
Value of
|
||||||
.Nm Ns No 's
|
.Nm Ns No 's
|
||||||
prompt. Defaults to
|
prompt.
|
||||||
|
Defaults to
|
||||||
.Li Dq "${currdev}>" .
|
.Li Dq "${currdev}>" .
|
||||||
.It Va root_disk_unit
|
.It Va root_disk_unit
|
||||||
If the code which detects the disk unit number for the root disk is
|
If the code which detects the disk unit number for the root disk is
|
||||||
@ -350,7 +381,8 @@ be forced by setting this variable.
|
|||||||
By default the value of
|
By default the value of
|
||||||
.Va currdev
|
.Va currdev
|
||||||
is used to set the root filesystem
|
is used to set the root filesystem
|
||||||
when the kernel is booted. This can be overridden by setting
|
when the kernel is booted.
|
||||||
|
This can be overridden by setting
|
||||||
.Va rootdev
|
.Va rootdev
|
||||||
explicitly.
|
explicitly.
|
||||||
.El
|
.El
|
||||||
@ -359,25 +391,29 @@ Other variables are used to override kernel tunnable parameters.
|
|||||||
The following tunables are available:
|
The following tunables are available:
|
||||||
.Bl -tag -width Va -offset indent
|
.Bl -tag -width Va -offset indent
|
||||||
.It Va kern.ipc.nmbclusters
|
.It Va kern.ipc.nmbclusters
|
||||||
Set the number of mbuf clusters to be allocated. The value
|
Set the number of mbuf clusters to be allocated.
|
||||||
cannot be set below the default determined when the kernel
|
The value cannot be set below the default
|
||||||
was compiled. Modifies
|
determined when the kernel was compiled.
|
||||||
|
Modifies
|
||||||
.Va NMBCLUSTERS .
|
.Va NMBCLUSTERS .
|
||||||
.It Va kern.vm.kmem.size
|
.It Va kern.vm.kmem.size
|
||||||
Sets the size of kernel memory (bytes). This overrides
|
Sets the size of kernel memory (bytes).
|
||||||
completely the value determined when the kernel was
|
This overrides completely the value
|
||||||
compiled. Modifies
|
determined when the kernel was compiled.
|
||||||
|
Modifies
|
||||||
.Va VM_KMEM_SIZE .
|
.Va VM_KMEM_SIZE .
|
||||||
.It Va machdep.pccard.pcic_irq
|
.It Va machdep.pccard.pcic_irq
|
||||||
Overrides the IRQ normally assigned to a PCCARD controller.
|
Overrides the IRQ normally assigned to a PCCARD controller.
|
||||||
Typically the first available interrupt will be allocated,
|
Typically the first available interrupt will be allocated,
|
||||||
which may conflict with other hardware. If this value is
|
which may conflict with other hardware.
|
||||||
set to 0, an interrupt will not be assigned and the
|
If this value is set to 0,
|
||||||
controller will operate in polled mode only.
|
an interrupt will not be assigned
|
||||||
|
and the controller will operate in polled mode only.
|
||||||
.It Va net.inet.tcp.tcbhashsize
|
.It Va net.inet.tcp.tcbhashsize
|
||||||
Overrides the compile-time set value of
|
Overrides the compile-time set value of
|
||||||
.Va TCBHASHSIZE
|
.Va TCBHASHSIZE
|
||||||
or the preset default of 512. Must be a power of 2.
|
or the preset default of 512.
|
||||||
|
Must be a power of 2.
|
||||||
.El
|
.El
|
||||||
.Ss BUILTIN PARSER
|
.Ss BUILTIN PARSER
|
||||||
When a builtin command is executed, the rest of the line is taken
|
When a builtin command is executed, the rest of the line is taken
|
||||||
@ -400,7 +436,8 @@ All backslash characters are preprocessed.
|
|||||||
.Tn ASCII
|
.Tn ASCII
|
||||||
11.
|
11.
|
||||||
.It
|
.It
|
||||||
\ez is just skipped. Useful for things like
|
\ez is just skipped.
|
||||||
|
Useful for things like
|
||||||
.Dq \e0xf\ez\e0xf .
|
.Dq \e0xf\ez\e0xf .
|
||||||
.It
|
.It
|
||||||
\e0xN and \e0xNN are replaced by the hex N or NN.
|
\e0xN and \e0xNN are replaced by the hex N or NN.
|
||||||
@ -434,8 +471,9 @@ Spaces can also be escaped through the use of \e\e .
|
|||||||
An exception to this parsing rule exists, and is described in
|
An exception to this parsing rule exists, and is described in
|
||||||
.Sx BUILTINS AND FORTH .
|
.Sx BUILTINS AND FORTH .
|
||||||
.Ss BUILTINS AND FORTH
|
.Ss BUILTINS AND FORTH
|
||||||
All builtin words are state-smart, immediate words. If interpreted, they
|
All builtin words are state-smart, immediate words.
|
||||||
behave exactly as described previously. If they are compiled, though,
|
If interpreted, they behave exactly as described previously.
|
||||||
|
If they are compiled, though,
|
||||||
they extract their arguments from the stack instead of the command line.
|
they extract their arguments from the stack instead of the command line.
|
||||||
.Pp
|
.Pp
|
||||||
If compiled, the builtin words expect to find, at execution time, the
|
If compiled, the builtin words expect to find, at execution time, the
|
||||||
@ -444,15 +482,16 @@ following parameters on the stack:
|
|||||||
where
|
where
|
||||||
.Ar addrX lenX
|
.Ar addrX lenX
|
||||||
are strings which will compose the command line that will be parsed
|
are strings which will compose the command line that will be parsed
|
||||||
into the builtin's arguments. Internally, these strings are
|
into the builtin's arguments.
|
||||||
concatenated in from 1 to N, with a space put between each one.
|
Internally, these strings are concatenated in from 1 to N,
|
||||||
|
with a space put between each one.
|
||||||
.Pp
|
.Pp
|
||||||
If no arguments are passed, a 0
|
If no arguments are passed, a 0
|
||||||
.Em must
|
.Em must
|
||||||
be passed, even if the builtin accepts no arguments.
|
be passed, even if the builtin accepts no arguments.
|
||||||
.Pp
|
.Pp
|
||||||
While this behavior has benefits, it has its trade-offs. If the
|
While this behavior has benefits, it has its trade-offs.
|
||||||
execution token of a builtin is acquired (through
|
If the execution token of a builtin is acquired (through
|
||||||
.Ic No '
|
.Ic No '
|
||||||
or
|
or
|
||||||
.Ic No ['] ) ,
|
.Ic No ['] ) ,
|
||||||
@ -469,7 +508,8 @@ or
|
|||||||
is processed
|
is processed
|
||||||
.Ef
|
.Ef
|
||||||
\&! This is particular annoying for programs that want or need to
|
\&! This is particular annoying for programs that want or need to
|
||||||
treat exceptions. In this case, it is recommended the use of a proxy.
|
treat exceptions.
|
||||||
|
In this case, it is recommended the use of a proxy.
|
||||||
For example:
|
For example:
|
||||||
.Dl : (boot) boot ;
|
.Dl : (boot) boot ;
|
||||||
.Sh FICL
|
.Sh FICL
|
||||||
@ -484,7 +524,8 @@ each line read interactively is then fed to
|
|||||||
.Tn FICL ,
|
.Tn FICL ,
|
||||||
which may call
|
which may call
|
||||||
.Nm
|
.Nm
|
||||||
back to execute the builtin words. The builtin
|
back to execute the builtin words.
|
||||||
|
The builtin
|
||||||
.Ic include
|
.Ic include
|
||||||
will also feed
|
will also feed
|
||||||
.Tn FICL ,
|
.Tn FICL ,
|
||||||
@ -492,17 +533,21 @@ one line at a time.
|
|||||||
.Pp
|
.Pp
|
||||||
The words available to
|
The words available to
|
||||||
.Tn FICL
|
.Tn FICL
|
||||||
can be classified in four groups. The
|
can be classified in four groups.
|
||||||
|
The
|
||||||
.Tn ANS
|
.Tn ANS
|
||||||
Forth standard words, extra
|
Forth standard words, extra
|
||||||
.Tn FICL
|
.Tn FICL
|
||||||
words, extra
|
words, extra
|
||||||
.Os
|
.Os
|
||||||
words, and the builtin commands. The later were already described. The
|
words, and the builtin commands.
|
||||||
|
The later were already described.
|
||||||
|
The
|
||||||
.Tn ANS
|
.Tn ANS
|
||||||
Forth standard words are listed in the
|
Forth standard words are listed in the
|
||||||
.Sx STANDARDS
|
.Sx STANDARDS
|
||||||
section. The words falling in the two other groups are described in the
|
section.
|
||||||
|
The words falling in the two other groups are described in the
|
||||||
following subsections.
|
following subsections.
|
||||||
.Ss FICL EXTRA WORDS
|
.Ss FICL EXTRA WORDS
|
||||||
.Bl -tag -width wid-set-super -offset indent
|
.Bl -tag -width wid-set-super -offset indent
|
||||||
@ -550,7 +595,8 @@ Reads a single character from a file.
|
|||||||
Process file
|
Process file
|
||||||
.Em fd .
|
.Em fd .
|
||||||
.It Ic fopen Pq Ar addr len -- fd
|
.It Ic fopen Pq Ar addr len -- fd
|
||||||
Open a file. Returns a file descriptor, or -1 in case of failure.
|
Open a file.
|
||||||
|
Returns a file descriptor, or -1 in case of failure.
|
||||||
.It Xo
|
.It Xo
|
||||||
.Ic fread
|
.Ic fread
|
||||||
.Pq Ar fd addr len -- len'
|
.Pq Ar fd addr len -- len'
|
||||||
@ -585,7 +631,8 @@ Returns the number of seconds since midnight.
|
|||||||
.It Ic tib> Pq -- Ar addr len
|
.It Ic tib> Pq -- Ar addr len
|
||||||
Returns the remainder of the input buffer as a string on the stack.
|
Returns the remainder of the input buffer as a string on the stack.
|
||||||
.It Ic trace! Pq Ar flag --
|
.It Ic trace! Pq Ar flag --
|
||||||
Activates or deactivates tracing. Does not work with
|
Activates or deactivates tracing.
|
||||||
|
Does not work with
|
||||||
.Ic catch .
|
.Ic catch .
|
||||||
.El
|
.El
|
||||||
.Ss FREEBSD DEFINED ENVIRONMENTAL QUERIES
|
.Ss FREEBSD DEFINED ENVIRONMENTAL QUERIES
|
||||||
@ -615,7 +662,8 @@ Additional
|
|||||||
initialization.
|
initialization.
|
||||||
.It Pa /boot/boot.conf
|
.It Pa /boot/boot.conf
|
||||||
.Nm
|
.Nm
|
||||||
bootstrapping script. Deprecated.
|
bootstrapping script.
|
||||||
|
Deprecated.
|
||||||
.It Pa /boot/loader.rc
|
.It Pa /boot/loader.rc
|
||||||
.Nm
|
.Nm
|
||||||
bootstrapping script.
|
bootstrapping script.
|
||||||
@ -629,8 +677,8 @@ Boot in single user mode:
|
|||||||
.Pp
|
.Pp
|
||||||
.Dl boot -s
|
.Dl boot -s
|
||||||
.Pp
|
.Pp
|
||||||
Loads kernel's user configuration file. Notice that a kernel must be
|
Loads kernel's user configuration file.
|
||||||
loaded before any other
|
Notice that a kernel must be loaded before any other
|
||||||
.Ic load
|
.Ic load
|
||||||
command is attempted.
|
command is attempted.
|
||||||
.Pp
|
.Pp
|
||||||
@ -648,9 +696,9 @@ load -t splash_image_data /boot/chuckrulez.bmp
|
|||||||
autoboot 5
|
autoboot 5
|
||||||
.Ed
|
.Ed
|
||||||
.Pp
|
.Pp
|
||||||
Sets the disk unit of the root device to 2, and then boots. This would
|
Sets the disk unit of the root device to 2, and then boots.
|
||||||
be needed in the case of a two IDE disks system, with the second IDE
|
This would be needed in the case of a two IDE disks system,
|
||||||
hardwired to wd2 instead of wd1.
|
with the second IDE hardwired to wd2 instead of wd1.
|
||||||
.Pp
|
.Pp
|
||||||
.Bd -literal -offset indent -compact
|
.Bd -literal -offset indent -compact
|
||||||
set root_disk_unit=2
|
set root_disk_unit=2
|
||||||
@ -750,6 +798,5 @@ The
|
|||||||
.Ic expect
|
.Ic expect
|
||||||
and
|
and
|
||||||
.Ic accept
|
.Ic accept
|
||||||
words will read from the input buffer instead of the console. The latter
|
words will read from the input buffer instead of the console.
|
||||||
will be fixed, but the former will not.
|
The latter will be fixed, but the former will not.
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user