汇编程序18:利用and和or指令变换大小写
1 assume cs:code,ds:data 2 //and指令使某位变0,or指令使某位变1 3 data segment 4 db 'BaSic','iNfOrMaTiOn' //db指令:定义字节数据,与dw指令:定义字数据 5 data ends 6 7 code segment 8 start: 9 mov ax,data 10 mov ds,ax 11 mov bx,0 12 mov cx,5 13 s: 14 mov al,[bx] 15 and al,11011111B 16 mov [bx],al 17 inc bx 18 loop s 19 mov bx,5 20 mov cx,11 21 s0: 22 mov al,[bx] 23 or al,00100000B 24 mov [bx],al 25 inc bx 26 loop s0 27 mov ax,4c00h 28 int 21h 29 code ends 30 31 end start