|
|
|
參閱(See):
A.7 選用的區塊詞集(The optional Block word set)
參閱(See):
A.7.2 附加的專有名詞(Additional terms)
Append table 7.1 to table 3.5.
參閱(See):
3.2.6 環境的詢問(Environmental queries)
表格 7.1 - 環境詢問字串
字串 值 資料型別 常數? 意義 ------ --------------- --------- ------- BLOCK flag no 區塊詞集存在 BLOCK-EXT flag no 區塊延伸詞集存在
Table 7.1 - Environmental Query Strings
String Value data type Constant? Meaning ------ --------------- --------- ------- BLOCK flag no block word set present BLOCK-EXT flag no block extensions word set present
A program may access memory within a valid block buffer.
參閱(See):
3.3.3 資料空間(Data Space)
The address of a block buffer returned by BLOCK or BUFFER is transient. A call to BLOCK or BUFFER may render a previously-obtained block-buffer address invalid, as may a call to any word that:
如果這個輸入來源是一個區塊, 這些限制也適用於 SOURCE 回傳的位址.
If the input source is a block, these restrictions also apply to the address returned by SOURCE .
區塊緩衝區被唯一地指定給區塊.
Block buffers are uniquely assigned to blocks.
The Block word set implements an alternative input source for the text interpreter. When the input source is a block, BLK shall contain the non-zero block number and the input buffer is the 1024-character buffer containing that block.
一個區塊傳統地顯示為 16 行的 64 字元.
A block is conventionally displayed as 16 lines of 64 characters.
一個程式可以用 LOAD 或 THRU 來切換輸入來源到一個區塊. 輸入來源可以用任意順序來用 LOAD 和 EVALUATE 來巢狀化.
A program may switch the input source to a block by using LOAD or THRU. Input sources may be nested using LOAD and EVALUATE in any order.
一個程式可以用操作 >IN 的方式來改變一個區塊中的分析區的位置 更大規模的改變位置可以用 SAVE-INPUT 和 RESTORE-INPUT 來實行.
A program may reposition the parse area within a block by manipulating >IN. More extensive repositioning can be accomplished using SAVE-INPUT and RESTORE-INPUT.
參閱(See):
3.4.1 分析(Parsing)
參閱(See):
3.4.4 在一個模稜兩可的情況時可能的動作(
Possible action on an ambiguous condition)
The phrase Providing the Block word set shall be appended to the label of any Standard System that provides all of the Block word set.
措辭 從區塊延伸詞集提供 name(s) 必須被加到任何提供部分區塊延伸詞集的標準系統的描述之中.
The phrase Providing name(s) from the Block Extensions word set shall be appended to the label of any Standard System that provides portions of the Block Extensions word set.
措辭 提供區塊延伸詞集 必須被加到任何提供所有區塊和區塊延伸詞集的標準系統的描述之中.
The phrase Providing the Block Extensions word set shall be appended to the label of any Standard System that provides all of the Block and Block Extensions word sets.
The phrase Requiring the Block word set shall be appended to the label of Standard Programs that require the system to provide the Block word set.
措辭 需要區塊延伸詞集中的 name(s) 必須被加到任何需要系統提供部分區塊延伸詞集的標準程式的描述之中.
The phrase Requiring name(s) from the Block Extensions word set shall be appended to the label of Standard Programs that require the system to provide portions of the Block Extensions word set.
措辭 需要區塊延伸詞集 必須被加到任何需要系統提供所有區塊和區塊延伸詞集的標準程式的描述之中.
The phrase Requiring the Block Extensions word set shall be appended to the label of Standard Programs that require the system to provide all of the Block and Block Extensions word sets.
7.6.1.0790 BLK
( -- a-addr )
a-addr 是一個單元的位址, 它包含零或是被解譯的大量儲存媒體區塊的號碼. 如果 BLK 包含零, 輸入的來源不是一個區塊, 並且如果系統提供 SOURCE-ID, 就可用 SOURCE-ID 來識別. 如果程式直接替換 BLK 的內容, 將會發生模稜兩可的情況.
參閱:
7.3.3 區塊緩衝區區域
7.6.1.0790 BLK
( -- a-addr )
a-addr is the address of a cell containing zero or the number of the mass-storage block being interpreted. If BLK contains zero, the input source is not a block and can be identified by SOURCE-ID, if SOURCE-ID is available. An ambiguous condition exists if a program directly alters the contents of BLK.
See:
7.3.3 Block buffer regions
7.6.1.0800 BLOCK
( u -- a-addr )
a-addr 是指定給大量儲存區塊 u 的區塊緩衝區的第一個字元的位址. 如果 u 不是一個可用的區塊號碼, 將會發生模稜兩可的情況.
如果區塊 u 已經在一個區塊緩衝區中, a-addr 是那個區塊緩衝區的位址.
如果區塊 u 並非在記憶體中, 並且有一個未分配的區塊緩衝區, 從大量儲存媒體傳送區塊 u 到一個未分配的區塊緩衝區. a-addr 是那個區塊緩衝區的位址.
如果區塊 u 並非在記憶體中, 並且沒有一個未分配的區塊緩衝區, 釋放一個區塊緩衝區. 如果在那個緩衝區中的區塊已經被 UPDATE 過, 傳送這個區塊到大量儲存媒體, 並且從大量儲存媒體傳送區塊 u 到那個緩衝區. a-addr 是那個區塊緩衝區的位址.
這項操作的總結是, 由 a-addr 指向的區塊緩衝區是目前的區塊緩衝區, 並且分配給 u.
7.6.1.0800 BLOCK
( u -- a-addr )
a-addr is the address of the first character of the block buffer assigned to mass-storage block u. An ambiguous condition exists if u is not an available block number.
If block u is already in a block buffer, a-addr is the address of that block buffer.
If block u is not already in memory and there is an unassigned block buffer, transfer block u from mass storage to an unassigned block buffer. a-addr is the address of that block buffer.
If block u is not already in memory and there are no unassigned block buffers, unassign a block buffer. If the block in that buffer has been UPDATEd, transfer the block to mass storage and transfer block u from mass storage into that buffer. a-addr is the address of that block buffer.
At the conclusion of the operation, the block buffer pointed to by a-addr is the current block buffer and is assigned to u.
7.6.1.0820 BUFFER
( u -- a-addr )
a-addr 是指定給區塊 u 的區塊緩衝區的第一個字元的位址. 這個區塊的內容是未指定的. 如果 u 不是一個可用的區塊號碼, 將會發生模稜兩可的情況.
如果區塊 u 已經在一個區塊緩衝區中, a-addr 是那個區塊緩衝區的位址.
如果區塊 u 並非在記憶體中, 並且有一個未分配的區塊緩衝區, a-addr 是那個區塊緩衝區的位址.
如果區塊 u 並非在記憶體中, 並且沒有一個未分配的區塊緩衝區, 釋放一個區塊緩衝區. 如果在那個緩衝區中的區塊已經被 UPDATE 過, 傳送這個區塊到大量儲存媒體, a-addr 是那個區塊緩衝區的位址.
這項操作的總結是, 由 a-addr 指向的區塊緩衝區是目前的區塊緩衝區, 並且分配給 u.
參閱:
7.6.1.0800 BLOCK
7.6.1.0820 BUFFER
( u -- a-addr )
a-addr is the address of the first character of the block buffer assigned to block u. The contents of the block are unspecified. An ambiguous condition exists if u is not an available block number.
If block u is already in a block buffer, a-addr is the address of that block buffer.
If block u is not already in memory and there is an unassigned buffer, a-addr is the address of that block buffer.
If block u is not already in memory and there are no unassigned block buffers, unassign a block buffer. If the block in that buffer has been UPDATEd, transfer the block to mass storage. a-addr is the address of that block buffer.
At the conclusion of the operation, the block buffer pointed to by a-addr is the current block buffer and is assigned to u.
See:
7.6.1.0800 BLOCK
7.6.1.1360E EVALUATE
延伸 6.1.1360 EVALUATE 的語義成包含:
在 BLK 中存入零.
7.6.1.1360E EVALUATE
Extend the semantics of 6.1.1360 EVALUATE to include:
Store zero in BLK.
7.6.1.1559 FLUSH
( -- )
進行 SAVE-BUFFERS 的功能, 然後清除所有的區塊緩衝區.
7.6.1.1559 FLUSH
( -- )
Perform the function of SAVE-BUFFERS, then unassign all block buffers.
7.6.1.1790 LOAD
( i*x u -- j*x )
儲存目前的輸入來源規格. 將 u 存進 BLK (這讓 區塊 u 變成輸入來源, 並且設定輸入緩衝區包含它的內容), 設定 >IN 成零, 並且解譯. 當分析區用盡時, 回存之前的輸入來源規格. 其他的堆疊影響是依據其他載入的詞而訂.
如果 u 是零或不是一個正確的區塊號碼時, 模稜兩可的情況存在.
參閱:
3.4 Forth 文字解譯器
7.6.1.1790 LOAD
( i*x u -- j*x )
Save the current input-source specification. Store u in BLK (thus making block u the input source and setting the input buffer to encompass its contents), set >IN to zero, and interpret. When the parse area is exhausted, restore the prior input source specification. Other stack effects are due to the words LOADed.
An ambiguous condition exists if u is zero or is not a valid block number.
See:
3.4 The Forth text interpreter
7.6.1.2180 SAVE-BUFFERS
( -- )
傳送每一個 UPDATE 過的區塊緩衝區的內容到大量儲存媒體. 將所有的緩衝區標示為未修改過的.
7.6.1.2180 SAVE-BUFFERS
( -- )
Transfer the contents of each UPDATEd block buffer to mass storage. Mark all buffers as unmodified.
7.6.1.2400 UPDATE
( -- )
將目前的區塊緩衝區標示為修改過的. 如果沒有目前的區塊緩衝區, 將會發生模稜兩可的情況.
UPDATE 不會立即導致 I/O.
參閱:
7.6.1.0800 BLOCK ,
7.6.1.0820 BUFFER ,
7.6.1.1559 FLUSH ,
7.6.1.2180 SAVE-BUFFERS
7.6.1.2400 UPDATE
( -- )
Mark the current block buffer as modified. An ambiguous condition exists if there is no current block buffer.
UPDATE does not immediately cause I/O.
See:
7.6.1.0800 BLOCK ,
7.6.1.0820 BUFFER ,
7.6.1.1559 FLUSH ,
7.6.1.2180 SAVE-BUFFERS
7.6.2.1330 EMPTY-BUFFERS
( -- )
釋放所有的區塊緩衝區. 不要傳送任何 UPDATE 過的區塊緩衝區的內容到大量儲存媒體.
參閱:
7.6.1.0800 BLOCK
7.6.2.1330 EMPTY-BUFFERS
( -- )
Unassign all block buffers. Do not transfer the contents of any UPDATEd block buffer to mass storage.
See:
7.6.1.0800 BLOCK
7.6.2.1770 LIST
( u -- )
以實作自訂的格式顯示區塊 u. 將 u 存進 SCR.
參閱:
7.6.1.0800 BLOCK
7.6.2.1770 LIST
( u -- )
Display block u in an implementation-defined format. Store u in SCR.
See:
7.6.1.0800 BLOCK
7.6.2.2125 REFILL
( -- flag )
延伸 6.2.2125 REFILL 的執行語義加上:
當輸入的來源是一個區塊時, 讓下一個區塊成為輸入來源, 而目前的輸入緩衝區是 BLK 之值加一, 並且設定 >IN 為零. 如果新的 BLK 之值是一個正確的區塊號碼傳回真, 其他狀況傳回假.
7.6.2.2125 REFILL
( -- flag )
Extend the execution semantics of 6.2.2125 REFILL with the following:
When the input source is a block, make the next block the input source and current input buffer by adding one to the value of BLK and setting >IN to zero. Return true if the new value of BLK is a valid block number, otherwise false.
See:
11.6.2.2125 REFILL
7.6.2.2190 SCR
( -- a-addr )
a-addr 是一個包含最近由 LIST 使用過的區塊號碼的一個單元的位址.
參閱:
A.7.6.2.2190 SCR
7.6.2.2190 SCR
( -- a-addr )
a-addr is the address of a cell containing the block number of the block most recently LISTed.
See:
A.7.6.2.2190 SCR
7.6.2.2280 THRU
( i*x u1 u2 -- j*x )
依序 LOAD 從區塊號碼 u1 到 u2 的大量儲存區塊. 其他的堆疊影響是依照載入的詞而定.
7.6.2.2280 THRU
( i*x u1 u2 -- j*x )
LOAD the mass storage blocks numbered u1 through u2 in sequence. Other stack effects are due to the words LOADed.
7.6.2.2535 \
延伸 6.2.2535 \ 的執行語義成:
編譯: 進行下列給予的執行語義.
執行: ( ccc<eol>-- )
如果 BLK 包含零, 分析並丟棄其餘的分析區; 否則分析並丟棄分析區中對應到目前行的部分. \ 是一個立即詞.
7.6.2.2535 \
Extend the semantics of 6.2.2535 \ to be:
Compilation: Perform the execution semantics given below.
Execution: ( ccc<eol>-- )
If BLK contains zero, parse and discard the remainder of the parse area; otherwise parse and discard the portion of the parse area corresponding to the remainder of the current line. \ is an immediate word.
內容列表(Table of Contents)
下一章(Next Section)