Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Bernd Paysan
thinking-forth
Commits
5e030b0a
Commit
5e030b0a
authored
Jun 05, 2006
by
paysan
Browse files
Error in chapter6 fixed
parent
4205df49
Changes
2
Hide whitespace changes
Inline
Side-by-side
appendixb.tex
View file @
5e030b0a
...
...
@@ -36,12 +36,12 @@ Here's an illustration of the dictionary entry created when we enter
{
\sf
\bigskip
\begin{tabular}
{
@
{}
l l@
{}
}
DOER JOE
&
\\
\begin{tabular}
{
|l|l|
}
\multicolumn
{
1
}{
l
}{
DOER JOE
}
&
\multicolumn
{
1
}{
l
}{}
\\
\hline
\vline\
JOE
&
\vline\
pfa of NOTHING
\vline
\\
JOE
&
pfa of NOTHING
\\
\hline
\
header
&
\
parameter field
\
multicolumn
{
1
}{
l
}{
header
}
&
\multicolumn
{
1
}{
l
}{
parameter field
}
\end{tabular}
\bigskip
}
...
...
chapter6.tex
View file @
5e030b0a
...
...
@@ -1148,7 +1148,7 @@ group of related addresses. Here's the first try:
\begin{Code}
hex 01a0 Constant base.port.address
base.port.address Constant speaker
base.port.address 2+ Constant flipper-a
base.port.address 2
+ Constant flipper-a
base.port.address 4 + Constant flipper-b
base.port.address 6 + Constant win-light
decimal
...
...
@@ -1163,7 +1163,7 @@ repeated code into the ``does'' part of a defining word:
\begin{Code}
: Port ( offset -- ) Create ,
\
DOES> ( -- 'port) @ base.port.address + ;
DOES> ( -- 'port) @ base.port.address + ;
0 Port speaker
2 Port flipper-a
4 Port flipper-b
...
...
@@ -1199,7 +1199,7 @@ makes a constant out of it, then adds 2 to the address still on the
stack, for the next invocation of
\forth
{
PORT
}
.
\begin{Code}
: Port ( 'port -- 'next-port) dup C
reate ,
2+ ;
: Port ( 'port -- 'next-port) dup C
onstant
2
+ ;
\
DOES> ( -- 'port)
base.port.address
Port speaker
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment