Write graphics pixels in 16-bit assembly

前端 未结 2 555
慢半拍i
慢半拍i 2021-01-15 13:37

I\'m trying to develop my own very basic operating system for educational purposes. While coding the kernel, I tried to set color to some pixels on screen to make it look be

2条回答
  •  渐次进展
    2021-01-15 14:23

    The following code displays, a pixel, in red. Color, nr, 4 namely. You must compile it with NASM, then it works.

    mov ax,13h        
    int 10h             
    mov ax,0A000h        
    mov es,ax             
    mov ax,32010          
    mov di,ax             
    mov dl,4             
    mov [es:di],dx        
    int 10h
    

提交回复
热议问题