UK Vintage Radio Repair and Restoration Powered By Google Custom Search Vintage Radio and TV Service Data

Go Back   UK Vintage Radio Repair and Restoration Discussion Forum > Specific Vintage Equipment > Vintage Computers

Notices

Vintage Computers Any vintage computer systems, calculators, video games etc., but with an emphasis on 1980s and earlier equipment.

Closed Thread
 
Thread Tools
Old 25th Oct 2010, 10:10 pm   #1
DAVEHALL
Retired Dormant Member
 
Join Date: Jan 2010
Location: Coventry, Warwickshire, UK.
Posts: 339
Default 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/
DAVEHALL is offline  
Old 25th Oct 2010, 11:42 pm   #2
mhennessy
Dekatron
 
Join Date: Jul 2007
Location: Evesham, Worcestershire, UK.
Posts: 4,241
Default 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
mhennessy is offline  
Old 26th Oct 2010, 9:41 am   #3
richrussell
Heptode
 
richrussell's Avatar
 
Join Date: Jul 2008
Location: Selby, North Yorkshire, UK.
Posts: 979
Default 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!
richrussell is offline  
Old 2nd Aug 2016, 9:28 pm   #4
Mad Mal
Tetrode
 
Join Date: Jul 2016
Location: Spennymoor, County Durham, UK.
Posts: 69
Default 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.
Mad Mal is offline  
Old 2nd Aug 2016, 9:52 pm   #5
Guest
Guest
 
Posts: n/a
Default Re: Spectrum BASIC.

For quick and dirty 'sums' (such as the generation of lookup tables) I use http://justbasic.com/
 
Old 2nd Aug 2016, 10:09 pm   #6
paulsherwin
Moderator
 
paulsherwin's Avatar
 
Join Date: Jun 2003
Location: Oxford, UK
Posts: 27,787
Default 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.
paulsherwin is offline  
Old 2nd Aug 2016, 10:20 pm   #7
mhennessy
Dekatron
 
Join Date: Jul 2007
Location: Evesham, Worcestershire, UK.
Posts: 4,241
Default 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...
mhennessy is offline  
Old 3rd Aug 2016, 4:26 am   #8
arjoll
Dekatron
 
arjoll's Avatar
 
Join Date: May 2006
Location: Invercargill, New Zealand
Posts: 3,440
Default 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.
arjoll is offline  
Old 3rd Aug 2016, 6:45 am   #9
grampy2
Retired Dormant Member
 
Join Date: Nov 2011
Location: Nottingham, Notts. UK.
Posts: 43
Default 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.
grampy2 is offline  
Old 3rd Aug 2016, 8:42 am   #10
dglcomp
Heptode
 
Join Date: Jul 2016
Location: Portland, Dorset, UK.
Posts: 870
Default 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.
dglcomp is offline  
Old 5th Aug 2016, 9:51 am   #11
Mad Mal
Tetrode
 
Join Date: Jul 2016
Location: Spennymoor, County Durham, UK.
Posts: 69
Default Re: Spectrum BASIC.

Quote:
Originally Posted by grampy2 View Post
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.
Windows 10 is Microsoft's departure from having DOS at it's root All that's left are some of the essential commands and a cut down Power Shell. 10 has become a Core with subsidiary Apps environment. Hence all the regular updates. So anyone with DOS games or programs will find they won't run(unless they are extremely lucky). Compatibility with Windows 2000 is also limited (some XP and Win7 progs have issues under 10). The idea with 10 is it can be easier to move to a multi-platform OS. It has its issues; I'd be the first to admit, but it's a wait and see system.
Mad Mal is offline  
Old 5th Aug 2016, 10:04 am   #12
ThePillenwerfer
Octode
 
ThePillenwerfer's Avatar
 
Join Date: Mar 2011
Location: Sheffield, South Yorkshire, UK.
Posts: 1,453
Default 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
ThePillenwerfer is offline  
Old 5th Aug 2016, 12:44 pm   #13
arjoll
Dekatron
 
arjoll's Avatar
 
Join Date: May 2006
Location: Invercargill, New Zealand
Posts: 3,440
Default Re: Spectrum BASIC.

Quote:
Originally Posted by Mad Mal View Post
Windows 10 is Microsoft's departure from having DOS at it's root All that's left are some of the essential commands and a cut down Power Shell.
None of the NT-based operating systems, all the way back to Windows NT 3.1, have been based on DOS. The last DOS-based Windows was Windows ME.

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.
arjoll is offline  
Old 5th Aug 2016, 1:38 pm   #14
Maarten
Dekatron
 
Join Date: Dec 2007
Location: Haarlem, Netherlands
Posts: 4,185
Default 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.
Maarten is offline  
Old 5th Aug 2016, 2:22 pm   #15
grampy2
Retired Dormant Member
 
Join Date: Nov 2011
Location: Nottingham, Notts. UK.
Posts: 43
Default Re: Spectrum BASIC.

I've got "small basic" on my W10 desktop.
grampy2 is offline  
Old 5th Aug 2016, 2:25 pm   #16
julie_m
Dekatron
 
Join Date: May 2008
Location: Derby, UK.
Posts: 7,735
Default 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"
, in ZX80 / 81 / Spectrum BASIC you would have to write
Code:
10 LET a$ = "Julie Woz Ere"
. Otherwise, the "a" at the beginning of the line, where a verb should be, would have given you NEW -- probably not what you wanted!
__________________
If I have seen further than others, it is because I was standing on a pile of failed experiments.
julie_m is offline  
Old 5th Aug 2016, 5:36 pm   #17
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,484
Default 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.
SiriusHardware is offline  
Old 5th Aug 2016, 8:38 pm   #18
TonyDuell
Dekatron
 
Join Date: Jun 2015
Location: Biggin Hill, London, UK.
Posts: 5,190
Default 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.
TonyDuell is offline  
Old 5th Aug 2016, 10:03 pm   #19
dseymo1
Retired Dormant Member
 
Join Date: Dec 2007
Location: Shropshire, UK.
Posts: 3,051
Default 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!
dseymo1 is offline  
Old 6th Aug 2016, 5:54 am   #20
arjoll
Dekatron
 
arjoll's Avatar
 
Join Date: May 2006
Location: Invercargill, New Zealand
Posts: 3,440
Default Re: Spectrum BASIC.

Quote:
Originally Posted by Maarten View Post
Mind you, the only Microsoft way to get anything resembling basic, is through MS Office, I think.
Visual Basic is part of Visual Studio - the community edition is free.
arjoll is offline  
Closed Thread

Thread Tools



All times are GMT +1. The time now is 7:55 am.


All information and advice on this forum is subject to the WARNING AND DISCLAIMER located at https://www.vintage-radio.net/rules.html.
Failure to heed this warning may result in death or serious injury to yourself and/or others.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright ©2002 - 2023, Paul Stenning.