The basic introduction to MIX language and machine
reference: The MIX Computer, The MIX Introduction sets,
The basic info storage unit in MIX computer is the byte, which stores positive values in the range of 0 to 63. In MIX, Byte only has 6 bytes, and the word Byte refer to MIX 6-byte.
A MIX word is defined as set of 5 bytes and plus a sign. The bytes within a word are numbered from 1 to 5, The sign of a number is denoted by index 0. Graphincally.
-----------------------------------------------
| 0 | 1 | 2 | 3 | 4 | 5 |
-----------------------------------------------
| +/- | byte | byte | byte | byte | byte |
-----------------------------------------------
We can refer to subfields within a word using a field specification or fspec of the form "(L:R)", where L denotes the first byte, and R the last byte of the subfield.
Registers:
rA
A register, general purpose register holding a word usually serving as the operadn of the arithmetic and storing instructions.
rX
X register, general purpose register holding a word, acting as an extension or a replacement of 'rA'
rJ
jump register stores positive 2-bytes values, representing a jump addresss.
rI1, rI2, rI3, rI4, rI5, rI6
OV
overflow toggle( a bit with valuess on and off), denoted as OV
CM
comparision indicator, having 3 values: EQUAL, GREATER or LESS, possible value are abbreviated as E, G, L
I/O
input-output block device, each device labelled as un, ranging from 0 to 20. And u0 to u7 are magnetic tape units, u8 through 15 are disks and drums, u16 is a card reader, u17 is a card writer, u18 is a line printer and, u19 is a typewirter terminal and u20 a paper tape.
CPU
MIX owes a virtual CPU which controls the above components, able to execute a rich set of instructions. As von Neumann computer, the CPU fetches binary instructions from memory sequentially, and stores the add of the next instrutions in an internal register called location counter(known as PC in other computer)
Instruction structure
MIX instructions are codified as words with the following subfield sturcture:
| Subfield | fspec | Description |
| ADDRESS | (0:2) | The first two bytes plus sign are the address field. Combined with the INDEX field, denotes the memory address to be used by the instruction. |
| INDEX | (3:3) | The third byte is the index, normally used for indexing the address3. |
| MOD | (4:4) | Byte four is used either as an operation code modifier or as a field specification. |
| OPCODE | (5:5) | The last (least significant) byte in the word denotes the operation code. |
The first 2 bytes plus sign are the address field, combined with the INDEX field(for address stored in index register refered by INDEX byte)
For given a instruction, 'add' stands for the mem address after combining the address in address field and and 'cont' is the contents of the subfield indicated by MOD of the memory cell with address.
[rI2] = + 00 63
[31] = - 10 11 00 11 22
Given instruction ‘I = - 00 32 02 11 10’, we have:
ADDRESS = - 00 32
INDEX = 02 = 2
MOD = 11 = (1:3)
OPCODE = 10
add = ADDRESS + [rI2] = 63 + (-32) = 31
cont = [M](MOD) = (- 10 11 00 11 22)(1:3)
While "MOD" means we use left padding to the bytes selected by ‘MOD’ to obtain a complete word as the result.
IF we use mnemonic name assigned to this MIX instruction, we can rewrite the above instruction as:
LD2 -32, 2(1:3)
or, for a generic instruction:
MNEMONIC ADDRESSS, INDEX(MOD)
note:
MOD equals to (0:5) means the whole word.
The basic introduction to MIX language and machine的更多相关文章
- Something on RoIAlign --- basic introduction and implementation
Something on RoIAlign --- basic introduction and implementation 2018-10-22 22:40:09 Paper: Mask RCNN ...
- RESTFul basic introduction
http://www.ruanyifeng.com/blog/2011/09/restful.html
- 可分离卷积详解及计算量 Basic Introduction to Separable Convolutions
任何看过MobileNet架构的人都会遇到可分离卷积(separable convolutions)这个概念.但什么是“可分离卷积”,它与标准的卷积又有什么区别?可分离卷积主要有两种类型: 空间可分离 ...
- Cyber Security - Palo Alto Basic Introduction
Preparation of the Lab Environment: Download and Install Pan-OS from the following website https://d ...
- Introduction to Machine Learning
Chapter 1 Introduction 1.1 What Is Machine Learning? To solve a problem on a computer, we need an al ...
- Machine Learning Algorithms Study Notes(1)--Introduction
Machine Learning Algorithms Study Notes 高雪松 @雪松Cedro Microsoft MVP 目 录 1 Introduction 1 1.1 ...
- How do I learn machine learning?
https://www.quora.com/How-do-I-learn-machine-learning-1?redirected_qid=6578644 How Can I Learn X? ...
- Machine and Deep Learning with Python
Machine and Deep Learning with Python Education Tutorials and courses Supervised learning superstiti ...
- (zhuan) Speech and Natural Language Processing
Speech and Natural Language Processing obtain from this link: https://github.com/edobashira/speech-l ...
随机推荐
- SQL Server 2008如何导出带数据的脚本文件
第一步,选中需要导出脚本的数据库,右键选中 第二步,选取弹出菜单中的任务-生成脚本选项(会弹出一SQL生成脚本的向导) 第三步,在向导中点击下一步,弹出选择数据库界面(默认是自己之前选中的数据库),把 ...
- MySQL 中文显示乱码以及中文查询条件返回0条结果的问题解决
最近关于中文显示乱码的贴子比较多,所以也做了个总结: 可以参考一下杨涛涛版主的<各种乱码问题汇总>http://topic.csdn.net/u/20071124/08/3b7eae6 ...
- ftp上来显示的时间和系统时间不一致
ftp上来显示的时间和系统时间不一致,是因为默认情况下,vsftpd 是用GMT做为他的时间的,所以和系统的时间可能会不一致 修改也非常简单: vi /etc/vsftpd/vsftpd.conf 在 ...
- OC语法6——内存管理之引用计数器(retain,release)
OC内存管理: 一.引用计数器: Java有垃圾回收机制(Garbage Collection,GC).也就是说当我们创建对象后,不需要考虑回收内存的事,Java的垃圾回收机制会自动销毁该对象,回收它 ...
- Android Studio git ignore
# Built application files *.apk *.ap_ # Files for the Dalvik VM *.dex # Java class files *.class # G ...
- ETL中的数据增量抽取机制
ETL中的数据增量抽取机制 ( 增量抽取是数据仓库ETL(extraction,transformation,loading,数据的抽取.转换和装载)实施过程中需要重点考虑的问 题.在ETL过 ...
- 30款javascript脚本插件 jquery插件大全
Shifty Nav - a Fully Responsive JS CSS3 Mega Menu Show Demo Shifty Nav is a fully responsive CSS3 ...
- 解密电子书之四:MCU(freescale)
谈完国产的君正,让我们再看看呛了君正财路的freescale iMX51. 这是freescale近期的主打产品,用的是ARM Cortex A8架构,主频在消费电子领域最高可达800MHz,在工业领 ...
- 填充Z形二维数组
形如 1 3 4 10 2 5 9 11 6 8 12 15 7 13 14 16 的数组称谓Z形二维数组.填充这样的数组其实只要按照Z形进行行走填充即可,设置一个flag指示方向,行 ...
- SICP 练习 (2.9)解决摘要:宽度和区间运算的关系间隔
SICP 2.9 像是一个数学题,要我们证明区间的和与差的宽度是被加和被减的区间的宽度的函数,而对于乘法和除法来说不成立. 书中所谓宽度就是区间起点和终点差的一半.以我看来更像是区间宽度的一半.无论怎 ...