REM points.bas

m= val (programarg$ (1) )
if m = 0 then m= 1

h= val (programarg$ (2) )
if h = 0 then mode m : else mode m, h

numpoints= val (programarg$ (3) )

label init

d= sysvarptr
rem w= PEEK (d) + 256 * PEEK (d + 1)
w= peek16 (d)
rem h= PEEK (d + 2) + 256 * PEEK (d + 3)
h= peek16 (d + 2)

randomize time

if numpoints = 0 then numpoints = w * h / 10

for i= 1 to numpoints
	color rnd * 16
	x= rnd * w
	y= rnd * h
	plot x, y
next i

get a$

end
