Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Neo6502 version #18

Open
paulscottrobson opened this issue Mar 29, 2024 · 0 comments
Open

Neo6502 version #18

paulscottrobson opened this issue Mar 29, 2024 · 0 comments

Comments

@paulscottrobson
Copy link

Slightly tweaked as BASIC does not allow jumping out of FOR loops, so replaced with a WHILE.

'
'	Matt Heffernan's BASIC benchmark
'
'	9.66s ; 6.29Mhz 65C02
'
cls
start = time()
for py= 0 to 21
	 for rx= 0 to 31
		 px = 31 - rx
		 xz = px*3.5/32-2.5
		 yz = py*2/22-1
		 x = 0
		 y = 0 
		 i = 0
		 while i <= 14 & x*x+y*y <= 4
			 xt = x*x - y*y + xz
			 y = 2*x*y + yz
			 x = xt
			 i = i + 1
		wend
		rect px*8,py*8 ink i-1 solid to px*8+7,py*8+7
	next 
next 
print (time()-start)/100
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant