1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
| Debut: mov dx,00h ; x
mov ah,00h ; couleur
mov cx,00h ; y
mov al,13h ; Passe en mode graphique VGA 320x200x256
mov di,00h
int 10h
NextPix: ; Dessinne 1 pixel
jmp eti
suitepix:
mov ax,compt2
inc compt2
call Pixel
inc ax ; Incremente couleur
mov dx,ax ; Choisit un autre pixel
mov cx,ax
cmp dx,0FFh ; Si dx <> 320 on dessine le pix suivant
je suite
jne suitepix
Pixel: ; bx = rien dx = x (m) cx = y (m) al = couleur
imul cx,0140h ; multiplie cx par 320
mov bx,0a000h
mov es,bx ; segment : carte video
add dx,cx ; cx est ajouté dx
mov es:[di],al ; Dessine le pixel décrit dans al
inc di
call nextpix
suite:
mov compt2,0
jmp pixel |
Partager