home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / c / cl5sr386.zip / GO32 / DOUTILS.ASM < prev    next >
Assembly Source File  |  1992-04-13  |  2KB  |  85 lines

  1. ; This is file DOUTILS.ASM
  2. ;
  3. ; Copyright (C) 1991 DJ Delorie, 24 Kirsten Ave, Rochester NH 03867-2954
  4. ;
  5. ; This file is distributed under the terms listed in the document
  6. ; "copying.dj", available from DJ Delorie at the address above.
  7. ; A copy of "copying.dj" should accompany this file; if not, a copy
  8. ; should be available from where this file was obtained.  This file
  9. ; may not be distributed without a verbatim copy of "copying.dj".
  10. ;
  11. ; This file is distributed WITHOUT ANY WARRANTY; without even the implied
  12. ; warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  13. ;
  14.  
  15. ;    History:14,1
  16.     title    du_utils
  17.     .386p
  18.  
  19.     include build.inc
  20.     include    segdefs.inc
  21.     include tss.inc
  22.     include gdt.inc
  23.     include idt.inc
  24.  
  25. ;------------------------------------------------------------------------
  26.  
  27.     start_data16
  28.  
  29.     end_data16
  30.  
  31. ;------------------------------------------------------------------------
  32.  
  33.     start_code16
  34.  
  35.     extrn    _fclex:near
  36.  
  37.     public    __do_memset32
  38. __do_memset32:
  39.     push    cx
  40.     shr    cx,2
  41.     jcxz    nodset
  42.     db    67h        ; so EDI is used
  43.     rep    stosd
  44. nodset:
  45.     pop    cx
  46.     and    cx,3
  47.     jcxz    nobset
  48.     db    67h        ; so EDI is used
  49.     rep    stosb
  50. nobset:
  51.     jmpt    g_ctss
  52.  
  53. ;------------------------------------------------------------------------
  54.  
  55.     public    __do_memmov32
  56. __do_memmov32:
  57.     push    cx
  58.     shr    cx,2
  59.     jcxz    nodmove
  60.     db    67h        ; so ESI,EDI is used
  61.     rep    movsd
  62. nodmove:
  63.     pop    cx
  64.     and    cx,3
  65.     jcxz    nobmove
  66.     db    67h        ; so ESI,EDI is used
  67.     rep    movsb
  68. nobmove:
  69.     jmpt    g_ctss
  70.  
  71.  
  72. ;------------------------------------------------------------------------
  73.  
  74.     end_code16
  75.  
  76. ;------------------------------------------------------------------------
  77.  
  78.     start_code32
  79.  
  80.     end_code32
  81.  
  82. ;------------------------------------------------------------------------
  83.  
  84.     end
  85.