Tuesday, March 5, 2013

ADDRESSING MODES


Addressing modes are an aspect of the instruction set architecture in most central processing unit (CPU) designs. The various addressing modes that are defined in a given instruction set architecture define how machine language instructions in that architecture identify theoperand (or operands) of each instruction. An addressing mode specifies how to calculate the effective memory address of an operand by using information held in registers and/or constants contained within a machine instruction or elsewhere.
In computer programming, addressing modes are primarily of interest to compiler writers and to those who write code directly in assembly language.


The memory address register (MAR) holds the address of the memory location of the next instruction to be executed. While the first instruction is being executed, the address of the next memory location is held by it. The Memory Address Register is half of a minimal interface between a microprogram and computer storage. The other half is a memory data register.
Basically, the MAR holds the address of a memory location, but not necessarily just the instructions. It holds the memory location of data that needs to be accessed. That data is then fed in to the MDR (memory data register) and can be used.


The memory data register (MDR) is the register of a computer's control unit that contains the data to be stored in the computer storage(e.g. RAM), or the data after a fetch from the computer storage. It acts like a buffer and holds anything that is copied from the memory ready for the processor to use it.
The MDR is a two-way register. When data is fetched from memory and placed into the MDR, it is written to in one direction. When there is a write instruction, the data to be written is placed into the MDR from another CPU register, which then puts the data into memory.
The memory data register is half of a minimal interface between a microprogram and computer storage, the other half is a memory address register.
Computer data storage, often called storage or memory, refers to computer components and recording media that retain digital data used for computing for some interval of time. Computer data storage provides one of the core functions of the modern computer, that of information retention. It is one of the fundamental components of all modern computers, and coupled with a central processing unit (CPU, a processor), implements the basic computer model used since the 1940s.
In contemporary usage, memory usually refers to a form of semiconductor storage known asrandom-access memory (RAM) and sometimes other forms of fast but temporary storage. Similarly, storage today more commonly refers to mass storage  optical discs, forms ofmagnetic storage like hard disk drives, and other types slower than RAM, but of a more permanent nature. Historically, memory and storage were respectively called main memoryand secondary storage (or auxiliary storage). Auxiliary storage (or auxiliary memory units) was also used to represent memory which was not directly accessible by the CPU(secondary or tertiary storage). The terms internal memory and external memory are also used.
The contemporary distinctions are helpful, because they are also fundamental to the architecture of computers in general. The distinctions also reflect an important and significant technical difference between memory and mass storage devices, which has been blurred by the historical usage of the term storage

No comments: