Download presentation
Presentation is loading. Please wait.
Published byErlin Chandra Modified over 6 years ago
1
CS-401 Computer Architecture & Assembly Language Programming
Lecture-18 String Instructions
2
Lets revise the last lecture
3
Multiply Instruction
4
String Instructions
5
stosb/stosw Store String
Transfer a byte/word from register AL/AX to the string element addressed by ES:DI and updates DI accordingly to point to the next location. DF = 0 increment DI DF = 1 decrement DI Flags Affected: NONE Uses: Fill a constant in a block of memory.
6
lodsb/lodsw Load String
Transfer a byte/word from the source location DS:DI to location AL/AX. SI is updated accordingly to point to the next location. Flags Affected: NONE Normally rep prefix is not used with lods.
7
scansb/scansw Scan String
Compares the source byte/word in register AL/AX. With the destination location ES:DI and updates the flags. DI is updated accordingly to point to the next location. Nothing changes except flags and DI. Flags Affected: A C O P S Z Uses: Locate a byte / Skip certain byte
8
movsb/movsw Move String
Transfers a byte/word from a source location DI:SI to the destination location ES:DI and updates SI and DI accordingly to point to the next location. Flags Affected: NONE Uses: Move block of memory
9
cmpsb/cmpsw Compare String
Subtracts the destination location ES:DI byte/word from source location DS:SI. Source and destination are unaffected. SI and DI are updated accordingly to point to the next location. Flags Affected: A C O P S Z Uses: Search a Substring
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.