第三次发了 汇编语言实验11
assume cs:codedatasg segment
db "Beginner's All-purpose Symbolic Instruction Code.",0
datasg ends
code segment
bigin:mov ax,datasg
mov ds,ax
mov si,0
call letterc
mov ax,4c00h
int 21h
letterc:
mov ax,0
s: mov al,byte ptr ds: ;文字复制循环
cmp al,0
je_out_
cmp al,20h ;遇到空格不改
je _do_not_change
cmp al,27h ;遇到单引号不改
je_do_not_change
cmp al,2eh ;遇到逗号不改
je_do_not_change
cmp al,2dh ;遇到横杠(减号)不改
je_do_not_change
and al,11011111b ;改成大写,因为大小写相差20h
mov byte ptr ds:,al
_do_not_change:inc si
jmp s
_out_: ret
code ends
end bigin
页:
[1]