Memory Organization layout Flashcards
List the Memory Organizations
and there levels
- Registers Level 0
- Cache Level 1
- Main Memory Level 2
- Disk Level 3
- Magnetic Disk Level 4
- Magnetic Tape Level 5
Memory Layout
Heap
Stack
Static
Code(Text)
Heap
is large free memory that could be used by a program. Also know as dynamic memory. Which is one data structure
Stack
is where functions call and local variables are located
Static
Global variables
Code(Text)
is where the instructions are
Types of registers
How to tell the difference between sizes
Data Registers
Pointer Registers
Index Registers
16 bit is 2 digits
32 bits has “E” in front of the 2 digits
64 bits has “R” in front of the 2 digit
AX & Type of Register
Primary Accumulator it is used for input and output and most arithmetic instructions
Data Registers
BX & Type of Register
Based register as could be sued in indexed addressing
Data Registers
CX & Type of Register
Counter register. Stores the loop count
Data Registers
DX & Type of Register
Data Register used for input output like AX a resister along with DX for multiply and divide operations involving large values.
Data Registers
SI & Type of Register
Source Index - It is used as a source index for string operations.
DI & Type of Register
Destination Index - It is used as a destination index for string operations.
OF & Type of Register
Overflow Flag (OF) − It indicates the overflow of a high-order bit (leftmost bit) of data after a signed arithmetic operation.
DF & Type of Register
Direction Flag (DF) − It determines left or right direction for moving or comparing string data. When the DF value is 0, the string operation takes left-to-right direction and when the value is set to 1, the string operation takes right-to-left direction.
IF & Type of Register
Interrupt Flag (IF) − It determines whether the external interrupts like keyboard entry, etc., are to be ignored or processed. It disables the external interrupt when the value is 0 and enables interrupts when set to 1.
TF & Type of Register
Trap Flag (TF) − It allows setting the operation of the processor in single-step mode. The DEBUG program we used sets the trap flag, so we could step through the execution one instruction at a time.
SF & Type of Register
Sign Flag (SF) − It shows the sign of the result of an arithmetic operation. This flag is set according to the sign of a data item following the arithmetic operation. The sign is indicated by the high-order of leftmost bit. A positive result clears the value of SF to 0 and negative result sets it to 1.
ZF & Type of Register
Zero Flag (ZF) − It indicates the result of an arithmetic or comparison operation. A nonzero result clears the zero flag to 0, and a zero result sets it to 1.
AF& Type of Register
Auxiliary Carry Flag (AF) − It contains the carry from bit 3 to bit 4 following an arithmetic operation; used for specialized arithmetic. The AF is set when a 1-byte arithmetic operation causes a carry from bit 3 into bit 4.
PF & Type of Register
Parity Flag (PF) − It indicates the total number of 1-bits in the result obtained from an arithmetic operation. An even number of 1-bits clears the parity flag to 0 and an odd number of 1-bits sets the parity flag to 1.
CF & Type of Register
Carry Flag (CF) − It contains the carry of 0 or 1 from a high-order bit (leftmost) after an arithmetic operation. It also stores the contents of last bit of a shift or rotate operation.
Name the 3 types of Segments
Code Segment
Data Segment
Stack Segement
Code Segment
It contains all the instructions to be executed. A 16-bit Code Segment register or CS register stores the starting address of the code segment.
Data Segment
It contains data, constants and work areas. A 16-bit Data Segment register or DS register stores the starting address of the data segment.
Stack Segment
It contains data and return addresses of procedures or subroutines. It is implemented as a ‘stack’ data structure. The Stack Segment register or SS register stores the starting address of the stack.