汇编语言将一字符串中的小写字母转换为大写字母
2个回答
展开全部
将字符串中百字符一个度一个处理,如果是专小写字母属则转为大写
data
segment
str
db
'Hello
world',0
data
ends
stack
segment
sta
db
100
dup(?)
stack
ends
code
segment
assume:
cs:code,ds:data,ss:stack
main:
lea
si,
str
mov
di,
si
loop1:
mov
al,
[si]
test
al,
al
jz
over
cmp
al,
61
jl
noproc
cmp
al,
7a
jg
noproc
sub
al,
20
mov
[si],
al
noproc:
inc
si
jmp
loop1
over:
mov
si,
di
code
ends
end
main
data
segment
str
db
'Hello
world',0
data
ends
stack
segment
sta
db
100
dup(?)
stack
ends
code
segment
assume:
cs:code,ds:data,ss:stack
main:
lea
si,
str
mov
di,
si
loop1:
mov
al,
[si]
test
al,
al
jz
over
cmp
al,
61
jl
noproc
cmp
al,
7a
jg
noproc
sub
al,
20
mov
[si],
al
noproc:
inc
si
jmp
loop1
over:
mov
si,
di
code
ends
end
main
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询