| 1. |
Load and store strings |
|
Answer» Load and store strings :(LOD SB/LOD SW and STO SB/STO SW) LOD SB: Loads a byte from a string in memory into AL. The address in SI is used relative to DS to determine the address of the memory location of the string element. (AL) ← [(DS) + (SI)] (SI) ← (SI) + 1 LOD SW : The word string element at the physical address derived from DS and SI is to be loaded into AX. SI is automatically incremented by (AX) ← [(DS) + (SI)] (SI) ← (SI) + 2 STO SB : Stores a byte from AL into a string location in memory. This time the contents of ES and DI are used to form the address of the storage location in memory [(ES) + (DI)] ← (AL) (DI) ← (DI) + 1 STO SW :[(ES) + (DI)] ← (AX) (DI) ← (DI) + 2 Mnemonic Meaning Format Operation Flags affected MOV SB Move String Byte MOV SB ((ES)+(DI))←((DS)+(SI)) (SI)←(SI) m 1 (DI) ← m 1 None MOV SW Move String Word MOV SW ((ES)+(DI))←((DS)+(SI)) ((ES)+(DI)+1)←(DS)+(SI)+1) (SI) ← (SI) m 2 (DI) ← (DI) m 2 None LOD SB / LOD SW Load String LOD SB/ LOD SW (AL) or (AX) ←((DS)+(SI)) (SI)←(SI) m 1 or 2 None 33 STOSB/ STOSW Store String STOSB/ STOSW ((ES)+(DI))←(AL) or (AX) (DI) ← (DI) 71 or 2 None |
|