.MODEL SMALL .CODE .STACK 200h .286 put_pixel PROC ; limited pp. bh is y bl is x dl is color mov ax,0A000h mov ES,AX xor AX,AX xchg AH,BH add BX,AX ShR AX,2 add BX,AX mov AL,dl mov ES:[BX],AL ret put_pixel ENDP set_colors PROC mov DX,03c8h ; Put port no. into dx XOR AX,AX ; Clear AX (to be pallette 0) out DX,AL ; point other port at 0 mov DX,03c9h ; Pallette slot port setslot: xchg AH,AL ; DX only likes al or ax out DX,AL ; Red 0 out DX,AL ; Green 0 xchg AH,AL ; now it's blue! out DX,AL ; Blue AL cmp AL,62 ; Is AL 62 yet? jz out_of_colors ; if yep, leave inc AL ; if not, AL++ jmp setslot ; and keep setting out_of_colors: mov AL,40h towhite: xchg AL,AH out DX,AL out DX,AL xchg AH,AL mov AL,63 out DX,AL cmp AH,40h jz out_of_white inc AH jmp towhite out_of_white: mov AL,63 mov AH,63 ;okay, down to black again toblue: xchg AH,AL out DX,AL out DX,AL xchg AH,AL mov AL,63 out DX,AL cmp AH,0 jz out_of_blue dec AH jmp toblue out_of_blue: toblack: xchg AH,AL out DX,AL out DX,AL xchg AH,AL out DX,AL cmp AL,0 jz im_done_with_the_fucking_palette dec AL jmp toblack im_done_with_the_fucking_palette: ret set_colors ENDP draw_flac PROC mov ax,0013h int 10h call set_colors ; set dem colors clearr: xor AX,AX xor BX,BX xor CX,CX xor DX,DX zloop: ; mooove controls pop cx inc cl inc ch push cx mainn: push BX mov DX,BX add dl,cl ; actual move-y part add dh,ch and DL,DH call put_pixel pop BX inc BL cmp BL,255 jnz mainn mov BL,00 inc BH cmp BH,199 jnz mainn mov bh,00 mov ah,1 ; test for char to leave int 16h jz zloop mov AX,0003h ; text mode int 10h mov AX,4c00h ; goodbye int 21h draw_flac ENDP END draw_flac