Correct command

3

Hello friends of Stackoverflow, I have a silly question about Assembler , I would like to know if this command is correct, and if it is not correct because it is not correct?

Mov Al,Ah

thank you very much.

    
asked by Julio Mizrahi 26.01.2018 в 16:25
source

1 answer

2
  

Mov Al, Ah

Try to put the assembly instructions in uppercase all letters or all in lowercase.

If you have a variable AX . AL is the "low" part of AX consisting of 8 bits or a "byte" and AH is the "high" part of AX also consisting of 8 bits or a "byte".

AL is also referenced as the least significant part of AX while AH is also referenced as the most significant part of AX .

Specifically MOV AL,AH is a perfectly valid instruction which reads as: Copy the upper part (AH) of the 16 bit register AX to the lower part (AL) or what is the same overwrites the value of the least significant part (AL) of AX with the value of the most significant part (AH). As both registers are 8 bits each there is no problem in moving the bits from one to another.

    
answered by 26.01.2018 / 20:15
source