请楼主看看我的源程序是否符合您的要求:
.model small
.data
.code
mov ax,@data
mov ds,ax
mov ax,0013h
int 10h
mov ax,0
mov ch,1
mov cl,0
mov si,199
again:mov dx,320
mov bx,1
next:call vga_color256
inc bx
dec dx
jnz next
inc ch
inc ax
dec si
jnz again
mov ah,0
int 16h
mov ax,0003h
int 10h
mov ax,4c00h
int 21h
vga_color256 proc near
push ax
push dx
push di
push es
mov dx,0a000h
mov es,dx
mov dx,320
mul dx
add ax,bx
mov di,ax
mov es:[di],ch
pop es
pop di
pop dx
pop ax
ret
vga_color256 endp
end
先要将显示模式切换到图形模式。
int 10h的0ch号功能可以在屏幕上画点,但效率很低,几乎没人用这种方法。在屏幕上画点基本上都是直接控制显卡,向显存中输出数据,各种显示模式的处理方法不同,你可以找一下VGA或者VESA方面的资料看一下,VGA是早期版本,主要是640*480分辨率16色模式,而且不易编程,VESA支持更高的显示模式,编程也比较容易。