Commit 5e030b0a authored by paysan's avatar paysan

Error in chapter6 fixed

parent 4205df49
......@@ -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
}
......
......@@ -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 Create , 2+ ;
: Port ( 'port -- 'next-port) dup Constant 2 + ;
\ DOES> ( -- 'port)
base.port.address
Port speaker
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment