【问题标题】:how to identify the n,i,x, and e bit settings(SIC/XE)?如何识别 n、i、x 和 e 位设置(SIC/XE)?
【发布时间】:2010-03-25 20:45:03
【问题描述】:

我的系统软件类有一个项目,我们必须生成一个子程序来将一行源代码分解为 4 个组件:标签、操作码、操作数 1 和操作数 2,并识别 n、i、x 和 e 位设置。我在试图找出 nixbpe 位时遇到问题。提前感谢您的帮助

这里有一些例子: 以下 4 个源代码行示例的组件和位如下:

  1. 示例 +LDA STUFF,X .MAIN

    标签:“示例” 操作码:“LDA” 操作数 1:“东西” 操作数 2:“X”

    nixbpe: 111??1

  2. RSUB 没有操作

    标签:“” 操作码:“RSUB” 操作数 1:“否” 操作数 2:“OP”

    nixbpe: 110??0

  3. CMT BYTE @C'保留块',XYZ 预留

    标签:“CMT” 操作码:“字节” 操作数 1:“C'保留块'” 操作数 2:“XYZ”

    nixbpe: 101??0

  4. RMO A,X

    标签:“” 操作码:“RMO” 操作数 1:“A” 操作数 2:“X”

    nixbpe: 11l??0

nixbpe 位标记为“?”保持从调用程序接收到的状态;操作码的前缀决定了 e-bit;操作数 1 的前缀决定了 n 和 i 位;操作数 2 的第一个字符确定 x 位。 b 和 p 位在别处设置。在这个例程中不需要进行语义检查(所以特别是,上面 RSUB 语句的两种解释都可以)。组件的默认值是空字符串。 “ni??pe”位的默认值为“00??00”。

【问题讨论】:

标签: assembly sic


【解决方案1】:

***寻址标志位说明

Mode        n i x b p e
-------------------------------------
Direct      1 1 0 0 0 0   12 bit displacement is target address
            1 1 0 0 0 1   20 bit address is target address
            1 1 0 0 1 0   12 bit 2's complement displacement from PC (PC relative)
            1 1 0 1 0 0   12 bit base unsigned displacement forward from B (base displacement)
            1 1 1 0 0 0   index register X added to direct address to get target address
            1 1 1 0 0 1   index register X added to direct address to get target address
            1 1 1 0 1 0   index register X added to PC relative computation to get target address
            1 1 1 1 0 0   index register X added to base displacement computation to get target address
            0 0 0 - - -   simple SIC instruction, last 15 bits are the address
            0 0 1 - - -   index register X added to direct address to get target address
Indirect    1 0 0 0 0 0   Computed memory address contains the target address
            1 0 0 0 0 1   Computed memory address contains the target address
            1 0 0 0 1 0   Computed memory address contains the target address
            1 0 0 1 0 0   Computed memory address contains the target address
Immediate   0 1 0 0 0 0   Computed memory address is the operand (target address is the instruction)
            0 1 0 0 0 1   Computed memory address is the operand (target address is the instruction)
            0 1 0 0 1 0   Computed memory address is the operand (target address is the instruction)
            0 1 0 1 0 0   Computed memory address is the operand (target address is the instruction)***

更多详情请参考http://www.unf.edu/~cwinton/html/cop3601/supplements/sicsim.docL.html

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-05-22
    • 1970-01-01
    • 2016-08-11
    • 2014-06-29
    • 2022-06-10
    • 1970-01-01
    相关资源
    最近更新 更多