0 Members and 1 Guest are viewing this topic.
;---------------------------------------; Simple ASM picture loader by Rbraz 2006; Compile with FASM 1.66;---------------------------------------;-------------- COM file org 100h;-------------- Video Mode-X ---> 320x200x256 color palette mov al,13h int 10h push 0a000h  ; ES = 0A000h pop es    ; xor di,di   ; offset;-------------- Load picture palette mov si,Pal mov cl,00h.palette: mov  dx,3c8h mov  al,cl   ;[col] out  dx,al inc  dx mov  al,[si]  ;[r] inc  si     ; Inc "si" out  dx,al mov  al,[si]  ;[g] inc  si     ; In "si" out  dx,al mov  al,[si]  ;[b] out  dx,al inc  si     ; Inc "si" inc cl cmp cl,255 jne .palette;-----------------------------------;---------------- Main function --------------Main:    mov si,DBF_Pic   ; our Picture offset    mov cx, 51200    ; Loop 51200 times    xor di,di.loop1:    movsb        ; stores byte    LOOP .loop1;------------------ Loop until not key hit = ESC in  al,60h cbw dec ax jnz Main;----------- Back to text mode mov  ax,03H int  10h;----------- Exit to DOS mov  ax,4c00h int  21h;----------------------------------------------- DATA -------------------------------------------------------Pal: include "dbf.bmp.pal.asm"DBF_Pic: include "dbf.bmp.raw.asm"
Does it support other image types?