home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / progm / assemutl.zip / INIT.ASM < prev    next >
Assembly Source File  |  1984-12-26  |  439b  |  27 lines

  1.     page    ,132
  2.  
  3. cseg    segment 'code'
  4.     assume    cs:cseg
  5. initmem proc    far
  6.     push    ds    ; Linkage.
  7.     xor    ax,ax
  8.     push    ax
  9.  
  10.     cld        ; Set auto incr for string ops.
  11.     mov    ax,40h
  12.     mov    ds,ax
  13.     mov    ax,ds:[72h]
  14.     cmp    ax,1234h
  15.  
  16.  
  17.     mov    cx,544/16*1024
  18.     mov    es,cx        ; ES = 544kb.
  19.     mov    cx,32*1024    ; Initialize 32kb.
  20.     xor    di,di        ; Offset into ES at which to start.
  21.     rep    stosb        ; Init memory.
  22.  
  23.     ret            ; Return to caller.
  24. initmem endp
  25. cseg    ends
  26.     end
  27.