The basic introduction to MIX language and machine

Source: Internet
Author: User

Reference:the Mix computer, the mix Introduction sets,

The basic Info storage unit in MIX computer are the byte, which stores positive values in the range of 0 to 63. In MIX, Byte is only have 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 is numbered from 1 through 5, the sign of a number was 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 firs T 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 instructi Ons.

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 is abbreviated as E, G, L

/ o

Input-output block device, each device labelled as UN, ranging from 0 to 20. and u0 to U7 was magnetic tape units, U8 through, disks and drums, U16 was a card reader, U17 is a card writer, U18 I s 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 inst Rutions in a internal register called location counter (known as PC on other computer)

Instruction structure

MIX instructions is codified as words with the following subfield Sturcture:

Subfield fspec Description
address (0:2) the first and bytes plus sign is the  address  field. Combined with the INDEX field, denotes the memory address to being used by the instruction.
index (3:3) the third byte is The index , normally used for indexing the ADDRESS3.
mod (4:4) byte four are used either as an O Peration 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 is the Address field, combined with the index field (for address stored in INDEX register Refe Red by INDEX Byte)

For given a instruction, ' add ' stands for the mem address after combining the address of field and and ' cont ' is t He 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 ' to MOD 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.