home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / progm / assemutl.zip / INITMEM.ASM < prev    next >
Assembly Source File  |  1985-05-15  |  683b  |  32 lines

  1.     page    ,132
  2.  
  3. ;----------------------------------------------------------
  4. ;
  5. ; FUNCTION: This program initializes memory from
  6. ;        544k to 576k.
  7. ;
  8. ; Author: Malcolm McCorquodale III
  9. ;      3470 Locke Lane
  10. ;      Houston, Texas 77027
  11. ;      713 - 626 -4979
  12. ;
  13. ;----------------------------------------------------------
  14. cseg    segment 'code'
  15.     assume    cs:cseg
  16. initmem proc    far
  17.     push    ds    ; Linkage.
  18.     xor    ax,ax
  19.     push    ax
  20.  
  21.     cld        ; Set auto incr for string ops.
  22.     mov    cx,544*1024/16
  23.     mov    es,cx        ; ES = 544kb.
  24.     mov    cx,32*1024    ; Initialize 32kb.
  25.     xor    di,di        ; Offset into ES at which to start.
  26.     rep    stosb        ; Init memory.
  27.  
  28.     ret            ; Return to caller.
  29. initmem endp
  30. cseg    ends
  31.     end
  32.