如何从内存中清除汉字系统
CODE SEGMENT
ASSUME CS:CODE,DS:CODE
mov ax,0000h
mov ds,ax;0000:0413h单元
mov ax,ds:[0413h];中文系统总RAM量
mov cx,0040h
mul cx;转换为节数
mov cx,ax
mov ax,3522h
int 21h;取22h中断向量入口
mov bx,0010h
mov ax,es:[bx];从PSP中得到实际段址
loop:mov ds,ax
dec ax
cmp byte ptr ds:[0000],4Dh;找到COMMAND常驻
jnz loop;部分的内存控制块
mov ax,ds:[0001]
add ax,ds:[0003]
mov ds,ax
add ax,ds:[0003]
inc ax;AX中现为汉字库起始段址
mov ds,ax
dec cx;CX中现为剩余空间长度
mov byte ptr ds:[0000],5Ah;造结束块
mov word ptr ds:[0001],0000h
mov word ptr ds:[00003],cx
mov ax,0F000h;恢复中断向量
mov ds,ax
mov dx,0F0A4H
mov ax,251Dh
int 21h
mov dx,0000h
mov al,lFh
int 21h
mov dx,0f065h
mov al,l0h
int 21h
mov dx,0E82Eh
mov al,l6h
int 21h
mov dx,0FF54H
mov al,05h
int 21h
mov dx,0EED2h
mov al,17h
int 21h
mov ax,0003h;置显示器为8025彩色文本方式
int 10h;
int 20h
CODE ENDS
END
(张家港市 史渊)