您好,我正在尝试使用此代码在 DOS 视频模式下清除屏幕。
但是当我运行它时,点仍然存在!
org 100h
mov ah, 0 ; set display mode function.
mov al, 13h ; mode 13h = 640x480 pixels, 256 colors.
int 10h ; set it!
mov cx, 10 ; column
mov dx, 10 ; row
mov al, 15 ; white
mov ah, 0ch ; put pixel
int 10h ; draw pixel
; ------- clear the screen ----------
; ------- doesn't work! dot is still there
mov ax,0B800h
mov es,ax
xor di,di
xor ax,ax
mov cx,2000d
cld
rep stosw
; -------------------------------------
;wait for keypress
mov ah,00
int 16h
mov ax, 4c00h ; exit to operating system.
int 21h
;======================================================
我尝试使用 INT 10 重置视频模式,但这让我闪烁,这在我的循环中是不需要的