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. TCP应用编程--套接字C#实现

     套接字之间的连接过程可以分为三个步骤: 1.服务器监听 2.客户端请求 3.连接确认 Ø服务器监听:是指服务器套接字并不定位具体的客户端套接字,而 是处于等待连接的状态,实时监控网络状态. Ø客户端 ...

  2. hadoop 学习

    不同版本间Hadoop拷贝 通过NFS,将hdfs挂在到本地

  3. 浅谈C中的指针和数组(五)

    前面写了一些C指针和数组的一些知识,但是还有一些很重要的知识没有交代,这里做一个补充. 首先看一下,普通变量(指针也是变量)和数组名查看地址的方式是不同的. 查看数组变量的地址,不需要使用 & ...

  4. 航频之声APP截图

    上传github的APP截图......

  5. C语言-字符编码转换:UTF与GB2312

    依赖库libiconv,libiconv库的交叉编译不做描述,网上很多 #include <stdio.h> #include <stdlib.h> #include < ...

  6. 转: ES6异步编程:Thunk函数的含义与用法

    转: ES6异步编程:Thunk函数的含义与用法 参数的求值策略 Thunk函数早在上个世纪60年代就诞生了. 那时,编程语言刚刚起步,计算机学家还在研究,编译器怎么写比较好.一个争论的焦点是&quo ...

  7. uva 10129 poj 1386 hdu 1116 zoj 2016 play on words

    //本来是想练一下欧拉回路的,结果紫书上那题是大水题!!!!! 题意:给出n个单词,是否可以把单词排列成每个单词的第一个字母和上一个单词的最后一个字母相同 解:欧拉通路存在=底图联通+初度!=入度的点 ...

  8. [Leetcode][Python]33: Search in Rotated Sorted Array

    # -*- coding: utf8 -*-'''__author__ = 'dabay.wang@gmail.com' 33: Search in Rotated Sorted Arrayhttps ...

  9. python第三天---collections类

    collection系列 1.计数器(counter) Counter是对字典类型的补充,用于追踪值的出现次数. 我们从中挑选一些相对常用的方法来举例: 在上面的例子我们可以看出,counter方法返 ...

  10. frameset常用属性

    框架是网页画面分成几个框窗(不同的窗口对应不同页面以几个网页的形式显示),同时取得多个 src的地址.页面所有框架标记需要放在一个总起的 html 档,这个档案只记录了该框架如何分割 ,不会显示任何资 ...