实现代码:
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,datasg
mov ds,ax
mov bx,0 ;行
mov ax,stacksg
mov ss,ax
mov sp,10h ;初始化堆栈
mov cx,4
s0:push cx ;入栈
mov si,0 ;初始化列
mov cx,4
s:mov al,[bx+si+3]
and al,11011111B
mov [bx+si+3],al
inc si
loop s
add bx,16 ;下一行
pop cx
loop s0
mov ax,4c00h
int 21h
codesg ends
end start
调试
输入
结果