⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rfc194.txt

📁 著名的RFC文档,其中有一些文档是已经翻译成中文的的.
💻 TXT
📖 第 1 页 / 共 3 页
字号:
Data Reconfiguration Service                                     RFC 194   Literals and Identifiers are compiled as shown in fig. 5.                                   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 <   |                                                 |     |  |                                                 |     |  |                                                 |     \  +-------------------------------------------------+     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)             Fig. 5.  Compiled Literals and Identifiers                                                                [Page 7]Data Reconfiguration Service                                     RFC 194   Types B, 0, X, AD, ED, and SB point to 32-bit word- aligned data   shown below. +---+---+-----+-------+       +-------------------+    word-aligned, | T |///|  L  |    ---+-----> |                   |    32-bit right- +---+---+-----+-------+       +-------------------+    justified      Types E and A point to byte-aligned symbol streamsas shown below.                                 byte-aligned, L <= 256 +---+---+-----+-------+       +------------------------+ | T |///|  L  |    ---+-----> |                        | +---+---+-----+-------+       +------------------------+                                                                [Page 8]Data Reconfiguration Service                                     RFC 194Instruction Format     Since literals and identifiers will be stored in the same dataarea, more than 256 literals plus identifiers might be encountered somore than 8 bits are needed to reference literal/id pool.  Furthermore,such references must be distinguished from operators in the instructionstream, so a 16-bit instruction will be used, as shown below.     +--------+------------------------+     |    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     The operation code decoder picks up types 0, 1, 3, 4,and 5 and deposits them on top of the stack (TOS).  LD is anindex into the literal/identifier table, and AD is an indexinto the instruction sequence.     The decoder examines OP elements further:         4        4            8     +--------+--------+----------------+     |  0010  |        |////////////////|     +--------+--------+----------------+        OP        |                  +----------> 0 = binary operator                               1 = unary operator                               2 = special operator                                                                [Page 9]Data Reconfiguration Service                                     RFC 194Binary Operators (*)     Let the TOS contain y and the next level, x.  The binary operatorscompute x  <bop> y, popping both x, y from stack, and put the resultback on top of the stack.                     +---+ <-- TOS  +-----+ <-- TOS                     | y |          | x-y |     e.g.     x-y => +---+     ===> +-----+                     | x |          |/////|                     +---+          +-----+Binary Operator Encoding                     4        4        4        4                +--------+--------+--------+--------+                |  0010  |  0000  |        |////////|                +--------+--------+--------+--------+                                       |            +--------------------------+            |            V     0 = integer +     1 = integer -     2 = integer x     3 = integer : (or /), no remainder     4 = concatenate ||     All binary operations except concatenate expect the toptwo elements on the stack to describe type B, 0, X, or SB.  Theresult is always a 32-bit type B element.  The concatenateoperator fails unless both types are identical.  For example:-------     (*) As suggested above, the stack really contains instructionoperands that describe data; for convenience in illustrationsthe data rather than their descriptors are shown on the stack.                                                               [Page 10]Data Reconfiguration Service                                     RFC 194        type     L    value             T       L     V       +------+------+------+        +------+------+------+TOS -> |  B   |  32  |  4   |        |  B   |  32  |  12  | <- TOS       +------+------+------+   ==>  +------+------+------+       |  B   |  8   |  16  |        |//////|//////|//////|       +------+------+------+        +------+------+------+       Before-operation                after-operation       +------+------+------+        +------+------+------+TOS -> |  A   |  2   |  DE  |        |  A   |  5   |ABCDE | <- TOS       +------+------+------+   ==>  +------+------+------+       |  A   |  3   | ABC  |        |//////|//////|//////|       +------+------+------+        +------+------+------+       Before || operation             after || operationNo binary operator has any effect on the TRUE/FALSE flag.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                                                               [Page 11]Data Reconfiguration Service                                     RFC 194     For the unary minus operator the data described by the top of thestack is replaced with its 2's complement.  The form fails if the TOStype is not SB, B, 0, or X.     The Load identifier expects the TOS to describe an index into theliteral/identifier pool (that is, an LD instruction) .  The TOSdescribed data is replaced by 32-bit type B values.  The operation failsif 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'scomplement.     The Label Table Reference operator expects a 32-bit type B valuedescribed by TOS and searches for this label in the label Table.  Iffound, the TOS described data is replaced by the relative address in theinstruction sequence of the label (in the form of an AD instruction).If not found, the form fails.  No Unary operator has any effect on theTRUE/FALSE flag.Special Operators                4        4        4        4            +--------+--------+--------+--------+            |  0010  |  0010  |        |        |            +--------+--------+--------+--------+                                 |         |         +-----------------------+        /         |                               /         V                              /   0 = store TOS                        |   1 = return                           V   2 = branch               0 = true, 1 = false, 2 = unconditional   3 = compare              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   5 = input call           0 = no compare                            1 = compare   6 = output call                                                               [Page 12]Data Reconfiguration Service                                     RFC 194

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -