#bbcmicro
3 Likes
2 Shares
One person like that
One person like that
2 Likes
2 Likes
One person like that
Today's coding, a Mandelbrot using integer variables only - for speed!
(Is it still structured Basic if you pack two IFs, a REPEAT and two FORs onto one line?)
100MODE7:REM A BASIC, ASCII MANDELBROT
110REM This implementation copyright (c) 2019-2021, Gordon Henderson
120REM Permission to use/abuse anywhere for any purpose granted, but
130REM it comes with no warranty whatsoever. Good luck!
140C$=".,'~=+:;[/<&?oxOX# " : REM Lightest to darkest...
150S=-2.0:T=1.25:P=2.5:Q=-2.5
160W%=32:H%=24:S%=2^13:M%=4*S%:B%=1:L%=LEN(C$)+1
170J=P/W%:U=Q/H%:Q%=TIME
180FORY%=0TOH%:R%=(U*Y%+T)*S%:V%=(S-J)*S%:FORX%=0TOW%:V%=V%+J*S%:D%=0:E%=0:A%=B%:REPEATIFA%<L% J%=D%*D%DIVS%:K%=E%*E%DIVS%:IFJ%+K%<M% Z%=J%-K%+V%:E%=(D%+D%)*E%DIVS%+R%:D%=Z%:A%=A%+1:UNTILFALSE
190UNTILTRUE:PRINT MID$(C$,A%-B%,1);
200NEXT:PRINT:NEXT
210PRINT:PRINT (TIME - Q%) / 100:END
7 Likes
8 Comments
1 Shares
2 Likes
EdS@mastodon.sdf.org: “Acorn's BBC micro was …”
Acorn's BBC micro was and is a most excellent machine to have and use!
I posted an overview here, with many links within:
http://forum.6502.org/viewtopic.php?f=3&t=3482
#retrocomputing #acorn #bbcmicro
@penguin42@mastodon.org.
Ed S (@EdS@mastodon.sdf.org)
One person like that