problem with MMX instructoin movq 
Author Message
 problem with MMX instructoin movq

I'm using the Visual C++ inline assembler as follows to change video memory
as follows:

BYTE *pVid = (BYTE*)ddsd.lpSurface // a pointer to video memory
int cnt = 40000;    // just testing for now

      movq     MM0, [pVid] ;
      movq     MM7, [pVid] ;
      paddb   MM0, MM7 ;

      movq     [pVid], MM0 ;        // this is the problem!

      add        [pVid], 8 ;
      sub         [cnt], 1 ;
      jnz          loop1  ;

      EMMS    ;


What this does is take the first 10000 pixels and double the color value at
each pixel.
at the movq [pVid], MM0 line, the pVid goes wild and any attempt the read it
results in a memory exception.

Any comments welcome!

Mon, 17 Dec 2001 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. P4 movq latency

2. problem with compiling mmx code

3. mmx per pixel alpha blending problem.

4. Intel MMX intrinsic function, compiler problem

5. Fortran problem with AMD K6/200 MMX

6. Support MMX??

7. TASM 3 / MMX instructions CMPXCHG ORG

8. mmx instructions

9. Using 3D-Now! and MMX in SQRT

10. Q about the mmx registers

11. Internal error 6003 on 300mhz MMX intel

12. MMX for Win32Forth ?


Powered by phpBB® Forum Software