assume cs:code,ds:data,ss:stack
data segment
db 'conversation',0
data ends;数据段
stack segment;栈段
db 128 dup(0)
stack ends
code segment;代码段
start:mov ax,stack
mov ss,ax
mov sp,128
mov ax,data
mov ds,ax
mov si,0
int 7ch
mov ax,4c00h
int 21h
code ends
end start
;===============================================
mov ax,cs
mov ds,ax
mov si,offset capital
mov ax,0
mov es,ax
mov di,200H
mov cx,offset capitalend-offset capital
cld
rep movsb
mov ax,0
mov es,ax
mov word ptr es:[lbk]7ch*4[rbk],200H
mov word ptr es:[lbk]7ch*4+2[rbk],0
mov ax,4c00h
int 21h
;===============================================
capital:push cx
push si
mov si,0
change:mov cl,ds:[lbk]si[rbk]
mov ch,0
jcxz ok
and byte ptr ds:[lbk]si[rbk],11011111B
inc si
jmp short change
ok:pop si
pop cx
iret
capitalend:nop
data segment
db 'conversation',0
data ends;数据段
stack segment;栈段
db 128 dup(0)
stack ends
code segment;代码段
start:mov ax,stack
mov ss,ax
mov sp,128
mov ax,data
mov ds,ax
mov si,0
int 7ch
mov ax,4c00h
int 21h
code ends
end start
;===============================================
mov ax,cs
mov ds,ax
mov si,offset capital
mov ax,0
mov es,ax
mov di,200H
mov cx,offset capitalend-offset capital
cld
rep movsb
mov ax,0
mov es,ax
mov word ptr es:[lbk]7ch*4[rbk],200H
mov word ptr es:[lbk]7ch*4+2[rbk],0
mov ax,4c00h
int 21h
;===============================================
capital:push cx
push si
mov si,0
change:mov cl,ds:[lbk]si[rbk]
mov ch,0
jcxz ok
and byte ptr ds:[lbk]si[rbk],11011111B
inc si
jmp short change
ok:pop si
pop cx
iret
capitalend:nop