Hello guys,
This post is for the beginners so that they could brush up
about the assembly language.Assembly language primer cannot be exhaustively
explained in this single post.So I’d advise you to do read the upcoming posts.
- SYSTEM ORGANISATION BASICS:
So in any system we’l have the Central processing
unit(CPU),Memory where things are stored at run-time and we have the I/O
devices such as keyboard,monitor etc..,
The CPU consists of four parts namely:
- Control
unit :- which is used for retrieving and decoding the instructions
executed and also to retrieve and store data from memory
- Execution
unit:- is a place where the actual working takes place.
- Registers:-
when a CPU executes instructions it will need some internal memory
locations to do calculations.We can assume that to be internal memory
locations whose values keep changing according to the execution.
- Flags:-
are used to indicate the event that is happening or executing currently.
- CPU REGISTERS
The CPU contains 4 registers namely:
- General
purpose registers:-
It contains 8 registers namely:
EAX: It is also known as the
accumulator register used for storing operands and result data.
EBX: known as base register and
used for storing pointer to data.
ECX: known as counter register and
used in loop and String operations.
EDX: data registers used as i/o
pointer
ESI: data pointer register used for
memory operations(source index).
EDI: data pointer register used for
memory operations(destination index).
ESP: Stack pointer register used
for stack operations which points to the top of the stack.
EBP:is the stack data pointer
register.
·
MEMORY
This contains the virtual memory
model.When a program is being executed,it is laid out as a process in
memory.Many processes are carried out in the same way.But what the CPU and the
OS does is that it creates an abstraction such that each process feels that it
is the only process being executed by the system and no other process exist.
