![]() |
|
|
#2 |
|
Архивный участник
Join Date: Nov 2004
Posts: 1,405
|
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 FullName ata 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 FullName estination 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 FullName ata 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 - |
|
|
| Thread Tools | Search this Thread |
| Display Modes | |
|
|