delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/01/24/22:07:34

Date: Wed, 24 Jan 1996 21:59:56 -0500
To: djgpp AT delorie DOT com
From: Alain Beaupre <abeaupre AT mediom DOT qc DOT ca>
Subject: Re: Memory movement to Seg A000

At 07:11 1996/01/24 GMT, you wrote:
>Hiya Peoples,
>
>Can any body help me here...(And I know someone knows this:))..
>
>Under DJGPP V2, how do I move a block of memory to Segment A000 (VGA 
>card).??
>
>Thanks in advance for any help.
>
>  Cheers
>    Dave
>
>

Here is a example :


#define HW_copy_int(src,dst,lng)  asm("movl  %0,%%esi \n"             \
                                      "movl  %1,%%edi \n"             \
                                      "movl  %2,%%ecx \n"             \
                                      "cld \n"                        \
                                      "rep \n"                        \
                                      "movsl (%%esi),(%%edi) \n"      \
                                      ::"g" (src),"g" (dst),"g" (lng) \
                                      :"esi","edi","ecx"              \
                                     )



void HW_blit(void)
{
    __djgpp_nearptr_enable();
    HW_copy_int((int*)HW_colourmap,(int*)(__djgpp_conventional_base +
0xa0000),HW_COLOURMAP_SIZE_INT);
    __djgpp_nearptr_disable();

}

------------------------------------------------------------------------------
Alain Beaupre
Tel   : 418-849-3565
Email : abeaupre AT mediom DOT qc DOT ca
------------------------------------------------------------------------------

- Raw text -


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