assume cs:codesg,ds:data,ss:stack
data segmeNT
str db 'aaaaabbbbbccccc'
db 'aaaaabbbbbccccc'
db 'aaaaabbbbbccccc'
db 'aaaaabbbbbccccc','$'
data ends
stack segment
db 10 dup(0)
stack ends
codesg SEgment
start:
mov ax,data
mov ds,ax
mov bx,0
mov cx,4
for:
mov al,ds:str[bx+5]
and al,11011111b
mov ds:str[bx+5],al
add bx,16
loop for
lea dx,str
mov ah,9
int 21h
mov ah,4ch
int 21h
codesg 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 segmeNT
str db 'aaaaabbbbbccccc'
db 'aaaaabbbbbccccc'
db 'aaaaabbbbbccccc'
db 'aaaaabbbbbccccc','$'
data ends
stack segment
db 10 dup(0)
stack ends
codesg SEgment
start:
mov ax,data
mov ds,ax
mov bx,0
mov cx,4
for:
mov dx,cx
mov si,0
mov cx,5
for1:
mov al,ds:str[bx+si]
and al,11011111b
mov ds:str[bx+si],al
inc si
loop for1
mov cx,dx
add bx,16
loop for
lea dx,str
mov ah,9
int 21h
mov ah,4ch
int 21h
codesg ends
end start
comment*
bx
for (int i = 0;循环4次;i += 16){
si
for (int j = 0;循环5次;j++){
arr[j+i]转大写
}
}
*comment