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. 又一个类dapper轮子:VIC.DataAccess

    DataAccess Author: Victor.X.Qu Email: fs7744@hotmail.com DataAccess is a c# project for sql data map ...

  2. ssh框架的搭建

    SSH 为 struts+spring+hibernate的一个集成框架,是目前较流行的一种Web应用程序开源框架. 集成SSH框架的系统从职责上分为四层:表示层.业务逻辑层.数据持久层和域模块层,以 ...

  3. Django Url编码问题

    Django Url编码问题   最近在学习Django,写一个blog程序练练手手.对于一个才开始接触web开发的来说,难免会遇到一些问题.   有一个这样的模板: {%for k,v in cat ...

  4. QF——iOS中的数据库操作:SQLite数据库,第三方封装库FMDB,CoreData

    SQLite数据库: SQLite是轻量级的数据库,适合应用在移动设备和小型设备上,它的优点是轻量,可移植性强.但它的缺点是它的API是用C写的,不是面向对象的.整体来说,操作起来比较麻烦.所以,一般 ...

  5. mysql 存储过程中的declare 和 set @的两种变量的区别

    两者在手册中的说明: DECLARE var_name[,...] type [DEFAULT value]这个语句被用来声明局部变量.要给变量提供一个默认值,请包含一个DEFAULT子句.值可以被指 ...

  6. 幻世(OurDream)2D图形引擎易语言汉化版更新提示

    幻世引擎的易语言汉化专版到目前为止已经累积了多个BUG,其中多个BUG是影响引擎功能使用的问题,我将会在近期发布修复所有问题的更新版本(此更新版本同时也将会支持最新的对加入的粒子系统的支持),敬请各位 ...

  7. javaTemplates-学习笔记四

    应用的调用顺序理解 这个地方很薄弱,浏览器 http://localhost:9000/index.html  ->  conf/routes  ->  app/controllers/A ...

  8. 关于js作用域

    我们知道在编程语言中,作用域的作用就是控制变量.参数的可见范围和生命周期. 同时内部函数也可访问外部的函数和变量. js中提供了函数作用域的功效,比如在函数中定义的变量外部是无法访问到的: funct ...

  9. 在VHDL中,“传输延迟”和“惯性延迟”

    传输延迟就是最容易理解的从输入变化到输出变化之间的延迟.对应语法是transport例如 b <= transport a after 20ns 惯性延迟考虑了电容效应,即如果输入是(相对)窄的 ...

  10. @RenderSection

    @RenderSection在母版页中先占个位置,然后在使用该母版的页面中在各自去实现自己的Section. 在母版页_Layout.cshtml中使用格式为 @RenderSection(" ...