首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何识别n,i,x,e位设置(SIC/XE)?

如何识别n,i,x,e位设置(SIC/XE)?
EN

Stack Overflow用户
提问于 2010-03-25 20:45:03
回答 1查看 3.5K关注 0票数 1

我有一个系统软件类的项目,我们必须生成一个子例程,将一行源代码分解为4个组件: label、op代码、operand1和operand2,并标识n、i、x和e位设置。我想弄清楚这点有点问题。预先感谢您的帮助

下面是一些示例:以下4个源行示例的组件和位如下:

  1. 示例+LDA组件,X .MAIN

标签:“示例”op代码:"LDA“操作数1:”填充“操作数2:"X"nixbpe: 111?1

  • RSUB无OP

标签:“op代码:"RSUB”操作数1:"“NO”操作数2:"OP“

nixbpe: 110?0

  • CMT字节@C‘’RESERVED块,XYZ备用

标签:"CMT“op代码:”字节“操作数1:”C‘’RESERVED块‘“操作数2:"XYZ”<注意:只要'X’是第二个operand>的第一个字符,就会设置nixbpe中的x(索引)位。

nixbpe: 101?0

  • RMO A,X

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

:11l??0

标记为"?“保持从调用程序接收的状态;op代码的前缀确定e位;operand1的前缀确定n位和i位;operand2的第一个字符决定x位。B位和p位在其他地方设置。在这个例程中不需要进行语义检查(特别是,上面对RSUB语句的两种解释都是可以的)。组件的默认值是空字符串。默认的"ni??pe“位是"00??00”。

EN

回答 1

Stack Overflow用户

发布于 2011-10-06 17:09:40

*寻址标志位描述

代码语言:javascript
复制
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

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/2519230

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档