home *** CD-ROM | disk | FTP | other *** search
/ Black Art of 3D Game Programming / Black_Art_of_3D_Game_Programming.iso / source / borland / chap_17 / qcpy.lst < prev    next >
Encoding:
File List  |  1995-05-25  |  2.3 KB  |  83 lines

  1. Turbo Assembler     Version 4.0        05/26/95 02:23:27        Page 1
  2. qcpy.asm
  3.  
  4.  
  5.  
  6.       1
  7.       2                     ; this    function performs a memory copy    from source to destination using 32
  8.       3                     ; bit moves
  9.       4
  10.       5        0000             .MODEL    MEDIUM             ; use medium memory model C function names
  11.       6
  12.       7        0000             .CODE                 ; begin the code segment
  13.       8
  14.       9                     .386
  15.      10
  16.      11                     PUBLIC    _fquadcpy          ; export function name to linker
  17.      12
  18.      13        0000             _fquadcpy PROC
  19.      14
  20.      15                     ARG dest:DWORD, source:DWORD, count:DWORD
  21.      16
  22.      17        0000  55             push bp         ; create stack frame
  23.      18        0001  8B EC             mov bp,sp
  24.      19
  25.      20        0003  57             push di         ; save a few registers
  26.      21        0004  56             push si
  27.      22        0005  1E             push ds
  28.      23
  29.      24
  30.      25        0006  FC             cld         ; clear the direction of movement
  31.      26
  32.      27        0007  C5 76    0A         lds si, source     ; point ds:si at source
  33.      28        000A  C4 7E    06         les di, dest     ; point es:di at destination
  34.      29
  35.      30        000D  66| 8B 4E 0E         mov ecx,count     ; move    into ecx number    of words
  36.      31        0011  F3> 66| A5         rep movsd     ; move    the data
  37.      32
  38.      33        0014  1F             pop ds         ; restore the registers
  39.      34        0015  5E             pop si
  40.      35        0016  5F             pop di
  41.      36
  42.      37        0017  5D             pop bp         ; restore the stack
  43.      38
  44.      39        0018  CB             ret
  45.      40
  46.      41        0019             _fquadcpy ENDP
  47.      42
  48.      43                     END
  49. Turbo Assembler     Version 4.0        05/26/95 02:23:27        Page 2
  50. Symbol Table
  51.  
  52.  
  53.  
  54.  
  55. Symbol Name              Type     Value
  56.  
  57. ??date                  Text     "05/26/95"
  58. ??filename              Text     "qcpy      "
  59. ??time                  Text     "02:23:26"
  60. ??version              Number 0400
  61. @32Bit                  Text     0
  62. @CodeSize              Text     1
  63. @Cpu                  Text     0F0FH
  64. @DataSize              Text     0
  65. @FileName              Text     qcpy
  66. @Interface              Text     00h
  67. @Model                  Text     4
  68. @WordSize              Text     4
  69. @code                  Text     qcpy_TEXT
  70. @curseg                  Text     qcpy_TEXT
  71. @data                  Text     DGROUP
  72. @stack                  Text     DGROUP
  73. _fquadcpy              Far     qcpy_TEXT:0000
  74. count                  Number [DGROUP:BP+000E]
  75. dest                  Number [DGROUP:BP+0006]
  76. source                  Number [DGROUP:BP+000A]
  77.  
  78. Groups & Segments          Bit Size Align  Combine Class
  79.  
  80. DGROUP                  Group
  81.   _DATA                  16  0000 Word      Public  DATA
  82. qcpy_TEXT              16  0019 Word      Public  CODE
  83.