home *** CD-ROM | disk | FTP | other *** search
/ Black Art of 3D Game Programming / Black_Art_of_3D_Game_Programming.iso / source / borland / chap_17 / qset.asm < prev    next >
Encoding:
Assembly Source File  |  1995-05-25  |  811 b   |  40 lines

  1.  
  2. ; this function fills a region of memory using 32 bit stores
  3.  
  4. .MODEL MEDIUM                   ; use medium memory model C function names
  5.  
  6. .386
  7.  
  8. .CODE                           ; begin the code segment
  9.  
  10. PUBLIC _fquadset                 ; export function name to linker
  11.  
  12. _fquadset PROC
  13.  
  14. ARG dest:DWORD, data:DWORD, count:DWORD
  15.  
  16. push bp         ; create the stack frame
  17. mov bp,sp
  18. push di         ; save this just in case
  19.  
  20. cld             ; clear the direction of movement
  21.  
  22. les di, dest    ; point es:di at destination
  23. mov ecx, count  ; move into ecx number of quads
  24. mov eax, data   ; move the data into eax
  25. rep stosd       ; fill the region with data
  26.  
  27. pop di          ; restore di
  28. pop bp          ; fixup stack
  29.  
  30. ret             ; return to caller
  31.  
  32. _fquadset ENDP
  33.  
  34. END
  35.  
  36.  
  37.  
  38.  
  39.  
  40.