汇编 Att if 语句

问题描述

我有来自输入的单词,我想更改 ascii 代码小于 100 的(+13 个 ascii 值)字母 - if(char[index] S ( ASCII 83)) 但它除了循环外不起作用。

c 代码

char a[4] = "TEXT";
for(int i = 0; i < 4; i++)
{
    if(a[i]<100){
        a[i]+=13;
    }
}
.data
input: .space input_len

_start:
mov $SYSREAD,%eax
mov $STDIN,%ebx
mov $input,%ecx
mov $input_len,%edx
int $SYSCALL32

mov %eax,%esp
dec %esp // get rid of \n from input string
mov $0,%ebp //loop index

loop:
cmp $100,input(%ebp) // input is string that user wrote in console
jg et_elseif
add $13,input(%ebp)
et_elseif:
inc %ebp
cmp %esp,%ebp
jl loop

如何在汇编中正确比较字符的 if 语句,因为显然我的代码不起作用

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)