Presentation is loading. Please wait.

Presentation is loading. Please wait.

Princess Sumaya Univ. Computer Engineering Dept. Chapter 9:

Similar presentations


Presentation on theme: "Princess Sumaya Univ. Computer Engineering Dept. Chapter 9:"— Presentation transcript:

1 Princess Sumaya Univ. Computer Engineering Dept. Chapter 9:

2 Princess Sumaya University – Computer Org. & Assembly Lang. Computer Engineering Dept. 1 / 10 String Operands String Operands Defaults Byte, Word or Double Element Size DS:SI Points to Source String ES:DI Points to Destination String Register Use is Limited to AL & AX Auto Increment or Decrement of the Index (Pointer)

3 Princess Sumaya University – Computer Org. & Assembly Lang. Computer Engineering Dept. 2 / 10 String Operations String Transfer Operations MOVS (Byte or Word) Memory DS SI Memory ES DI

4 Princess Sumaya University – Computer Org. & Assembly Lang. Computer Engineering Dept. 3 / 10 String Operations String Transfer Operations LODS (Byte or Word) Memory DS SI Memory ES DI AL

5 Princess Sumaya University – Computer Org. & Assembly Lang. Computer Engineering Dept. 4 / 10 String Operations String Transfer Operations STOS (Byte or Word) Memory DS SI Memory ES DI AL

6 Princess Sumaya University – Computer Org. & Assembly Lang. Computer Engineering Dept. 5 / 10 Repeated String Operations Repeated String Transfers REP, REPZ, REPNZ (REPE, REPNE) Example: Memory DS SI Memory ES DI

7 Princess Sumaya University – Computer Org. & Assembly Lang. Computer Engineering Dept. 6 / 10 Repeated String Operations Example: Copy String Memory DS SI ES DI

8 Princess Sumaya University – Computer Org. & Assembly Lang. Computer Engineering Dept. 7 / 10 Repeated String Operations Example: Convert to Lower Case Memory DS SI ES DI

9 Princess Sumaya University – Computer Org. & Assembly Lang. Computer Engineering Dept. 8 / 10 Repeated String Operations Example: B[i] = – A[i] Memory DS SI ES DI

10 Princess Sumaya University – Computer Org. & Assembly Lang. Computer Engineering Dept. 9 / 10 String Comparison Compare Two Strings CMPS (Byte or Word) Example:Find the First Mismatch Memory DS SI ES DI

11 Princess Sumaya University – Computer Org. & Assembly Lang. Computer Engineering Dept. 10 / 10 String Search Scan Destination String SCAS (Byte or Word) Example:Search for the Letter a Memory DS SI ES DI

12 Princess Sumaya University – Computer Org. & Assembly Lang. Computer Engineering Dept. Chapter 9


Download ppt "Princess Sumaya Univ. Computer Engineering Dept. Chapter 9:"

Similar presentations


Ads by Google