|
Vintage Computers Any vintage computer systems, calculators, video games etc., but with an emphasis on 1980s and earlier equipment. |
|
Thread Tools |
25th Oct 2010, 10:10 pm | #1 |
Retired Dormant Member
Join Date: Jan 2010
Location: Coventry, Warwickshire, UK.
Posts: 339
|
Spectrum BASIC.
Apologies if this is known ,but for those ( who like me ) have lost the programming book and would like to do some basic -this is a great little program for the PC .And there's a help section which gives examples of programming use .
If some use to any - great .If not -it's not cost anything . I like it - many's the time I'd like to see ( for example) what's the optimum value for something in an equation .Often it could involve a lot of fiddling.This way - set up a basic program ( designed to run on a z80, with little resources) and run it on a2.8g PC -answer in seconds .( or a good idea of the approx value for little effort) .Program os called BASin. http://www.worldofspectrum.org/sinclairbasic/ |
25th Oct 2010, 11:42 pm | #2 |
Dekatron
Join Date: Jul 2007
Location: Evesham, Worcestershire, UK.
Posts: 4,241
|
Re: spectrum basic
Interesting - although it beats me why anyone would want to use Spectrum BASIC when BBC BASIC is similarly available - indeed the Richard Russell's BB4W allows you to interact with the Windows API should you be so inclined. The free version is perfectly usable for small problems and projects.
Disclaimer - we had BBC Micros at school, and a second-hand Spectrum is all we could afford at home. I spent all my time wishing we had a BBC. So I'm afraid I'm rather biased Mark |
26th Oct 2010, 9:41 am | #3 |
Heptode
Join Date: Jul 2008
Location: Selby, North Yorkshire, UK.
Posts: 979
|
Re: spectrum basic
Spectrum Basic isn't bad - but even at age 12 I found it's limits and started dabbling in Z80 assembler. Admittedly it was nice and easy to POKE your code into a REM statement at the start of the program so you knew where to run it from.
Then when I moved on to an Atari ST around 1990 I never really got on with ST Basic or GFA Basic, so just picked up a 68000 assembler and pretty much programmed in assembly language from then onwards. Came in handy in my electronics degree - but I do struggle with higher programming languages. Even C is a bit high level for me at times! |
2nd Aug 2016, 9:28 pm | #4 |
Tetrode
Join Date: Jul 2016
Location: Spennymoor, County Durham, UK.
Posts: 69
|
Re: Spectrum BASIC.
One beautiful feature of Spectrum Basic (Later Spectrum Super Basic and Sam Coupe Basic) was the input interface. You could not enter a line that had incorrect syntax. Not many other variants of Basic around at the time did that. I believe that the system transferred to QL Basic (which was "structured" Basic like BBC Basic). It still didn't help if you made a stupid mistake elsewhere in the Program though. I wasn't bothered about the "limitations" of Sinclair Basic until I got one of those D'K Tronic 3 channel sound cards. That's when i fell back to writing routines in Z80 Machine code as I'd done in the ZX81 days. I could never understand why people using Microsoft and other Basics said that the way Sinclair Basic handled strings was clumsy or "quirky"... It was simple. Say you wanted a string to contain one character from another string.. in Sinclair basic you simply wrote Let A$ + B$ (n) where n was the character position or number in the string. The alternative in some other Basics needed you to specify which part of the string Left$, Mid $ or Right$ then which character to which character of Left, Mid , or Right string and how many characters... Tell me which sounds easier? The closest was the Basic on Atari 600 and 800 machines which asked you to specify the character position and the number of characters. A$(x,y) for example. If anybody wants a Copy of the Spectrum Basic hand book I think I still have mine. Some of the ring binder bound pages are loose now, but it should still be all there. Point to note. What made the Sinclair machines seem slow was not that the Basic was slow. it was the way that the Computer was constructed and how interrupts were handled, by the CPU and the ULA. To prove a point once a friend of mine more competent in Coding wrote a recompiled version of Sinclair Basic for the BBC... To the surprise of the hardened BBC Basic users ... The Sinclair Basic ran almost twice as fast as the BBC Basic. I wish we'd kept those EEproms and the expansion board they were on for the BBC B. But they got lost in a fire. I suppose it would be an interesting project to resurrect that recoded Basic.
|
2nd Aug 2016, 9:52 pm | #5 |
Guest
Posts: n/a
|
Re: Spectrum BASIC.
For quick and dirty 'sums' (such as the generation of lookup tables) I use http://justbasic.com/
|
2nd Aug 2016, 10:09 pm | #6 |
Moderator
Join Date: Jun 2003
Location: Oxford, UK
Posts: 27,787
|
Re: Spectrum BASIC.
There are lots of programming languages and development environments suitable for producing quick'n'dirty command line programs. The best one to use generally depends on your previous experience, but all BASICs are pretty horrible unless you don't know anything else. I used to use Turbo Pascal a lot, as it is surprisingly powerful and runs on minimal hardware. Nowadays I mostly write C and shove it through whatever compiler is native to the system I'm using.
|
2nd Aug 2016, 10:20 pm | #7 |
Dekatron
Join Date: Jul 2007
Location: Evesham, Worcestershire, UK.
Posts: 4,241
|
Re: Spectrum BASIC.
Turbo Pascal is what we used at university. I did run up an old machine a couple of months back to remind myself what I used to be able to do before I got old
Of all the BASICs, at least BBC BASIC supported named functions and procedures. Mixing assembly with BASIC was good fun as well - and learning 6502 was good grounding for PIC assembly and other similar microcontroller stuff. These days, I'm as likely to use Javascript or PHP as anything else. I might dabble with C, but rarely need the speed. They're all just tools... |
3rd Aug 2016, 4:26 am | #8 |
Dekatron
Join Date: May 2006
Location: Invercargill, New Zealand
Posts: 3,440
|
Re: Spectrum BASIC.
I used to do quite a bit of C (usually Microsoft Quick C) but that was a long time ago. Now, if I can't do it in the scripting language in the accounting software I do a lot of support for, I'll probably use either VB or C# depending what I need to do.
|
3rd Aug 2016, 6:45 am | #9 |
Retired Dormant Member
Join Date: Nov 2011
Location: Nottingham, Notts. UK.
Posts: 43
|
Re: Spectrum BASIC.
20 years ago I had a s/h IBM PC with GW basic on,I spent my spare time translating games in other dialects of Basic into GW for the benefit of my bored grand son from books in library. Progress to a better PCand W10 has meant that these either don't run or go so fast as to be unusable so they have long since been junked.
|
3rd Aug 2016, 8:42 am | #10 |
Heptode
Join Date: Jul 2016
Location: Portland, Dorset, UK.
Posts: 870
|
Re: Spectrum BASIC.
It's one good use for a raspberry PI, put RISC OS on it and you have both windowed and full screen BBC Basic available with the ability to use ARM assembler.
|
5th Aug 2016, 9:51 am | #11 | |
Tetrode
Join Date: Jul 2016
Location: Spennymoor, County Durham, UK.
Posts: 69
|
Re: Spectrum BASIC.
Quote:
|
|
5th Aug 2016, 10:04 am | #12 |
Octode
Join Date: Mar 2011
Location: Sheffield, South Yorkshire, UK.
Posts: 1,453
|
Re: Spectrum BASIC.
I never got anywhere with BASIC but could muddle along in Turbo Pascal.
Borland also produced Turbo BASIC but it had a bug whereby it would suddenly forget what REM meant. Thanks for the information about DOS and Windows 10, Mal. I knew DOS programs wouldn't run natively under 64-bit but had assumed they'd be OK on 32. — Joe |
5th Aug 2016, 12:44 pm | #13 | |
Dekatron
Join Date: May 2006
Location: Invercargill, New Zealand
Posts: 3,440
|
Re: Spectrum BASIC.
Quote:
I haven't noticed anything in the version of cmd.exe in Windows 10 that's any different to prior versions - and things like copy and paste have been made a lot more usable in 10. You can do a lot more in Powershell, but cmd.exe hasn't gone. You may be thinking of NTVDM, the 16 bit DOS emulator that shipped with 32 bit versions until 8.1, but that's an add on, not the "root," and it has never been shipped with 64 bit versions of Windows. If you really want to run 16 bit DOS programs in Windows 10, then use DOSBox. |
|
5th Aug 2016, 1:38 pm | #14 |
Dekatron
Join Date: Dec 2007
Location: Haarlem, Netherlands
Posts: 4,185
|
Re: Spectrum BASIC.
I've read that the Windows 10 anniversary update finally introduces bash as an alternative shell. It has been the industry standard in shells for well over 20 years.
Mind you, the only Microsoft way to get anything resembling basic, is through MS Office, I think. |
5th Aug 2016, 2:22 pm | #15 |
Retired Dormant Member
Join Date: Nov 2011
Location: Nottingham, Notts. UK.
Posts: 43
|
Re: Spectrum BASIC.
I've got "small basic" on my W10 desktop.
|
5th Aug 2016, 2:25 pm | #16 |
Dekatron
Join Date: May 2008
Location: Derby, UK.
Posts: 7,735
|
Re: Spectrum BASIC.
Spectrum BASIC introduced the verb LET for assigning variables.
By design, every statement had to begin with a verb, which was produced by a single keystroke. So where in "conventional" BASIC you might write Code:
10 a$ = "Julie Woz Ere" Code:
10 LET a$ = "Julie Woz Ere"
__________________
If I have seen further than others, it is because I was standing on a pile of failed experiments. |
5th Aug 2016, 5:36 pm | #17 |
Dekatron
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,484
|
Re: Spectrum BASIC.
I didn't know that 'LET' originated in Sinclair Basic but to be honest I applaud it.
I would always rather try to read and understand something like LET A=A+1 than A++ No prizes for guessing which of those two I find the most human-readable. |
5th Aug 2016, 8:38 pm | #18 |
Dekatron
Join Date: Jun 2015
Location: Biggin Hill, London, UK.
Posts: 5,190
|
Re: Spectrum BASIC.
Spectrum BASIC did not introduce LET. Nor did ZX81 BASIC or ZX80 BASIC. They all required LET to introduce assignment statements though.
The first personal computer (in my opinion), the HP9830 from 1973, had optional LET. You could type 10 X=A+B or 10 LET X=A+B Most other microcomputer BASICs did the same thing. I can't remember what the original Dartmouth BASIC did. Something tells me it required LET like the Sinclair machines did. |
5th Aug 2016, 10:03 pm | #19 |
Retired Dormant Member
Join Date: Dec 2007
Location: Shropshire, UK.
Posts: 3,051
|
Re: Spectrum BASIC.
BASIC (of whatever dialect) is more intuitive than it's usually given credit for.
A number of years ago, I attended an Excel course. A fellow participant, who claimed never to have done any coding, correctly anticipated BASIC syntax spontaneously once he had the general idea of a command line. Unfortunately, Excel's syntax often differs! |
6th Aug 2016, 5:54 am | #20 | |
Dekatron
Join Date: May 2006
Location: Invercargill, New Zealand
Posts: 3,440
|
Re: Spectrum BASIC.
Quote:
|
|