I'm trying to set the VGA(640x480x16) color palette in assembler on DOSBox but specifically colors 6, 8-F don't change. I have tried using interrupts and directly through ports both work for other colors but not for those. I'm using DOSBox 0.74-3 on default config. Here is my code
setpalete MACRO index,r,g,b
mov ax, 1010h
mov bx, index
mov ch, r
mov cl, g
mov dh, b
int 10h
ENDM
Start:
mov ax, 0A000h
mov es, ax
;set video mode to 640x480 16 color ah=0 al=12h int 10h
mov ax, 12h
int 10h
setpalete 06h,030h,030h,030h
mov dx, 03C4h ;dx = indexregister
mov ah, 06h ;Color
mov al, 02h ;register select - map mask
out dx, ax ;select the bitplanes.
mov al, 0FFh
mov di, 0
mov cx,38400
rep stosb
and here is setting the pallet using ports
setpalete MACRO index,r,g,b
mov dx, 3c8h
mov al, index
out dx, al
mov dx, 3c9h
mov al, r
out dx, al ; set R
mov al, g
out dx, al ; set G
mov al, b
out dx, al ; set B
ENDM
thanks in advance