Post Pacific  

Go Back   Post Pacific > Восстановленный архив > Темы без сохранившегося раздела

Notices

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 13.05.2006, 13:09   #2
Digital
Архивный участник
 
Join Date: Nov 2004
Posts: 1,405
Default

Assembly Registers Tutorial.
Everyone takes one look at Assembly and get scared because its looks so hard compared to VB, C and C++.
If you look closer at Assembly it is very close to c++, but smaller, faster and compact(not as much to learn also).
In this Tutorial i'm going to show you the basic's of Assembly Registers.

Registers
There are many Registers for Assembly. I will be explaining the common and useful ones.

Segment Registers
These types of Registers are for storing Data, Code and Video information few other things to.
CS FullName:Code Segment - Used to store a Code Segment.
DS FullNameata Segment - Used to store a Data Segment.
SS FullName:Stack Segment - Used to point to an active Stack Segment.
ES FullName:Extra Segment - Commonly used in video, can be used for other things.
Be careful when using these Registers you could damage you computer.

Index Registers
The common use for these is strings and arrays.
SI FullName:Source Index - Used by String Operations as a Source.
DI FullNameestination Index - Used by String Operations as the Destination.
IP FullName:Instruction Pointer - Stores the address to the next instruction, Also considered to be a Pointer Register

General Purpose Registers
This set of Registers are used for the common things done in all programming.
AX FullName:Accumulator Register - Used mostly for math(+,- and /,*), Data Input and Output.
BX FullName:Base Register - Used as a Base or Pointer to an index.
CX FullName:Count Register - Used to count like "++" in C/C++.
DX FullNameata Register - Used to hold data, offsets and for Character Output.
All of these Registers Have a Low and High bit Order .
AL-AH = AX
BL-BH = BX
CL-CH = CX
DL-DH = DX
One more thing they have is Extended 32-Bit Extensions.

Code:
=========================================
| EAX = EBX = ECX = EDX |
| ||| = ||| = ||| = ||| |
=========================================
| AH | AL | BH | BL | CH | CL | DH | DL |
=========================================
| AX | BX | CX | DX |
=========================================

Pointer Registers
This set of Registers are used for Stack Operations.
SP FullName:Stack Pointer - An instruction that points to the offset the Stack is using.
BP FullName:Base Pointer - Used to pass Data to and from the Stack.


DONE
Next will be "Assembly Memory Segmentation, Indentifiers and Statements".
- RetarT -
Digital is offline  
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 19:31.