清屏处理(汇编)

;object: clear the the screen
;writer: mike
;time: 2020,11,09

assume cs:code,ss:stack,ds:data

data segment


data ends

stack segment stack


stack ends

code segment
start:        mov ax,0B800H
        mov es,ax
        mov di,0       ;数据到哪里去
        
        mov ax,0700H    ;白色背景
        mov cx,2000

clearScreen:    mov es:[di],ax   ;开始填充颜色
        add di,2
        loop clearScreen
            


code ends
start end
end

运行 t1.exe 之后

原文地址:https://www.cnblogs.com/zijidefengge/p/13946826.html