小编con*_*non的帖子

如何检查字符是否是汇编中的字母?

所以,我有一段代码设置边界来检查字符是否是字母(不是数字,不是符号),但我认为它不适用于大写和小写之间的字符。你能帮我吗?谢谢!

mov al, byte ptr[esi + ecx]; move the first character to al
cmp al, 0                  ; compare al with null which is the end of string
je done                    ; if yes, jump to done
cmp al, 0x41               ; compare al with "A" (upper bounder)
jl next_char               ; jump to next character if less
cmp al, 0x7A               ; compare al with "z" (lower bounder)
jg next_char               ; jump to next character if greater
//do something if it's a letter
next_char: …
Run Code Online (Sandbox Code Playgroud)

x86 assembly ascii

1
推荐指数
1
解决办法
2万
查看次数

标签 统计

ascii ×1

assembly ×1

x86 ×1