and和or实现大小写转换
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
assume cs:code, ds:data data segment db 'test' db 'UPDATA' data ends code segment start: mov ax,data mov ds,ax mov bx,0 mov cx,4 s: ;将test转换成大写TEST mov al,ds:[bx] and al,11011111b ;dfh mov ds:[bx],al inc bx loop s mov bx,4 mov cx,6 s0: ;将UPDATA转换小写的Test mov al,ds:[bx] or al, 20h ;00100000b mov ds:[bx],al inc bx loop s0 mov ax,4c00h int 21h code ends end start end |
转载请注明:exchen's blog » 16位汇编 and和or实现大小写转换