LESSON1 -
THE REGISTERS AND SEGMENTS
unlike other languages there is no predefined commands like "writeln", "printf",… assembly language doesnot provide those tools for you
So how does it work>?
Ok.. first they have predefine registers :
AX - accumulator index -\ BX - Base index | all of these are the data holders CX - Count index | DX - Data index -/ SP - Stack pointer -\ BP - Base pointer | SI - Source index | all of these are the pointing and index storage DI - Destination indec | registers IP - Instruction pointer -/ CS - Code segment -\ DS - Data segment | all of these are segments holder SS - Stack segment | ES - Extra segment -/ FLAGS - Holds some of the function conditions
now to be more specific :
Data registers : they are the basic registers for all the computer calcs, and position each of the registers is 16bit and they are divided into two registers high and low which are 8 bit : AX - ah (high), al (lo) BX - bh (high), bl (lo) CX - ch (high), cl (lo) DX - dh (high), dl (lo) high is MSB - most significent byte lo is LSB - least significent byte Pointing registers : each of these registers has an unique job : SP - is the offset of the stack (-n-) BP - a pointer for the stack (-n-) SI - is the source index, uses as an offset in memory transfers DI - is the destination index, uses as an offset in memory transfers IP - is the offset of the current instruction (-n-) (-n-) means don't change unless you know what your'e doing Segment registers : CS - is the segment of the code (-n-) DS - is the segment (usually) of the data SS - is the segment for the stack (-n-) ES - is an extra segment, uses for memory transfers Flags, will be disscussed later
|