I'm using the delays between user inputs to create an array of random bytes. Sometimes this program goes to the end, other times it stops recognizing keyboard input before the 80 characters are up and just hangs.
push cs
pop ds
mov ax,3
int 10h
mov ax,1300h
mov bx,7
xor dx,dx
mov bp,SeedString
mov cx,SeedStringEnd-SeedString
int 10h
mov bx,300h
mov Ax,0B800h
mov es,Ax
NextKey:
KeyWait:
mov ah,1
inc cx ;increment 'random' variable
int 16h ; check for key stroke
jz KeyWait ; exit loop on key stroke
cmp dl,al
jz KeyWait
mov dl,al
mov [bx],cx ; save 'random' variable to key space
mov [es:bx],al
mov ah,0
int 16h
inc bx
inc bx
cmp bx,300h+160
jl NextKey
int 20h
SeedString:
db 'Enter 80 characters';
SeedStringEnd: