编程,将datasg段中每个单词的前4个字母改为大写。
源代码:
assume cs:codesg,ds:datasg
datasg segment
db '1. display '
db '2. brows '
db '3. replace '
db '4. modify '
datasg ends
codesg segment
start:
mov ax,datasg
mov ds,ax
mov bx,0
mov cx,4
s: mov si,3
mov cx,4
s0: mov al,[bx+si]
and al,11011111b
mov [bx+si],al
inc si
loop s0
add bx,16
loop s
mov ax,4c00h
int 21h
codesg ends
end start