5. 4 二重循环将二维数组的某列、某矩形转大写
1. 把每一行的b都变成大写
assume cs:codesg,ds:data,ss:stack
data segmeNTstr db 'aaaaabbbbbccccc'db 'aaaaabbbbbccccc'db 'aaaaabbbbbccccc'db 'aaaaabbbbbccccc','$'
data endsstack segmentdb 10 dup(0)
stack endscodesg SEgmentstart:mov ax,datamov ds,axmov bx,0mov cx,4for:mov al,ds:str[bx+5]and al,11011111bmov ds:str[bx+5],aladd bx,16loop forlea dx,strmov ah,9int 21hmov ah,4chint 21hcodesg ends
end start
comment*for (int i = 0; i < ; i += 16)arr[i+5]转大写for (int i = 0;i <arr.size();i++){for (int j = 0; j < arr[0].size(); j++){cout << arr[2][5] << " ";}
}
cout << endl;*commnet
2. 把前五行a转变为大写A
assume cs:codesg,ds:data,ss:stack
data segmeNTstr db 'aaaaabbbbbccccc'db 'aaaaabbbbbccccc'db 'aaaaabbbbbccccc'db 'aaaaabbbbbccccc','$'
data endsstack segmentdb 10 dup(0)
stack endscodesg SEgmentstart:mov ax,datamov ds,axmov bx,0mov cx,4for:mov dx,cxmov si,0mov cx,5for1:mov al,ds:str[bx+si]and al,11011111bmov ds:str[bx+si],alinc siloop for1mov cx,dxadd bx,16loop forlea dx,strmov ah,9int 21hmov ah,4chint 21hcodesg ends
end start
comment*
bx
for (int i = 0;循环4次;i += 16){sifor (int j = 0;循环5次;j++){arr[j+i]转大写}
}*comment