RFC194 日本語訳
0194 The Data Reconfiguration Service -- Compiler/InterpreterImplementation Notes. V. Cerf, E. Harslem, J. Heafner, B. Metcalfe,J. White. July 1971. (Format: TXT=32716 bytes) (Status: UNKNOWN)
プログラムでの自動翻訳です。
英語原文
Vint Cerf - UCLA
Vintサーフ--UCLA
Eric Harslem - Rand
エリックHarslem--底ならし革
RFC 194 John Heafner - Rand NIC 7139 Category: D.4 Bob Metcalfe - MIT Updates: None Obsoletes: None Jim White - UCSB
RFC194ジョンHeafner--底ならし革NIC7139カテゴリ: D.4ボブメトカルフェ--MITアップデート: なにも以下を時代遅れにしません。 ジムWhiteでないなにも--UCSB
THE DATA RECONFIGURATION SERVICE --
データ再構成サービス--
COMPILER/INTERPRETER IMPLEMENTATION NOTES
コンパイラ/インタプリタ実現注意
I. NEW FEATURES OF THE LANGUAGE
言語に関するI.新機能
1. The meaning of S(#,E,,l) is only find an arbitrary
number (<=256) of EBCDIC characters and store them in
identifier S. This descriptor is terminated only by
an invalid EBCDIC or by exceeding maximum permissible
character count (256).
2. The assignment (S .<=. T) causes all attributes of
identifier T to be given to S, i.e., length, type,
and contents.
3. (S .<=. T || X) concatenates X onto the right-hand
side of T and stores the result in S. If T and X
are binary the resulting value has a length equal
to the sum L(T) + L(X).
4. T(X) joins L(X) and V(X) as a built-in identifier
function.
T(X) = type of identifier X.
L(X) = length of contents of X.
V(X) = contents of X converted to binary
(decimal - binary is presently the only
transformation).
5. New types ED and AD are EBCDIC and ASCII encoded
decimal, respectively. These have been added to
complement the V(X) function.
6. New type SB has been added as signed binary. Type B
is a logical binary string.
7. The syntactic notation for return-from-a-form has
been changed. See new syntax.
1. Sの意味、(#、E、l)はEBCDlC文字と店の特殊活字の数字(<=256)が単に無効のEBCDICによって終えられるか、または最大の許されているキャラクタカウント(256)を超えているのがわかるだけであることです。 2. 課題(S<=T)で、S、すなわち、長さ、タイプ、およびコンテンツに識別子Tのすべての属性を与えます。 3. (S<=T| | X) Tの右側にXを連結して、TとXが結果として起こる値が合計L(T)+L(X)と等しい長さに持っているバイナリーであるというS.Ifの結果を格納します。 4. T(X)は内蔵の識別子機能としてL(X)とV(X)を接合します。 XのX. V(X)=コンテンツのコンテンツの識別子X. L(X)=長さのT(X)=タイプはバイナリーに変えました(現在、小数--バイナリーは唯一の変化です)。 5. 新しいタイプEDとADはEBCDICです、そして、ASCIIはそれぞれ小数をコード化しました。 これらは、V(X)機能の補足となるように加えられます。 6. 新しいタイプSBは2進でサインされるように加えられます。 タイプBは論理的な2進のストリングです。 7. フォームからのリターンのための構文の記法を変えました。 新しい構文を見てください。
[Page 1]
Data Reconfiguration Service RFC 194
[1ページ] データ再構成サービスRFC194
II. NEW SYNTAX
II。 新しい構文
form :: = rule | form
rule :: = label inputstream outputstream;
label :: = INTEGER | NULL
inputstream :: = terms | NULL
terms :: = term | terms, term
outputstream :: = :terms | NULL
term :: = identifier | identifier descriptor |
descriptor | comparator
identifier :: = <alpha followed by 0-3 alphanumerics>
descriptor :: = (replicationexpr, datatype, valueexpr,
lengthexpr control)
comparator :: = (concatexpr connective concatexpr control) |
(identifier .<=. concatexpr control)
replicationexpr :: = # | arithmetricexpr | NULL
datatype :: = B | O | X | E | A | ED | AD | SB | T (identifier)
valueexpr :: = concatexpr | NULL
lengthexpr :: = arithmeticexpr | NULL
connective :: = .LE. | .LT. | .GT. | .GE. | .EQ. | .NE.
concatexpr :: = value | concatexpr value
value :: = literal | arithmeticexpr
arithmeticexpr :: = primary | arithmeticexpr operator primary
primary :: = identifier | L(identifier) | V(identifier) |
INTEGER
operator :: = + | - | * | /
literal :: = literaltype "string"
以下を形成してください: = 規則| フォームは以下を統治します: = inputstream outputstreamをラベルしてください。 以下をラベルしてください: = 整数| NULL inputstream:、: = 用語| NULLは以下を呼びます: = 用語| 用語、用語は以下をoutputstreamします: = :用語| NULL用語:、: = 識別子| 識別子記述子| 記述子| 比較器識別子:、: = <アルファは0-3 英数>記述子で従いました:、: = (replicationexpr、データ型式、valueexpr、lengthexprコントロール) 比較器:、: = (concatexprの接続的なconcatexprコントロール) | (識別子<=concatexprコントロール) replicationexpr:、: = # | arithmetricexpr| NULLデータ型式:、: = B| O| X| E| A| エド| 西暦| SB| T(識別子)は以下をvalueexprします: = concatexpr| NULL lengthexpr:、: = arithmeticexpr| NULL接続的:、: = .LE。 | .LT. | .GT。 | .GE。 | .EQ。 | .NE concatexpr:、: = 値| concatexpr値は以下を評価します: = 文字通り| arithmeticexpr arithmeticexpr:、: = 予備選挙| arithmeticexprのオペレータの第一の予備選挙:、: = 識別子| L(識別子)| V(識別子)| INTEGERオペレータ:、: = + | - | * | /文字通り:、: = literaltype「ストリング」
literaltype :: = B | 0 | X | E | A | ED | AD | SB
string :: = <from 0 to 256 chars>
control :: = :options | NULL
options :: = SFUR (arithmeticexpr) | SFUR (arithmeticexpr),
SFUR (arithmeticexpr)
SFUR :: = S | F | U | SR | FR | UR
literaltype:、: = B| 0 | X| E| A| エド| 西暦| SBは以下を結びます: = <0〜256雑用>は以下を制御します: = :オプション| NULLは以下をゆだねます: = SFUR(arithmeticexpr)| SFUR(arithmeticexpr)、SFUR(arithmeticexpr)SFUR:、: = S| F| U| SR| フラン| ウル
[Page 2]
Data Reconfiguration Service RFC 194
[2ページ] データ再構成サービスRFC194
III. THE FORM INTERPRETER
III。 フォームインタプリタ
Interpreter Overview
インタプリタ概観
The interpreter is a simple minded machine having the virtue of
helping the compiler writer by providing a rather powerful instruction
set for hard-to-compile operations. Figure 1 shows the machine
configuration:
インタプリタはコンパイルしにくい操作にかなり強力な命令セットを提供することによってコンパイラ作家を助ける美徳がある簡単な気にされたマシンです。 図1は機械コンフィギュレーションを示しています:
+-------------+ +--------------+
| inputstream | | outputstream |
+-------------+ +--------------+
/\ /
\ /
\ /
\ \/
+-----------------------+
| CPU |
+-----------------------+
| /\
| |
| |
\/ |
+-----------------------+
Storage: | Instruction |
| Sequence |
+-----------------------+
| Label Table |
+-----------------------+
| Literal/Identifier |
| Pool |
+-----------------------+
| Variable length |
| string area |
+-----------------------+
+-------------+ +--------------+ | inputstream| | outputstream| +-------------+ +--------------+ /\ / \ / \ / \ \/ +-----------------------+ | CPU| +-----------------------+ | /\ | | | | \/ | +-----------------------+ 格納: | 指示| | 系列| +-----------------------+ | ラベルテーブル| +-----------------------+ | 文字通りの/識別子| | プール| +-----------------------+ | 可変長| | ストリング領域| +-----------------------+
Fig. 1. Form Interpreter
図1。 フォームインタプリタ
[Page 3]
Data Reconfiguration Service RFC 194
[3ページ] データ再構成サービスRFC194
The CPU is a box full of miscellaneous parts, the most important
being the Arithmetic Logic Unit and the instruction decoding unit. The
CPU also maintains a collection of state registers to keep track of what
it is doing. Figure 2 shows the rough layout.
CPUは種々雑多な部分でいっぱいの箱です、Arithmetic Logic Unitと最も重要なことが指示解読ユニットであり。 また、CPUは、それがしていることの動向をおさえるために州のレジスタの収集を維持します。 図2は荒いレイアウトを示しています。
+-----------------+ +---------------+
| Instruction | | Instruction |
| Counter | | Register |
+-----------------+ +---------------+
|
|
V
+----------------+
| Operation Code |
| Decoding |
Run Time Stack +----------------+
+------------------+ / | \
| Operands | / | \
+------------------+ \/ V \/
| | +-----------------+
+------------------+ / Instruction \
| | | Interpreter |
+------------------+ | Routines |
| | \ /
+------------------+ +---------------+
| | | /\
+------------------+ | |
| | | |
+------------------+ V |
| | +---------------+
+------------------+ <------------- | Arithmetic |
| | -------------> | Logic Unit |
+------------------+ +---------------+
| |
+------------------+
| |
+------------------+
+-----------------+ +---------------+ | 指示| | 指示| | カウンタ| | レジスタ| +-----------------+ +---------------+ | | +に対して----------------+ | 命令コード| | 解読します。| ランタイムスタック+----------------+ +------------------+ / | \ | オペランド| / | \ +------------------+ \/V\/| | +-----------------+ +------------------+/指示\| | | インタプリタ| +------------------+ | ルーチン| | | \ / +------------------+ +---------------+ | | | /\ +------------------+ | | | | | | +------------------+ V| | | +---------------+ +------------------+ <。------------- | 演算| | | ------------->| 論理演算装置| +------------------+ +---------------+ | | +------------------+ | | +------------------+
+------------------+ +------------------+ |Initial Input Ptr.| | Output pointer | +------------------+ +------------------+
+------------------+ +------------------+ |入力Ptrに頭文字をつけてください、|| 出力ポインタ| +------------------+ +------------------+
+------------------+ +------------------+ |Current Input Ptr.| | True/False Flag | +------------------+ +------------------+
+------------------+ +------------------+ |電流がPtrを入力した、|| 本当の、または、偽の旗| +------------------+ +------------------+
[Page 4]
Data Reconfiguration Service RFC 194
[4ページ] データ再構成サービスRFC194
Fig. 2. The Central Processor
図2。 中央のプロセッサ
The CPU is a stack machine driven by a Polish postfix instruction
sequence. Operands placed on the Run Time Stack are used for arithmetic
expression evaluation and for parameter passing between the interpreter
and the built-in functions.
The Current Input Pointer and the Output Pointer keep track of the
two data streams. Two input pointers are needed because of the backup
requirement in the event of rule failure. All of these pointers are bit
pointers into the two streams.
Various implementations of the Run Time Stack are independent of
the interpretation of the DRS machine's instruction set. It is
suggested that the stack will contain instruction operands from the
instruction stream.
The format of a compiled instruction sequence for a form is shown
in Fig. 3.
CPUはポーランドのポストフィックス指示系列によって動かされたスタック・マシンです。 Run Time Stackに関して課されるオペランドは算術式評価とインタプリタと組込み関数の間のパラメタ通過に使用されます。 Current Input PointerとOutput Pointerは2つのデータ・ストリームの動向をおさえます。2個の入力ポインタが規則失敗の場合、バックアップ要件のために必要です。 これらのポインタのすべてが2つの流れの中への噛み付いているポインタです。Run Time Stackの様々な実現はDRSマシンの命令セットの解釈から独立しています。 スタックが指示の流れからの指示オペランドを含むことが提案されます。 フォームのためのコンパイルされた指示系列の書式は図3に示されます。
16 bits
+--------/\---------+
/ \
16ビット+--------/\---------+ / \
+---------------------+
| length n in bytes |
+-- +---------------------+
| | |
| | compiled |
| | 16-bit |
n < | instructions |
| | |
| | |
| | |
+-- +---------------------+
+---------------------+ | バイトで表現される長さn| +-- +---------------------+ | | | | | コンパイルされます。| | | 16ビットです。| n<。| 指示| | | | | | | | | | +-- +---------------------+
Fig. 3. Compiled Instruction Sequence Format
図3。 コンパイルされた指示系列形式
[Page 5]
Data Reconfiguration Service RFC 194
[5ページ] データ再構成サービスRFC194
The format of the compiled Label Table is shown in Fig. 4.
コンパイルされたLabel Tableの書式は図4に示されます。
16 bits
+-----/\-------+
/ \
16ビット+-----/\-------+ / \
+-----------------+
| length n |
| in bytes |
+-- +------------------+-----------------+
| | numeric value of | byte offset |
| | statement number | in inst. seq. |
| +------------------+-----------------+
| | : : |
n < | : : |
| | : : |
| | |
| | |
| | |
+-- +------------------------------------+
+-----------------+ | 長さn| | バイトで| +-- +------------------+-----------------+ | | 数値| バイトは相殺されました。| | | 文番号| inst. seqで。 | | +------------------+-----------------+ | | : : | n<。| : : | | | : : | | | | | | | | | | +-- +------------------------------------+
\_________________ _________________/
V
32 bits
\_________________ _________________32ビットに対する/
Fig. 4. Compiled Label Table
図4。 コンパイルされたラベルテーブル
[Page 6]
Data Reconfiguration Service RFC 194
[6ページ] データ再構成サービスRFC194
Literals and Identifiers are compiled as shown in fig. 5.
誤字誤植とIdentifiersは図5に示されるようにコンパイルされます。
2 2
+----/\----+ +----/\----+
/ \ / \
2 2 +----/\----+ +----/\----+ / \ / \
+-------------+--------------+
1 1 | length n | length n |
___/\____ ___/\____ | in bytes | in bytes |
+---------+----------+-------------+--------------+
/ | |//////////| | |
| | Type |//////////| bit length | byte offset |
| | |//////////| | |
| +---------+----------+-------------+--------------+
5*n < | : |
| | : |
| | : | Identifiers
| | |
\ | |
+-------------------------------------------------+
/ | |
| | literals are |
| | byte-aligned | Literals
m < | |
| | |
| | |
\ +-------------------------------------------------+
+-------------+--------------+ 1 1 | 長さn| 長さn| ___/\____ ___/\____ | バイトで| バイトで| +---------+----------+-------------+--------------+ / | |//////////| | | | | タイプ|//////////| 噛み付いている長さ| バイトは相殺されました。| | | |//////////| | | | +---------+----------+-------------+--------------+ 5*n<。| : | | | : | | | : | 識別子| | | \ | | +-------------------------------------------------+ / | | | | 誤字誤植はそうです。| | | バイトで、並べられます。| 誤字誤植m<。| | | | | | | | \ +-------------------------------------------------+
Legend:
伝説:
Type 0 = undefined
1 = B (binary)
2 = 0 (octal)
3 = X (hexadecimal)
4 = E (EBCDIC)
5 = A (ASCII)
6 = ED (EBCDIC encoded decimal)
7 = AD (ASCII encoded decimal)
8 = SB (signed binary, two's complement)
AD(ASCIIは小数をコード化した)8=エド(EBCDICは小数をコード化した)X(16進)4=E1未定義の=B(2進の)2 = 0(8進)0=3=(EBCDIC)5=(ASCII)6=7=SBをタイプしてください。(サインされたバイナリー、2の補数)
Fig. 5. Compiled Literals and Identifiers
図5。 コンパイルされた誤字誤植と識別子
[Page 7]
Data Reconfiguration Service RFC 194
[7ページ] データ再構成サービスRFC194
Types B, 0, X, AD, ED, and SB point to 32-bit word- aligned data shown below.
タイプB、0、X、AD、ED、およびSBは以下に示された32ビットの単語並べられたデータを示します。
+---+---+-----+-------+ +-------------------+ word-aligned, | T |///| L | ---+-----> | | 32-bit right- +---+---+-----+-------+ +-------------------+ justified
+---+---+-----+-------+ +-------------------+は単語で並びました。| T|///| L| ---+----->|、| 32ビットの権利+---+---+-----+-------+ +-------------------正当化された+
Types E and A point to byte-aligned symbol streams
as shown below.
タイプEとAは以下に示すようにバイトで並べられたシンボルの流れを示します。
byte-aligned, L <= 256
+---+---+-----+-------+ +------------------------+
| T |///| L | ---+-----> | |
+---+---+-----+-------+ +------------------------+
バイトで並べられたL<は256+と等しいです。---+---+-----+-------+ +------------------------+ | T|///| L| ---+----->|、| +---+---+-----+-------+ +------------------------+
[Page 8]
Data Reconfiguration Service RFC 194
[8ページ] データ再構成サービスRFC194
Instruction Format
命令形式
Since literals and identifiers will be stored in the same data
area, more than 256 literals plus identifiers might be encountered so
more than 8 bits are needed to reference literal/id pool. Furthermore,
such references must be distinguished from operators in the instruction
stream, so a 16-bit instruction will be used, as shown below.
誤字誤植と識別子が同じデータ領域に格納されるので、256以上の誤字誤植と識別子が遭遇するかもしれないので、8ビット以上が参照文字通りの/イドプールに必要です。 16ビットの指示はその上、オペレータと指示の流れでそのような参照を区別しなければならないので、使用されるでしょう、以下に示すように。
+--------+------------------------+
| 4 | 12 |
+--------+------------------------+
|
/
/
/
|
V
LD = 0 literal or identifier reference (12-bit positive integer)
IC = 1 12-bit two's complement integer constant
OP = 2 operator
AD = 3 address (12-bit positive integer)
ARB = 4 indefinite replication factor
NULL = 5 missing attribute of term
+--------+------------------------+ | 4 | 12 | +--------+------------------------+ | / / / | V LD=0文字通りか識別子参照(12ビットの正の整数)IC=1の12ビットの2の補数整定数OPが等しい、2オペレータ、AD、= 4の無期3アドレス(12ビットの正の整数)ARB=模写要素NULLは用語の5のなくなった属性と等しいです。
The operation code decoder picks up types 0, 1, 3, 4,
and 5 and deposits them on top of the stack (TOS). LD is an
index into the literal/identifier table, and AD is an index
into the instruction sequence.
命令コードデコーダはスタック(TOS)の上でタイプ0、1、3、4、および5と預金にそれらを選びます。 LDは文字通りの/識別子テーブルへのインデックスです、そして、ADは指示系列へのインデックスです。
The decoder examines OP elements further:
デコーダはさらにOP要素を調べます:
4 4 8
+--------+--------+----------------+
| 0010 | |////////////////|
+--------+--------+----------------+
OP |
+----------> 0 = binary operator
1 = unary operator
2 = special operator
4 4 8 +--------+--------+----------------+ | 0010 | |////////////////| +--------+--------+----------------+ オプアート| +---------->0=2項演算子1=単項演算子2は特別なオペレータと等しいです。
[Page 9]
Data Reconfiguration Service RFC 194
[9ページ] データ再構成サービスRFC194
Binary Operators (*)
2項演算子(*)
Let the TOS contain y and the next level, x. The binary operators
compute x <bop> y, popping both x, y from stack, and put the result
back on top of the stack.
TOSにyと次のレベル、xを含ませてください。 2項演算子はx<ボップ>yを計算して、飛び出しの両方がxです、スタックからのy、スタックの上で結果を戻してください。
+---+ <-- TOS +-----+ <-- TOS
| y | | x-y |
e.g. x-y => +---+ ===> +-----+
| x | |/////|
+---+ +-----+
+---+<--TOS+-----+<--TOS| y| | x-y| 例えばx-yは>+と等しいです。---+ ===>+-----+ | x| |/////| +---+ +-----+
Binary Operator Encoding
2項演算子コード化
4 4 4 4
+--------+--------+--------+--------+
| 0010 | 0000 | |////////|
+--------+--------+--------+--------+
|
+--------------------------+
|
V
0 = integer +
1 = integer -
2 = integer x
3 = integer : (or /), no remainder
4 = concatenate ||
4 4 4 4 +--------+--------+--------+--------+ | 0010 | 0000 | |////////| +--------+--------+--------+--------+ | +--------------------------+ | V0は整数+1=整数と等しいです--2=整数x3は整数と等しいです: (または、/), 4=が連結しない残り全く||
All binary operations except concatenate expect the top
two elements on the stack to describe type B, 0, X, or SB. The
result is always a 32-bit type B element. The concatenate
operator fails unless both types are identical. For example:
すべてのブール演算が除かれる、連結、説明するスタックのトップ2の要素がB、0、X、またはSBをタイプすると予想してください。 いつも結果は32ビットのタイプB要素です。 両方のタイプが同じでない場合、オペレータやり損ないを連結してください。 例えば:
-------
(*) As suggested above, the stack really contains instruction
operands that describe data; for convenience in illustrations
the data rather than their descriptors are shown on the stack.
------- (*) 上に示されるように、スタックは本当にデータについて説明する指示オペランドを含んでいます。 イラストにおける便利において、それらの記述子よりむしろデータはスタックの上に示されます。
[Page 10]
Data Reconfiguration Service RFC 194
[10ページ] データ再構成サービスRFC194
type L value T L V
+------+------+------+ +------+------+------+
TOS -> | B | 32 | 4 | | B | 32 | 12 | <- TOS
+------+------+------+ ==> +------+------+------+
| B | 8 | 16 | |//////|//////|//////|
+------+------+------+ +------+------+------+
Before-operation after-operation
タイプLはT L V+を評価します。------+------+------+ +------+------+------+ TOS->。| B| 32 | 4 | | B| 32 | 12 | <。 TOS+------+------+------+ =>+------+------+------+ | B| 8 | 16 | |//////|//////|//////| +------+------+------+ +------+------+------+、操作の前、操作
+------+------+------+ +------+------+------+
TOS -> | A | 2 | DE | | A | 5 |ABCDE | <- TOS
+------+------+------+ ==> +------+------+------+
| A | 3 | ABC | |//////|//////|//////|
+------+------+------+ +------+------+------+
Before || operation after || operation
+------+------+------+ +------+------+------+ TOS->。| A| 2 | DE| | A| 5 |ABCDE| <。 TOS+------+------+------+ =>+------+------+------+ | A| 3 | ABC| |//////|//////|//////| +------+------+------+ +------+------+------+ 以前|| 後の操作|| 操作
No binary operator has any effect on the TRUE/FALSE flag.
どんな2項演算子もTRUE/FALSE旗にどんな影響も与えません。
Unary Operators
単項演算子
4 4 4 4
+--------+--------+--------+--------+
| 0010 | 0001 | | |
+--------+--------+--------+--------+
| |
+--------------+ |
| |
V |
0 = integer minus V
1 = load identifier 0 = evaluated contents
(after dec - binary
conversion)
1 = length field
2 = type field
2 = Label Table Reference
4 4 4 4 +--------+--------+--------+--------+ | 0010 | 0001 | | | +--------+--------+--------+--------+ | | +--------------+ | | | V| 0 = 整数マイナスV1=負荷識別子0=はタイプ分野2=ラベル1つのコンテンツ(DEC社--2進の変換の後の)=長さ分野2=Table Referenceを評価しました。
[Page 11]
Data Reconfiguration Service RFC 194
[11ページ] データ再構成サービスRFC194
For the unary minus operator the data described by the top of the
stack is replaced with its 2's complement. The form fails if the TOS
type is not SB, B, 0, or X.
The Load identifier expects the TOS to describe an index into the
literal/identifier pool (that is, an LD instruction) . The TOS
described data is replaced by 32-bit type B values. The operation fails
if the contents cannot be converted from encoded decimal to binary. B,
0, and X types are treated as unsigned integers, SB is treated as 2's
complement.
The Label Table Reference operator expects a 32-bit type B value
described by TOS and searches for this label in the label Table. If
found, the TOS described data is replaced by the relative address in the
instruction sequence of the label (in the form of an AD instruction).
If not found, the form fails. No Unary operator has any effect on the
TRUE/FALSE flag.
単項マイナスオペレータにとって、スタックの先端によって説明されたデータを2補数に取り替えます。 フォームはTOSタイプがSBでないなら失敗して、X. B、0、またはLoad識別子が、TOSが文字通りの/識別子プール(すなわち、LD指示)の中にインデックスについて説明すると予想します。TOSはデータについて説明しました。32ビット型のB値に取り替えます。 コード化された小数からバイナリーまでコンテンツを変換できないなら、操作は失敗します。 B、0、およびXタイプは符号のない整数として扱われて、SBは2補数として扱われます。 Label Table Referenceオペレータは、TOSによって説明された32ビットのタイプB価値を予想して、ラベルTableでこのラベルを捜し求めます。 見つけられるなら、TOSはデータについて説明しました。ラベル(AD指示の形の)の指示系列の相対アドレスで、取り替えます。 見つけられないなら、フォームは失敗します。 どんなUnaryオペレータもTRUE/FALSE旗にどんな影響も与えません。
Special Operators
特別なオペレータ
4 4 4 4
+--------+--------+--------+--------+
| 0010 | 0010 | | |
+--------+--------+--------+--------+
| |
+-----------------------+ /
| /
V /
0 = store TOS |
1 = return V
2 = branch 0 = true, 1 = false, 2 = unconditional
4 4 4 4 +--------+--------+--------+--------+ | 0010 | 0010 | | | +--------+--------+--------+--------+ | | +-----------------------+ / | /V/0は店TOSと等しいです。| 1人の=リターンV2=ブランチ0が1つの本当の=偽と2=無条件の状態で等しいです。
3 = compare 0 = .EQ. 2 = .LE. 4 = .GE.
1 = .NE. 3 = .LT. 5 = .GT.
3 = 0=.EQを比較してください。 2は.LEと等しいです。 4は.GEと等しいです。 1は.NEと等しいです。 3 =.LT. 5は.GTと等しいです。
4 = move input ptr 0 = store current into initial
1 = store initial into current
4 1つの初期の=店への0=店電流が電流に頭文字をつける=移動入力ptr
5 = input call 0 = no compare
1 = compare
5 = 入力呼び出し0=ノー、は=が比較する1を比較します。
6 = output call
=が出力した6は呼びます。
[Page 12]
Data Reconfiguration Service RFC 194
[12ページ] データ再構成サービスRFC194
Store TOS
TOSを格納してください。
The TOS describes an index into the ID table and the next lower
element in the stack describes a value to be stored. After execution,
both elements are popped off the stack.
TOSはIDテーブルにインデックスについて説明します、そして、スタックの次の低級要素は格納されるために値について説明します。 実行の後に、両方の要素はスタックで飛び出します。
Return
リターン
The TOS describes a value to be returned to the routine which
initiated the FORM MACHINE. The actual mechanism will be implementation
dependent, but the FORM MACHINE will relin- quish control after this
instruction completes execution.
TOSはFORM MACHINEを開始したルーチンに返される値について説明します。 この指示が実行を終了した後に実際のメカニズムはしかし、扶養家族、FORM MACHINEがそうする実現がrelin- quishコントロールであったならそうするでしょう。
Branch
支店
The TOS describes an index into the instruction sequence to be used
as the new instruction counter (IC) if the branch conditions are
satisfied. The branch instruction checks the state of the TRUE/FALSE
flag register and either increments the IC by 1 or replaces it with the
TOS described element. In any case, the TOS is popped.
ブランチ状態が満たされているなら、TOSは、新しい命令カウンタ(IC)として使用されるために指示系列にインデックスについて説明します。 分岐命令は、TRUE/FALSEフラグ・レジスタの状態をチェックして、ICを1つ増加するか、またはそれをTOSに取り替えます。要素について説明しました。 どのような場合でも、TOSは飛び出します。
Compare
比較してください。
The compare operator takes the two elements described by the two
top stack entries and compares them (.EQ.,.LT.,etc.). If n is at the
top of the stack, and m is just below, then m.xx.n is performed, and the
TRUE/False flag is set accordingly. For .xx. = .EQ. or .NE. we must
have identical type, length, and content for equality to hold.
The other boolean comparators will not be attempted if types are
different (i.e., form fails), but for same types, B, 0, X cause binary-
justified compares, and A, E, AD, ED cause left-justified string
compares with the shorter string padded with blanks.
オペレータのために2つの要素が2つの先頭のスタックエントリーで説明した撮影を比較して、それら(.EQ.、.LT.など)を比較します。 nがスタックの先端にあって、mがすぐ以下にあるなら、m.xx.nは実行されます、そして、TRUE/偽の旗はそれに従って、設定されます。 .xxのために。 = .EQ.NE私たちには、平等が保持する同じタイプ、長さ、および内容がなければなりません。 タイプが異なると(すなわち、フォームは失敗します)試みられるのではなく、同じタイプのための他の論理演算子比較器、B、0、バイナリーが正当化したX原因は比較されます、そして、A(E、EDが左で正当なストリングを引き起こすAD)は空白で水増しされるより脆いストリングと比較されます。
Move Input Pointer
入力ポインタを動かしてください。
This operator (no operands) replaces the Current Input Pointer with
the Initial Input Pointer (back-up), or the Initial Input Pointer with
the current one (entry to rule).
現在のもの(統治するエントリー)でこのオペレータ(オペランドがない)はCurrent Input PointerをInitial Input Pointer(バックアップ)、またはInitial Input Pointerに取り替えます。
Input Call
入力呼び出し
This is the most complex operator thus far encountered. It requires
four operands from the run-time stack:
これはこれまでのところ遭遇した中で最も複雑なオペレータです。 それはランタイムスタックから4つのオペランドを必要とします:
[Page 13]
Data Reconfiguration Service RFC 194
[13ページ] データ再構成サービスRFC194
TOS +----------------------------+
| binary or null | length to find
+----------------------------+
| LD to literal or null | value (literal)
+----------------------------+
| binary code | input data type
+----------------------------+
| binary, arbitrary, or null | replication count
+----------------------------+
TOS+----------------------------+ | 2進である、またはヌルです。| +であることがわかる長さ----------------------------+ | 文字通りかヌルへのLD| (文字通りの)+を評価してください。----------------------------+ | 2進コード| 入力データ型+----------------------------+ | 2進、任意であるか、またはヌルです。| 模写カウント+----------------------------+
The input call operator can be invoked with the "no compare" flag
set, in which case the value expression parameter is ignored and only
the input type and length expressions are used. In this case, the input
routine tries to find in the input stream as many characters of the
required type (bits, digits, etc.) as needed to fill the length
expression requirement. If successful, the TRUE/FALSE flag is set TRUE,
the stack is popped to remove the input parameters, and the string
obtained is described by the TOS. If the input stream cannot be matched
then the parameters are popped off the stack, and the TRUE/FALSE flag is
set FALSE.
「いいえは比較する」という旗のセットで入力呼び出しオペレータを呼び出すことができます、そして、その場合、値の表現パラメタは無視されます、そして、入力タイプと長さの表現だけが使用されています。 この場合、入力ルーチンは入力ストリームで必要なタイプ(ビット、ケタなど)の長さの表現要件をいっぱいにするのが必要であるのと同じくらい多くのキャラクタを見つけようとします。 うまくいくなら、TRUE/FALSE旗はセットTRUEです、そして、スタックは入力パラメタを取り除くために飛び出します、そして、入手されたストリングはTOSによって説明されます。 入力ストリームを合わせることができないなら、パラメタはスタックで飛び出します、そして、TRUE/FALSE旗はセットFALSEです。
If the "compare" flag is set, the input stream must be searched for
the value expression. However, we must take some care here to be sure
we know what to look for. There are several cases:
「比較してください」という旗が設定されるなら、入力ストリームは値の表現を捜さなければなりません。 しかしながら、私たちは、私たちが、何を探したらよいかを知っているのを確信しているようにここでいくつか注意しなければなりません。 数個のケースがあります:
a) The length expression parameter is greater than the
length of the value expression but the type of input de-
sired is the same as the value expression type. For B, 0
and X types, right-justify value expression in length-
expression field, sign bit is extended left if type BS.
If type A, E, AD, or ED pad on the right with blanks. b) Same as
a) but length is too small. B, 0, and X type strings
are truncated on the left. A, E, AD and ED are truncated
on the right. c) The type of the value expression and the type
parameter
differ. This case is deferred for discussion and pre-
sently is considered an error causing form failure.
a) 長さの表現パラメタは値の表現の長さにもかかわらず、反-作られた入力のタイプが値の表現タイプと同じであるというよりも大きいです。 長さの表現分野でのBと0とXタイプ、右詰め値の表現において、符号ビットはタイプBSであるなら左で広げられます。 タイプのA、E、AD、またはEDが右で空白b)でそっと歩くなら a)と同じことにもかかわらず、長さはわずか過ぎます。 B、0、およびXタイプストリングは左で先端を切られます。 A、E、AD、およびEDが右で先端を切られる、c) 値の表現のタイプと型引数は異なります。 本件は議論のために延期されます、そして、プレ送付はフォーム失敗を引き起こす誤りであると考えられます。
If the input string matches, then the TRUE/FALSE flag is set true,
the parameters are popped from the stack, and the resulting string is
described by the TOS. Otherwise, the FALSE flag is set and the
parameters are popped.
入力ストリングが合っているなら、TRUE/FALSE旗は本当に設定されます、そして、パラメタはスタックから飛び出します、そして、結果として起こるストリングはTOSによって説明されます。 さもなければ、FALSE旗は設定されます、そして、パラメタは飛び出します。
When a successful match is found the input subroutine always
advances the Current Input Pointer by the appropriate amount. Since we
are dealing at the bit level this pointer must be maintained as a bit
pointer!
うまくいっているマッチが見つけられるとき、適切な量に応じて、入力サブルーチンはいつもCurrent Input Pointerを進めます。 私たちが噛み付いているレベルと取引しているので、しばらくポインタとしてこのポインタを維持しなければなりません!
[Page 14]
Data Reconfiguration Service RFC 194
[14ページ] データ再構成サービスRFC194
Output Call
出力呼び出し
This routine utilizes the same parameters as the input call, but
operates on the output stream. The TRUE/FALSE flag is not distributed
by this operator. As for input, there are four parameters on top of the
stack, the length expression value, the value expression value, the
desired output type, and the replication expression value. When there
is a mis- match between the output type and the value expression type, a
conversion must take place. The value expression is trans- formed into
the desired output type and fitted into the field length specified by
the length expression.
This routine utilizes the same parameters as the input call, but operates on the output stream. The TRUE/FALSE flag is not distributed by this operator. As for input, there are four parameters on top of the stack, the length expression value, the value expression value, the desired output type, and the replication expression value. When there is a mis- match between the output type and the value expression type, a conversion must take place. The value expression is trans- formed into the desired output type and fitted into the field length specified by the length expression.
Truncation and Padding Rules
Truncation and Padding Rules
a) Character -> character (A,E,AD,ED -> A,E,AD,ED) conversion
is left-justified and truncated or padded with blanks
on the right. b) Character -> numeric and numeric -> character
conversion is
right-justified and truncated or padded on the left with
zeros. Beware! Two's complement numbers may be bollixed
by this. c) Numeric -> character conversion is right-justified and
left padded with blanks or left-truncated. As for the unary
operators, a numeric bit-string is treated as unsigned, except SB which
is treated as two's complement. Thus we have:
a) Character -> character (A,E,AD,ED -> A,E,AD,ED) conversion is left-justified and truncated or padded with blanks on the right. b) Character -> numeric and numeric -> character conversion is right-justified and truncated or padded on the left with zeros. Beware! Two's complement numbers may be bollixed by this. c) Numeric -> character conversion is right-justified and left padded with blanks or left-truncated. As for the unary operators, a numeric bit-string is treated as unsigned, except SB which is treated as two's complement. Thus we have:
(1,ED,X"FF",3) = E'255'
(1,ED,X"100",3) = E'256'
but (1,ED,SB"10000000",4) = E'-256'
(1,ED,X"FF",3) = E'255' (1,ED,X"100",3) = E'256' but (1,ED,SB"10000000",4) = E'-256'
If the output routine is able to perform the desired action, it
advances the Output Stream Pointer, and pops all parameters from the
run-time stack.
If the output routine is able to perform the desired action, it advances the Output Stream Pointer, and pops all parameters from the run-time stack.
[Page 15]
Data Reconfiguration Service RFC 194
[Page 15] Data Reconfiguration Service RFC 194
V. INSTRUCTION SET
V. INSTRUCTION SET
it/id ref LD <num> Literal or identifier
reference -> TOS
int const IC <num> small 2's comp. integer
constant -> TOS
address AD <num> Address -> TOS
null parameter NULL missing term attribute
add ADD TOS = x,y x + y -> TOS
subtract SUB TOS = x,y x - y -> TOS
multiply MUL TOS = x,y x * y -> TOS
divide DIV TOS = x,y x/y -> TOS
concatenate CON TOS = x,y x||y -> TOS
unary minus UNIN TOS = x -x -> TOS
load id value LIV TOS = LD x V(LD x) -> TOS
load id length LIL TOS = LD x V(LD x) -> TOS
load id type LIT TOS = LD x V(LD x) -> TOS
look up label LVL TOS = x AD x -> TOS
sto STO TOS = x,y y -> x
return RET TOS = x return to
caller with x
branch true BT TOS = AD x AD x -> Instr.
counter
branch false BF TOS = AD x AD x -> Instr.
counter
branch BU TOS = AD x AD x -> Instr.
counter
compare equal CEQ TOS = x,y (y.EQ.x) ->
TRUE/FALSE
flag
compare not equal CNE TOS = x,y (y.NE.x) -> T/FF
compare <= CLE TOS = x,y (y.LE.x) -> T/FF
call output OUT TOS = r,t,v,l (r,t,v,l) -> output
call input IN ( INC = compare TOS = r,t,v,l (r,t,v,l) -> TOS
INN = no compare )
current -> initial SCIP CIP -> IIP (store current input
ptr - initial IP)
initial -> current SICP IIP -> CIP (store initial input
ptr - CIP)
it/id ref LD <num> Literal or identifier reference -> TOS int const IC <num> small 2's comp. integer constant -> TOS address AD <num> Address -> TOS null parameter NULL missing term attribute add ADD TOS = x,y x + y -> TOS subtract SUB TOS = x,y x - y -> TOS multiply MUL TOS = x,y x * y -> TOS divide DIV TOS = x,y x/y -> TOS concatenate CON TOS = x,y x||y -> TOS unary minus UNIN TOS = x -x -> TOS load id value LIV TOS = LD x V(LD x) -> TOS load id length LIL TOS = LD x V(LD x) -> TOS load id type LIT TOS = LD x V(LD x) -> TOS look up label LVL TOS = x AD x -> TOS sto STO TOS = x,y y -> x return RET TOS = x return to caller with x branch true BT TOS = AD x AD x -> Instr. counter branch false BF TOS = AD x AD x -> Instr. counter branch BU TOS = AD x AD x -> Instr. counter compare equal CEQ TOS = x,y (y.EQ.x) -> TRUE/FALSE flag compare not equal CNE TOS = x,y (y.NE.x) -> T/FF compare <= CLE TOS = x,y (y.LE.x) -> T/FF call output OUT TOS = r,t,v,l (r,t,v,l) -> output call input IN ( INC = compare TOS = r,t,v,l (r,t,v,l) -> TOS INN = no compare ) current -> initial SCIP CIP -> IIP (store current input ptr - initial IP) initial -> current SICP IIP -> CIP (store initial input ptr - CIP)
[Page 16]
Data Reconfiguration Service RFC 194
[Page 16] Data Reconfiguration Service RFC 194
VI. EXAMPLE COMPILATION
VI. EXAMPLE COMPILATION
FORM SOURCE GENERATED POLISH INSTRUCTION SEQUENCE
FORM SOURCE GENERATED POLISH INSTRUCTION SEQUENCE
ADDR. INSTR. COMMENTS
(NUMB.<=.1); 0 SICP RULE PRELUDE
1 IC 1
2 LD 0 REFERENCE TO NUMB
3 STO STORE IN NUMB
4 SCIP RULE POSTLUDE
1 CC(,E,,1:FR(99)), 5 SICP RULE PRELUDE
6 NULL NO REPLICATION EXPRESSION
7 IC 4 TYPE EBCDIC
8 NULL NO VALUE EXPRESSION
9 IC 1 LENGTH
10 INN INPUT CALL WITH NO COMPARE
11 AD 15
12 BT SKIP RETURN IF INN SUCCEEDS
13 IC 99 RETURN CODE
14 RET RETURN TO CALLER IF FAILED
15 LD 1 REFERENCE TO CC
16 STO STORE INPUT DATA IN CC
LINE(,E,,121: 17 NULL NO REPLICATION EXPRESSION
FR(99)), 18 IC 4 TYPE IS EBCDIC
19 NULL NO VALUE EXPRESSION
20 IC 121 LENGTH
21 INN INPUT WITH NO COMPARE
22 AD 26
23 BT SKIP RETURN IF OK
24 IC 98 RETURN CODE
25 RET RETURN TO CALLER IF FAILED
26 LD 2 REFERENCE TO LINE
27 STO STORE INPUT IN LINE
:CC, 28 SCIP SUCCESSFUL INPUT
29 NULL NO REPLICATION FACTOR
30 LD 1 REFERENCE TO CC
31 LIT TYPE OF CC
32 LD 1 REFERENCE TO VALUE OF CC
33 LD 1 CC AGAIN
34 LIL LENGTH OF CC
35 OUT OUTPUT CC
(,ED,NUMB,2), 36 NULL NO REPLICATION
37 IC 6 TYPE IS ED
38 LD 0 REFERENCE TO VALUE OF NUMB
39 IC 2 LENGTH OF OUTPUT FIELD
40 OUT OUTPUT NUMB AS EBCDIC DEC.
(,E,E".",1), 41 NULL NO REPLICATION
42 IC 4 TYPE IS EBCDIC
ADDR. INSTR. COMMENTS (NUMB.<=.1); 0 SICP RULE PRELUDE 1 IC 1 2 LD 0 REFERENCE TO NUMB 3 STO STORE IN NUMB 4 SCIP RULE POSTLUDE 1 CC(,E,,1:FR(99)), 5 SICP RULE PRELUDE 6 NULL NO REPLICATION EXPRESSION 7 IC 4 TYPE EBCDIC 8 NULL NO VALUE EXPRESSION 9 IC 1 LENGTH 10 INN INPUT CALL WITH NO COMPARE 11 AD 15 12 BT SKIP RETURN IF INN SUCCEEDS 13 IC 99 RETURN CODE 14 RET RETURN TO CALLER IF FAILED 15 LD 1 REFERENCE TO CC 16 STO STORE INPUT DATA IN CC LINE(,E,,121: 17 NULL NO REPLICATION EXPRESSION FR(99)), 18 IC 4 TYPE IS EBCDIC 19 NULL NO VALUE EXPRESSION 20 IC 121 LENGTH 21 INN INPUT WITH NO COMPARE 22 AD 26 23 BT SKIP RETURN IF OK 24 IC 98 RETURN CODE 25 RET RETURN TO CALLER IF FAILED 26 LD 2 REFERENCE TO LINE 27 STO STORE INPUT IN LINE :CC, 28 SCIP SUCCESSFUL INPUT 29 NULL NO REPLICATION FACTOR 30 LD 1 REFERENCE TO CC 31 LIT TYPE OF CC 32 LD 1 REFERENCE TO VALUE OF CC 33 LD 1 CC AGAIN 34 LIL LENGTH OF CC 35 OUT OUTPUT CC (,ED,NUMB,2), 36 NULL NO REPLICATION 37 IC 6 TYPE IS ED 38 LD 0 REFERENCE TO VALUE OF NUMB 39 IC 2 LENGTH OF OUTPUT FIELD 40 OUT OUTPUT NUMB AS EBCDIC DEC. (,E,E".",1), 41 NULL NO REPLICATION 42 IC 4 TYPE IS EBCDIC
[Page 17]
Data Reconfiguration Service RFC 194
[Page 17] Data Reconfiguration Service RFC 194
43 LD 3 REFERENCE TO E"."
44 IC 1 LENGTH TO OUTPUT
45 OUT OUTPUT THE PERIOD
(,E,LINE,117), 46 NULL NO REPLICATION
47 IC 4 TYPE IS EBCDIC
48 LD 2 REFERENCE TO LINE
49 IC 117 LENGTH TO OUTPUT
50 OUT PUT OUT CONTENTS OF LINE
(NUMB.<=.NUMB+1: 51 LD 0 REFERENCE TO NUMB
U(1)); 52 IC 1 AMOUNT TO ADD
53 ADD ADD TO NUMB
54 LD 0 REFERENCE TO NUMB
55 STO STORE BACK INTO NUMB
56 AD 5 PLACE TO GO
57 B UNCONDITIONAL BRANCH BACK
43 LD 3 REFERENCE TO E"." 44 IC 1 LENGTH TO OUTPUT 45 OUT OUTPUT THE PERIOD (,E,LINE,117), 46 NULL NO REPLICATION 47 IC 4 TYPE IS EBCDIC 48 LD 2 REFERENCE TO LINE 49 IC 117 LENGTH TO OUTPUT 50 OUT PUT OUT CONTENTS OF LINE (NUMB.<=.NUMB+1: 51 LD 0 REFERENCE TO NUMB U(1)); 52 IC 1 AMOUNT TO ADD 53 ADD ADD TO NUMB 54 LD 0 REFERENCE TO NUMB 55 STO STORE BACK INTO NUMB 56 AD 5 PLACE TO GO 57 B UNCONDITIONAL BRANCH BACK
LITERAL/IDENTIFIER TABLE
LITERAL/IDENTIFIER TABLE
0 NUMB
1 CC
2 LINE
3 E"."
0 NUMB 1 CC 2 LINE 3 E"."
LABEL TABLE
LABEL TABLE
LABEL OFFSET
1 5
LABEL OFFSET 1 5
[ This RFC was put into machine readable form for entry ]
[ into the online RFC archives by Simone Demmel 6/97 ]
[ This RFC was put into machine readable form for entry ] [ into the online RFC archives by Simone Demmel 6/97 ]
[Page 18]
[Page 18]
一覧
スポンサーリンク





