Comparing Strings
来源:互联网 发布:网络套路是什么意思 编辑:程序博客网 时间:2024/06/11 07:56
The CMPS family of instructions is used to compare string values.
❑ CMPSB: Compares a byte value
❑ CMPSW: Compares a word (2 bytes) value
❑ CMPSL: Compares a doubleword (4 bytes) value
Each time the CMPS instruction is executed, the ESI and EDI registers are incremented or decrementedby the amount of the data size compared, depending on the DF flag setting.
The CMPS instruction subtracts the destination string from the source string, and sets the carry, sign, overflow, zero, parity, and adjust flags in the EFLAGS register appropriately.
❑ CMPSB: Compares a byte value
❑ CMPSW: Compares a word (2 bytes) value
❑ CMPSL: Compares a doubleword (4 bytes) value
Each time the CMPS instruction is executed, the ESI and EDI registers are incremented or decrementedby the amount of the data size compared, depending on the DF flag setting.
The CMPS instruction subtracts the destination string from the source string, and sets the carry, sign, overflow, zero, parity, and adjust flags in the EFLAGS register appropriately.
After the CMPS instruction,you can use the normal conditional jump instructions to branch, depending on the values of the strings.
.section .datavalue1:.ascii “Test”value2:.ascii “Test”.section .text.globl _start_start:nopmovl $1, %eaxleal value1, %esileal value2, %edicldcmpslje equalmovl $1, %ebxint $0x80equal:movl $0, %ebxint $0x80
阅读全文
0 0
- Comparing Strings
- Comparing Strings
- Comparing strings (C)
- A. Comparing Strings
- Java源码-字符串大小比较(Comparing Strings)
- comparing strings in PHP with the == operator
- Java源码-判断两个字符串的子字符串是否匹配(Comparing Portions of Strings)
- Comparing Values
- Strings
- Strings
- strings
- Strings
- Strings
- Strings
- strings
- Strings
- Comparing Pointers and References
- Comparing C++ and Java
- 全栈必备Linux 基础
- Java实现XSS防御
- HttpServletRequest相关内容
- 设置nexus开机自启动
- 在pycharm下创建Django项目,创建web管理段的账号密码
- Comparing Strings
- Charles之App开发使用
- Vue如何支持JSX语法
- OGG-00868 的解决办法(RAC节点)
- 机器学习实战(第3章 决策树)
- JQuery四、
- [jeecms]获取父栏目下的子栏目名称
- 基于Spring Boot和Spring Cloud实现微服务架构学习
- 局域网游戏联机大厅建主模式实现附(Unity)