马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
assume cs:code
datasg 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:[si] ;文字复制循环
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:[si],al
_do_not_change:inc si
jmp s
_out_: ret
code ends
end bigin
|