Page 15 of 15
Re: Neolithic Tiny Basic
Posted: Mon May 05, 2025 9:26 am
by barnacle
It's been a bit quiet; I've been on holiday, was ill upon my return, and am now in the UK for a week visiting my ailing mother, but things have been happening.
BB8 has done some sterling work shrinking the code and adding new features, and I have a couple of new features to go it too - though I need to get rid of dead code and finish testing first... but to whet your appetites, TRON/TROFF, logic 'arithmetic', BREAK for FOR/NEXT and WHILE/WEND, looking at warm start after a reset... and still under 4kB. BB8 is a genius
When I've had a chance to review and test everything, there will be updates.
As a side note, might this 4k tiny basic be worthy of a formal place somewhere on here, or should I be waking up my html 'skills' and hosting it myself? I'm not overly fond of github and its friends.
Neil
Re: Neolithic Tiny Basic
Posted: Mon May 05, 2025 9:35 am
by BigEd
Yes there’s a source code section of the site
http://6502.org/source/
Where you’ll find VTL02 for example
Re: Neolithic Tiny Basic
Posted: Mon May 05, 2025 9:52 am
by barnacle
Cool, thanks. That looks like the place to put it, when it's done.
Neil
Re: Neolithic Tiny Basic
Posted: Sun May 18, 2025 3:30 pm
by barnacle
With the famous Mandelbrot modified to take advantage of new instructions, this
Code: Select all
10 print "Mandelbrot - Neo Tiny Basic"
20 print "Start"
30 let $ = ".,'~=+:;*%&$OXB#@ "
40 F = 50
50 for y = -12 to 12
60 for x = -49 to 29
70 c = x * 229 / 100
80 d = y * 416 / 100
90 a = c
100 b = d
110 i = 0
120 while i <= 16
130 q = b/f
140 s = b - (q * f)
150 t = ((a * a)-(b * b)) / f + c
160 b = 2 * ((a * q) + (a * s / f)) + d
170 a = t
180 p = a / f
190 q = b / f
200 if ((p * p) + (q * q)) >= 5
210 break
220 endif
230 i = i + 1
240 wend
260 print $[i];
300 next
310 print
320 next
330 print "finished"
completes in around four and a quarter minutes, on the '2MHz' Symon simulator.
Neil (still testing)
Re: Neolithic Tiny Basic
Posted: Sun May 18, 2025 3:35 pm
by BigEd
That's a milestone!
Re: Neolithic Tiny Basic
Posted: Sun May 18, 2025 7:09 pm
by barnacle
The code is derived from Gordon's code discussed upthread, but including the new 'break' feature and after removing a messy test/goto to print an indexed character or a space (I think that will work on Gordon's version directly; his code doesn't access the final space in the character string which I do if the loop doesn't break.)
Neil
Re: Neolithic Tiny Basic
Posted: Mon May 19, 2025 5:57 am
by barnacle
Also added: a warm start option if you've had to restart/reset the system. Saves a lot of typing if e.g. I've made changes to the basic source and reassembled and dropped a new 'rom' in the simulator, but not otherwise changed anything in memory.
The warm start happens if 'w' or 'W' is pressed at the message; anything else is a normal cold start.
I was amused last night to see a video from David Usagi in which he recovered a version of BASIC called BURP, for a Data General Nova, from what he said was the last digital tape holding it. He was impressed that it had automated indentation!
Neil