第一题略
第二题:编程,将datasg段中每个单词的前4个字母改成大写字母
assume cs:codesg,ss:stacksg,ds:datasg
stacksg segment
dw 0,0,0,0,0,0,0,0
stacksg ends
datasg segment
db '1. display '
db '2. brows '
db '3. replace '
db '4. modify '
datasg ends
codesg segment
start: mov ax,stacksg
mov ss,ax
mov sp,16
mov ax,datasg
mov ds,ax
mov bx,0
mov cx,4
s: push cx
mov si,0
mov cx,4
s2: mov al,3[bx][si]
and al,11011111b
mov 3[bx][si],al
inc si
loop s2
add bx,16
pop bx
loop s
mov ax,4c00h
int 21h
codesg ends
end start