标签:
1 ;名称: letterc 2 ;功能: 将以0为结尾的字符串中的小写字母转变成大写字母 3 ;参数: ds:si指向字符串首地址 4 5 assume cs:code 6 7 data segment 8 db "Beginner‘s All-purpose Symbolic Instruction Code.",0 9 data ends 10 11 code segment 12 main: 13 mov ax,data 14 mov ds,ax 15 mov si,0 16 call letterc 17 18 mov ax,4c00h 19 int 21h 20 letterc: 21 push ax 22 push ds 23 push si 24 push cx 25 mov ch,0 26 27 lop: 28 mov cl,[si] 29 jcxz quit 30 cmp cl,‘z‘ 31 ja next 32 cmp cl,‘a‘ 33 jb next 34 and cl,11011111b 35 mov [si],cl 36 next: 37 inc si 38 jmp lop 39 quit: 40 pop cx 41 pop si 42 pop ds 43 pop ax 44 ret 45 code ends 46 end main
标签:
原文地址:http://www.cnblogs.com/linyuzhaozhao/p/4174194.html