In: Computer Science
1) Draw a diagram showing the relationship of the EDX, DX, DL and DH registers. Page 29 shows EAX that you can follow as a template.
2) What does the program counter (EIP register in 80x86) point to?
1) Relationship of register EDX,DX,DH and DL
Register EDX is a 32 bit General Purpose Register. This is also called as Data Register and it is used for I/O port access,arithmetic and Interrupt processes.
As the diagram shows,
a) it can be used as one 32 bit register named EDX (Extended DX)while you deal with 32 bit data as follows
MOV EDX, 12141618h //12141618h is a 32 bit long hexadecimal value
or
b) the lower 16 bits of this register named as DX and can be used as a 16 bit register while you deal with 16 bit data as follows
MOV DX,1214h //1214h is a 16 bit long hexadecimal data and that will be loaded into register DX
or
c) the lower 16 bits of this register can again be splitted into two 8 bit registers named DH and DL(where H indicates Higher and L indicates Lower) while you deal with 8 bit data.
But please remember we cannot use all these registers at the same time because it is one register. Only DH and DL can be used at the same time as follows
MOV DH,12h //it load 12h into register DH
MOV DL.11h //it load 11h into register DL
2) Program Counter or Extended Instruction Pointer(EIP)
EIP is a 32 bit register in x86 microprocessor family. It is used to get the address of the next instruction to be executed. The value loaded into decides the program execution flow.