From: "Lennart Marien" Newsgroups: comp.os.msdos.djgpp Subject: What is wrong with this? Date: Wed, 29 Apr 1998 12:38:53 +0200 Organization: Metronet Lines: 39 Message-ID: <6i7002$2ka$1@news.metronet.de> NNTP-Posting-Host: hamburg1.pop.metronet.de To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Hi! I try to change the pallette in VESA Mode 101h(640x480x256), using the Interrupt number 0x10: The variable pal holds 768 RGB values char pal[768]; __dpmi_regs r; int *sel; int seg; seg=__dpmi_allocate_dos_memory((768+15)>>4,sel); _dosmemputb(&pal,768,seg * 16 + 0); /*My DOSMem should contain value of pal now */ r.x.ax=0x1012; /*ah==0x10 al==0x12 (correct?)*/ r.x.bx=0; /*bx first color to set*/ r.x.cx=256; /*number of colors to set*/ r.x.es=seg; /*segment of my DOSMem*/ r.x.dx=0; /*Offset of my DOSMem*/ __dpmi_int(0x10,&r); /*call interrupt*/ What the hell is wrong with it? I always get a "general protection fault" Something wrong with the _dosmemputb? Is there another way of changing the pallette instead of calling real mode interrupts? thanks in advance! cu