'===========================================================================
' Subject: GENERATE SIERPINSKI'S GASKET       Date: 08-09-98 (03:32)       
'  Author: Daniel Davies                      Code: ASIC                   
'  Origin: ia53@rapid.co.uk                 Packet: ASIC.ABC
'===========================================================================
rem sierpinski's gasket IFS
rem Generates sierpinskis Gasket
rem this has been optimised as much as possible for size
rem and when compiled and compressed with PK-Lite it is
rem exactly 2222 bytes long,


ax=&hex13
int86 (&hex10,ax,na,na,na,na,na,na,na,na)

defseg = &hexA000

tmp:
Temp = RND(0)

   a@ = .5
   d@ = .5
   e@ = 0
   f@ = 0

IF temp > 10813 THEN
    e@ = 1
ENDIF
IF temp > 21626 THEN
    e@ = .5
    f@ = .5
ENDIF

x@ = a@ * x@
x@ = x@+e@

y@ = d@ * y@
y@ = y@ + f@

xd@ = x@ + 0.05
xd@ = xd@ * 145


yd@ = y@ + .03
yd@ = yd@ * 185

off& = yd@*320
off& = off&+xd@

poke off&,15


text$ = INKEY$
IF text$ = "" THEN tmp:


ax=&hex03
int86 (&hex10,ax,na,na,na,na,na,na,na,na)
