2012-11-11, 05:05 PM 
		
	
	
		This program was posted on the WOS forums:
And if run as is, takes about 9 seconds in Basic, I think.
As ZX Basic:
It takes 53 seconds!
	
	
	
	
Code:
For x=-100 To 100
For y=-100 To 100
If (x/2-25)*(x/2-25)+(y-50)*(y-50)<200 Or (x/2+25)*(x/2+25)+(y-50)*(y-50)<200 then plot x+100,96-y
Next y
Next xAnd if run as is, takes about 9 seconds in Basic, I think.
As ZX Basic:
Code:
FUNCTION t() as uLong
asm
    DI
    LD DE,(23674)
    LD D,0
    LD HL,(23672)
    EI
end asm
end function
DIM x,y as integer
DIM time as uLONG
time=t()
For x=-100 To 100
For y=-100 To 100
If (x/2-25)*(x/2-25)+(y-50)*(y-50)<200 Or (x/2+25)*(x/2+25)+(y-50)*(y-50)<200 then plot x+100,96-y
END IF
Next y
Next x  
time=t()-time
print CAST(float,time)/50It takes 53 seconds!

