Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question<.model tiny .486 smart .code org 0100h start: ;jmp pope ; demarrer le mode graphique mov ax,0013h int 10h ; ouvrir le fichier 'dessin.bmp' mov ax,3d00h mov dx,offset names int 21h ; le handle ds bx mov bx,ax ; le handle ds bp mov bp,ax ; on se place au debut de la palette mov ax,4200h xor cx,cx mov dx,36h int 21h ; resize mem bloc mov ah,4ah mov bx,65536/16 int 21h ; allocate mem mov ah,48h mov bx,65536/16 int 21h ; ret ax segment of allocate bloc mov bx,bp mov ds,ax push ax pop fs ; lire 1024 octets mov ah,3fh xor dx,dx mov cx,1024 int 21h mov di,1024+1 xor si,si mov cl, 0ffh ; envoie la palette du bmp a lecran paletteload: ; charge ds al le byte ds:si lodsb shr al, 2 mov [di+2], al lodsb shr al, 2 mov [di+1], al lodsb shr al, 2 mov [di+0], al inc si add di, 3 dec cl jnz paletteload mov si,1024+1 mov dx, 3c8h cld mov cl, 0ffh xor bx, bx palettemake: mov al, bl out dx, al inc dx lodsb out dx, al lodsb out dx, al lodsb out dx, al dec dx inc bl dec cl jnz palettemake mov bx,bp mov ax,4200h mov dx,0436h xor cx,cx int 21h ; lire fichier mov ah,3fh mov cx,0ffffh xor dx,dx int 21h ; ferme le fichier mov ah,3eh int 21h ;pope: mov cx,7070h mov ax,0000h add al,cl mov bl,ah xor bh,bh xor ah,ah mov dx,ax shl ax,6 shl dx,8 add ax,dx add bx,ax mov di,bx mov ax,0A000H mov es,ax xor si,si boucle: lodsb stosb dec cl jnz boucle mov cl,70h sub bx,320 mov di,bx dec ch jnz boucle mov ax,00 int 16h mov ax,0003 int 10h ret names db 'dessin.bmp',0 handlebmp dw 0 end start
Bravo