delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/04/29/21:17:37

From: qballlives AT aol DOT com (QBallLives)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: What is wrong with this?
Lines: 40
Message-ID: <1998042923075400.TAA24914@ladder03.news.aol.com>
NNTP-Posting-Host: ladder03.news.aol.com
Date: 29 Apr 1998 23:07:54 GMT
Organization: AOL http://www.aol.com
References: <Eg8LYAA+z3R1Ew3b AT talula DOT demon DOT co DOT uk>
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

>Lennart Marien writes:
>>I try to change the pallette in VESA Mode 101h(640x480x256), using the
>>Interrupt number 0x10:
>
>>int *sel;
>>int seg;
>>
>>seg=__dpmi_allocate_dos_memory((768+15)>>4,sel);
>
>You aren't initialising your sel pointer, so the return value from
>__dpmi_allocate_dos_memory() will be stored at some random address. You
>should declare it as a normal int, and then pass &sel to the DPMI
>function.
>
>Better suggestion: instead of allocating your own conventional memory
>region, use the transfer buffer that is already being maintained by the
>djgpp libc. See the djgpp FAQ section 18.2 for details.
>
>Even better suggestion: don't bother to call the BIOS at all. Instead,
>write the index of the color you want to change to port 0x3C8, and then
>three color values (r, g, and b, range 0-63), to port 0x3C9. See the
>DJGPP User's Guide on www.delorie.com for more information and example
>code.
>
>
>--
>Shawn Hargreaves - shawn AT talula DOT demon DOT co DOT uk - http://www.talula.demon.co.uk/
>"Pigs use it for a tambourine" - Frank Zappa

There's a USER'S GUIDE NOW???

Holy Crap - I'm on my way!

Thanks for Allegro - you speedster....


Jim the loiterer
aloiterer AT juno DOT com
http://members.xoom.com/JimMcCue/index.htm
(Jim the loiterer's PC games, programming, & stuff...)

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019