home *** CD-ROM | disk | FTP | other *** search
- ; This program fills memory from the end of the program to 9FFFF with
- ; random values. This can help when trying to track down uninitialized
- ; variable problems.
- ; This program is public domain.
- ; Joe Ahlgren 92/04/03 BBS 703-241-7980 CSID 70461,2340
- ;
- ;
- assume cs:cseg,ds:cseg,es:cseg,ss:cseg
- cseg segment para public 'code'
- trashmem proc near
- xor ax,ax
- mov si,ax
- mov ds,ax
- mov cx,200h
- cld
- seed:
- rcl dx,1
- rcl bx,1
- lodsw
- adc dx,ax
- lodsw
- adc bx,ax
- loop seed
- ;
- mov ax,dx
- mov cx,es
- add cx,(LastByte-Trashmem+255+15)/16
- NextPara:
- xor di,di
- mov es,cx
- OnePara:
- mul cx
- xchg ax,bx
- add ax,dx
- rcl ax,1
- rcl bx,1
- adc ax,0
- stosw
- cmp di,16
- jb OnePara
- inc cx
- cmp cx,0a000h
- jb NextPara
- ;
- mov ax,4c00h
- int 21h
- LastByte dw 0
- trashmem endp
- cseg ends
- end
-
-
-