Loading instructions, Basic Computer Science

They are particular register instructions. They are used to load bytes or sequences of bytes onto a register.LODS (LODSB) (LODSW)LAHFLDSLEALESLODS (LODSB) (LODSW) INSTRUCTIONGoal: To load sequences of a byte or a word into the accumulator.Syntax:LODSThis instruction takes the sequence found on the address specified by SI, loads it to the AL (or AX) register and adds or subtracts , depending on the state of DF, to SI if it is a bytes transfer or if it is a words transfer.MOV SI, OFFSET VAR1LODSThe first line loads the VAR1 address on SI and the second line receives the content of that locality to the AL register.• The LODSB and LODSW commands are used likewise, the first one loads a byte and the second one a word (it uses the whole AX register).LAHF INSTRUCTIONGoal: It transfers the full content of the flags to the AH register.Syntax:LAHFThis instruction is helpful to make sure the state of the flags through the execution of our program.LDS INSTRUCTIONGoal: used to load the register of the data segmentSyntax:LDS destiny, sourceThe source operator must be a dual word in memory. The word related with the largest address is transferred to DS, in other words it is taken as the segment address. The word associated with the lesser address is the displacement address and it is deposited in the register indicated as destiny.LEA INSTRUCTIONGoal: To load the address of the source operatorSyntax:LEA destiny, sourceThe source operator must be situated in memory, and its displacement is placed on the index register or specified pointer in destiny.