reference: The MIX ComputerThe 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的更多相关文章

  1. Something on RoIAlign --- basic introduction and implementation

    Something on RoIAlign --- basic introduction and implementation 2018-10-22 22:40:09 Paper: Mask RCNN ...

  2. RESTFul basic introduction

    http://www.ruanyifeng.com/blog/2011/09/restful.html

  3. 可分离卷积详解及计算量 Basic Introduction to Separable Convolutions

    任何看过MobileNet架构的人都会遇到可分离卷积(separable convolutions)这个概念.但什么是“可分离卷积”,它与标准的卷积又有什么区别?可分离卷积主要有两种类型: 空间可分离 ...

  4. Cyber Security - Palo Alto Basic Introduction

    Preparation of the Lab Environment: Download and Install Pan-OS from the following website https://d ...

  5. Introduction to Machine Learning

    Chapter 1 Introduction 1.1 What Is Machine Learning? To solve a problem on a computer, we need an al ...

  6. Machine Learning Algorithms Study Notes(1)--Introduction

    Machine Learning Algorithms Study Notes 高雪松 @雪松Cedro Microsoft MVP 目 录 1    Introduction    1 1.1    ...

  7. 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? ...

  8. Machine and Deep Learning with Python

    Machine and Deep Learning with Python Education Tutorials and courses Supervised learning superstiti ...

  9. (zhuan) Speech and Natural Language Processing

    Speech and Natural Language Processing obtain from this link: https://github.com/edobashira/speech-l ...

随机推荐

  1. 安装rac遇到的问题总结:

    1. 选择虚拟机工具 这个过程是非常的波折.这次安装也让我吸取了很大教训,获得了宝贵经验. 首先啊,必须了解rac的机制. 共享磁盘+多实例. 这就意味着,我们必须使用一个支持共享磁盘的虚拟机. 第一 ...

  2. Fast InvSqrt()(平方根倒数速算法)

    浮点数的平方根倒数常用于计算正规化矢量.3D图形程序需要使用正规化矢量来实现光照和投影效果,因此每秒都需要做上百万次平方根倒数运算,而在处理坐标转换与光源的专用硬件设备出现前,这些计算都由软件完成,计 ...

  3. 小鱼提问3 static方法中可以访问某个类的私有变量吗(不通过反射的其他非正常手段)?什么情况下可以?

    class Student { private string _name; public int Age = 0; public static void Test() { Student stu = ...

  4. attempting to bokeyaunrun eclipse useing the jre instead of jdk,to run eclipse using

    关于eclipse运行出现,attempting to bokeyaunrun eclipse useing the jre instead of jdk,to run eclipse using错误 ...

  5. PHP中date函数参数详解

    date函数输出当前的时间echo date('Y-m-d H:i:s', time()); // 格式:xxxx-xx-xx xx:xx:xx 第一个参数的格式分别表示: a - "am& ...

  6. Generative Learning algorithms

    "generative algorithm models how the data was generated in order to categorize a signal. It ask ...

  7. Arduino当avr开发板

    原理并不复杂,因为arduino本来就是avr+一堆的库,找个能编译出hex的工具下载到板子就行. 但实际做起来还是碰到很多问题. 先是尝试eclipse+avr plugin 编译时出现make: ...

  8. asp.net mvc 不找其他view模板,只找cshtml

    asp.net mvc 默认找view文件时,依次找后辍名为aspx.ascx.cshtml.vbhtml的view文件.但是项目住住用C#+Razor开发,这样找,岂不有性能损失. 添加以下代码: ...

  9. restful_api

    http://www.ruanyifeng.com/blog/2014/05/restful_api.html

  10. java 操作配置文件 .properties

    package com.dms.common; import java.io.File; import java.io.FileInputStream; import java.io.FileNotF ...