#Codewithsunil #sunilmakwana
What are the meaning of register in assembly language In Hindi | CodewithSunil
Subscribe: / @codewithsunil
general purpose registers
8086 CPU has 8 general purpose registers, each register has its own name:
AX - the accumulator register (divided into AH / AL).
BX - the base address register (divided into BH / BL).
CX - the count register (divided into CH / CL).
DX - the data register (divided into DH / DL).
SI - source index register.
DI - destination index register.
BP - base pointer.
SP - stack pointer.
despite the name of a register, it's the programmer who determines the usage
for each general purpose register. the main purpose of a register is to keep a
number (variable). the size of the above registers is 16 bit, it's something like:
0011000000111001b (in binary form), or 12345 in decimal (human) form.
4 general purpose registers (AX, BX, CX, DX) are made of two separate 8 bit
registers, for example if AX= 0011000000111001b, then AH=00110000b
and AL=00111001b. therefore, when you modify any of the 8 bit registers 16
bit register is also updated, and vice-versa. the same is for other 3 registers,
"H" is for high and "L" is for low part.
because registers are located inside the CPU, they are much faster than
memory. Accessing a memory location requires the use of a system bus, so it
takes much longer. Accessing data in a register usually takes no time.
therefore, you should try to keep variables in the registers. register sets are
very small and most registers have special purposes which limit their use as
variables, but they are still an excellent place to store temporary data of
calculations.
segment registers
CS - points at the segment containing the current program.
DS - generally points at segment where variables are defined.
ES - extra segment register, it's up to a coder to define its usage.
SS - points at the segment containing the stack.
although it is possible to store any data in the segment registers, this is never
a good idea. the segment registers have a very special purpose - pointing at
accessible blocks of memory.
segment registers work together with general purpose register to access any
memory value. For example if we would like to access memory at the physical
address 12345h (hexadecimal), we should set the DS = 1230h and SI =
0045h. This is good, since this way we can access much more memory than
with a single register that is limited to 16 bit values.
I am happy to share the knowledge that I have if you like please like and subscribe and share
Language videos are available on this channel
C Programming
Java Programming
Python Programming
C++ programming
C# programming
Visual Basic
JavaScript
PHP language
MySQL database connection
fundamentals of android developments
basic of networking by Cisco
Nowadays, Knowledge of Computers is very important for everyone to build a strong and bright career.
At this channel, we always try to hold the hands of those who are afraid of Computers and Programming.
So let's take this effort forward together and make our world a new digital world with the power of Computers.
On this channel, you will be provided many CS/IT Subject Interactive Video lectures and doubt-solving live classes on C, C++, Java, HTML, Computer Architecture, Computer
Graphics, Operating Systems, Information Systems and Technology, Digital network communication, Web technology, Software Engineering and Much more
KEEP SUPPORTING KEEP LOVING
THANK YOU.