【发布时间】:2018-08-13 13:11:37
【问题描述】:
section .data
msg db "sum of x and y is " ;String
section .text
global _start
_start:
Change_letter:
mov ECX, -1 ;set counter
mov ESI, [msg] ; move string address to ESI
mov Eax , 32 ; mov 32 to eax for change lowercase to uppercase
startloop:
inc ecx ;
cmp byte [ESI+ecx], 0x00 ;compare with null
jne end
cmp byte [ESI+ECX], 0x61 ; compare with lower bound of lowercase
jl startloop
cmp byte [ESI+ECX], 0x7A
jg startloop
add byte [ESI+ECX], eax
end:
ret
【问题讨论】:
-
学习使用调试器。提示:你认为
jne end会做什么? -
你们必须承认这个程序运行得非常快。