8 ms·
BASIC was not just a programming language
- mcbishop 3y ago> The Amstrad CPC 646 would literally take less than a second to boot Wow.
- Doctor_Fegg 3y agoEverything was in ROM: 16k BASIC, 16k operating system, optional 16k disk operating system. The 464 (“646” is a typo) shipped with a cassette deck, not a floppy disk drive, so there was no possibility of loading the OS from volatile storage.
- masswerk 3y ago> so there was no possibility of loading the OS from volatile storage. There are exceptions to this rule: Sharp was known for their concept of "clean computers" (MZ series and X1), which came only with a simple monitor in ROM, while at the same time featuring just a cassette drive to load a BASIC interpreter (of which there were several flavors) from.
- ikari_pl 3y agoAnd Amstrad PCW had boot code in the printer controller, to save on ROM prices :D, and booted from a floppy only (by default to a CP/M as well)
- sedatk 3y agoYou could attach an external floppy drive (I believe it was called FDD-1) to CPC464 and run CP/M 2.2 on it. https://www.cpcwiki.eu/index.php/CP/M_2.2 https://www.cpcwiki.eu/index.php/CP/M_2.2
- Doctor_Fegg 3y agoDDI-1. It was a package including the disk interface (with AMSDOS in ROM and CP/M 2.2 partly in ROM) plus the drive itself. The FDD-1 was an optional second drive but you had to have the DDI-1 first.
- CJefferson 3y agoThey could have typoed '664', which was the 464 with a floppy disk drive. However there basic was still in the ROM.
- Doctor_Fegg 3y agoIndeed. I still have my 664 in the loft somewhere!
- UncleSlacky 3y agoThey're worth quite a bit these days as they were rapidly replaced on the market by the 6128 (which is in my loft).
- CJefferson 3y agoWow, I had no idea! There might be a 664 in box in my parent's house somewhere -- although it also might have been discarded some time in the last 20 years (as I imagine happened to many of them).
- ghusbands 3y agoIt was a typo for 464 - you can tell by the video it links to.
- 082349872349872 3y agoI once read about an OS that booted before the floppy had fully spun up, and was inspired, only to discover when I tried it myself that at computer speeds, even with the floppy seek to load a kernel from a FAT image, it's actually rather easy. (to be fair, I think media corruption was more common back then, so boot-time file system checks and other sanity checks may have been what kept mainstream boots slower?)
- flohofwoe 3y agoLoading speed for cassette tapes and floppy disks was measured in bits per second at the time (usually between a few hundred to a few thousand bps), that was just what the hardware could handle, even without expensive error correction ;)
- zozbot234 3y agoMakes a lot of sense, too. Why would you even want to load data faster than you can read it on screen, or print it out on paper? That's just a waste for such a minor increase in overall speed.
- fuzzfactor 3y ago>literally take less than a second to boot Literally, completely wrong. More like less than a second after power-up to reach full usefulness at the command line. These type computers did not need to actually boot their OS from a "peripheral" storage device. They did not "boot" at all, they just ran the built-in OS/BASIC straight from where it was contained on ROM. This was like the C64 which had its BASIC in internal ROM too. With the early Atari's the internal ROM was more like a skeletal BIOS which ran whichever ROM cartridge you had in the game slot, whether it was a commercial game or not. And the Atari BASIC command line was only available if you had the BASIC cartridge inserted where a game would otherwise be. RAM and storage were almost all yours.
- benj111 3y agoDefine boot. Booting doesn't require loading an os. And if we include dos as an os, I'm not even sure of the conceptual difference between booting basic and booting dos. The only major thing is device discovery and setup etc. But even the 8 bits had to start up the screen output routines, so I would still classify that as 'booting'
- ikari_pl 3y agoon the Amstrad computers, and that's the context, BASIC was an interpreter on top of AMSDOS, which is a DOS, and an OS (just without any UI) indeed. It's AMSDOS that provided hardware and disk handling, while BASIC could focus on running BASIC code. I think even the graphics routines (like setting a pixel) may have been implemented in AMSDOS, but not sure - and the line between two is blurry from user perspective. While those are two ROMs by two companies, they were developed in cooperation.
- flohofwoe 3y ago> I think even the graphics routines (like setting a pixel) may have been implemented in AMSDOS Since I just have the CPC Intern book lying around on my desk :) The graphics routines were not part of AMSDOS, but of the GRA ROM pack (the CPC OS was modularized into "packs" each coming with a standardized interface jump table: Kernel (KL), Machine Pack (MP), Jump/Restore (JRE), Screen Pack (SCR), Text Screen (TXT), Graphics Screen (GRA), Keyboard Manager (KM), Sound Manager (SOUND), Cassette Manager (CAS), Screen Editor (EDIT). The book doesn't tell much about the AMSDOS ROM, only that the 16 KByte ROM is split into 8 KByte for the actual AMSDOS, and the other 8 KByte are used for a part of the LOGO interpreter coming with CP/M 2.2 PS: also important to note that not all CPC models came with the AMSDOS ROM or builtin floppy drive, so the actual operating system and BASIC interpreter couldn't be built on top of AMSDOS.
- zubairq 3y agoI agree that dropping into the basic interpreter was amazing on the old 8 bit computers. Things have really changed recently with the popularity of Retro computing as I wrote about the exact same thing around 10-15 years ago (I can't find the post unfortunately) and I was downvoted a lot as almost all the commenters seemed to think that accessing DevTools in Google Chrome and entering Javascript commands was that same thing as the interactive Basic mode of a Commodore 64 in my case. Oh, how times have changed for the better now :)
- nox100 3y agoI grew up typing programs from softdisk magazine, Compute! etc... into TRS-80, Apple II, Atari 800, and C-64. I still think JavaScript in a browser is better. JavaScript is way more powerful than Basic on any of those 4 platforms. The canvas 2D API is way more capable and easy than what came with those systems. Even getting something like <input type="text"> Was 50-150 lines of code in BASIC, by which I mean a text input line with a cursor and editing and not just BASIC's "INPUT" command which provided nearly zero editing support. Libraries like pixi.js or three.js or p5.js etc make it trivial to get fancy graphics on the screen. Making something you can share it with your friends or the entire world with a link, even if they don't own the same type of machine running the same OS. Host them on codepen, jsfiddle, github pages, all free. I loved my experience with Basic and those old machines but I wouldn't force my kids to learn that way.
- bestouff 3y agoExcept it's way less discoverable. The BASIC prompt was all you got on some 8 bits computers, so it made playing with it almost mandatory. Also everything was way simpler (less abstractions layers, no network) to grok for a young kid.
- ikari_pl 3y agoAnd all of your BASIC was in the manual, taught to you as soon as you bought the computer.
- tromp 3y ago> If you ran out of numbers, the renum command would recompute all the line numbers for you. This is the first time I heard of such a BASIC command, even though I grew up learning to program on a Sinclair ZX Spectrum. Which of the home computers of the time had this command? Would it renumber in multiples of 10?
- Doctor_Fegg 3y agoAmstrad CPC (Locomotive BASIC) and the BBC Micro both had it. In the CPC implementation, at least, you could choose the starting line number and the increment, e.g. RENUM 100,5
- rahimnathwani 3y agoIIRC BBC BASIC let you choose the renumber increment, but the ZX Spectrum didn't.
- Baldbvrhunter 3y agoFor approved choices :) > AUTO10,1000 Silly > _
- rahimnathwani 3y agoWow I just tried this out on an Electron emulator. It seems like the second parameter for RENUMBER is limited to a byte (255). The first parameter is weird, though: if you put in a number that's too large, the system reports a syntax error. 10000,255 works, but 50000,255 doesn't.
- ikari_pl 3y agoIsn't it because the line number is 16-bit unsigned int?
- rahimnathwani 3y ago
- avighnay 3y agoBASIC was my door to programming and computers. I experienced it in my 7th grade in the late 80s when I had the fortune of one of my friends owning a Commodore 64. What a thrill it was, so many weekend afternoons vanished into thin air...
- bitwize 3y agoBASIC was an IDE even going back to Kemeny and Kurtz in the 60s. The upshot of that was, it was one of the first times nontechnical people would even countenance writing programs for a computer. Instead of having to use a keypunch to author the program and then submit the cardstack to an operator, you could author, run, and debug the program by sitting at the teletype and entering some simple commands along with your program. Members of the Dartmouth football team wrote a football simulation for Dartmouth BASIC back then; a port of this game for microcomputer BASICs is available in David H. Ahl's BASIC Computer Games as "FTBALL".
- pipes 3y agoAlways thought the raspberry pi was missing a trick by not just dropping straight into basic. It is supposed to be a learning tool, Linux is a brick wall of a learning curve (imo!) Anyway it's been a very long time since I used my raspberry pi, maybe this is now a feature.
- teamonkey 3y agoIIRC the standard full install still includes Python with an IDE and some PyGame examples, right in the start menu.
- UncleSlacky 3y agoRISC OS on the Pi includes BBC BASIC: https://www.riscosopen.org/content/downloads/raspberry-pi https://www.riscosopen.org/content/downloads/raspberry-pi They used to offer a BBC BASIC-only image called RISC OS Pico, which you can still find on the Internet Archive and should still work on older Pis: https://web.archive.org/web/20181109020203/https://www.riscosopen.org/content/sales/risc-os-pico https://web.archive.org/web/20181109020203/https://www.risco... https://web.archive.org/web/20181109020203/http://packages.riscosopen.org/RISC-OS_Pico.zip https://web.archive.org/web/20181109020203/http://packages.r...
- deleted 3y ago[deleted]
- nickdothutton 3y agoI got started on a CPC with Locomotive BASIC before upgrading my system with disk drive, 256KB RAM pack, ROMS, and CP/M 2.2 and then 3.0. Sought out CP/M because of the amount of free software already available. Programmed in BASIC, BCPL, and eventually C (not a great fit for the Z80). It’s hard to express the value of this learning experience to young users today.
- dventimi 3y ago"It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration." --Edsger Dijkstra (1975)
- ikari_pl 3y agoI've dug deep into that quote and it wasn't even so much about the BASIC we know from the 8-bits. ;-) He also criticized every other major language at the time, except Pascal and (slowly emerging) C. https://news.ycombinator.com/item?id=38743062 https://news.ycombinator.com/item?id=38743062
- dventimi 3y agoI know. I think he was just taking the piss and I love it. And yet, there's more than a grain of truth in this quote and in other salty aphorisms from Dijkstra, especially: "The tools we use have a profound influence on our thinking habits, and, therefore, our thinking ability." I went from Basic to Pascal to C/C++ to Java to Python which bear more than a passing resemblance to one another. Am I habituated to overlook or discount other programming paradigms, like Lisp, Prolog, and Forth? I can tell you with certainty that I once was. My view was even more limited then than it is now, and yet at that time I thought I knew everything worth knowing.
- zaphar 3y agoAnd yet, I learned first on GW Basic and turned out to be a halfway decent programmer.
- dventimi 3y agoCompared to Dijkstra I'm quite certain that I'm a miserable programmer.
- analog31 3y agoAs I commented in another thread, the idea of being permanently damaged by being taught the Wrong Thing is a misconception about learning. Yet most of us are where we're at by having survived many such things. I hope Dijkstra was being humorous. I used to wear his quote as a badge of honor.
- layer8 3y agoOne important aspect TFA is not explaining is that you could move the cursor around the screen and edit and re-execute any command or program line. So it wasn’t just a linear REPL. And it didn’t have history nor typically copy & paste.
- flohofwoe 3y agoThe screen editor was a feature of specific BASIC interpreters though, for instance the BASIC on Acorn Atoms didn't allow it (AFAIK only later on the BBC Micro). Some BASIC screen editors also had a primitive form of copy/paste.
- ramijames 3y agoI feel like BASIC on my C64 was the last time I really, intuitively understood what my computer was doing when I was programming and executing software. There are so many layers between me and the hardware today that I feel like I float above it, and that I just have to trust it all intrinsically. I don't, really, and it constantly gives me this feeling of almost falling.
- tenebrisalietum 3y agoWell, it is amazing you can write something in a decent set of Javascript these days and have it execute mostly the same across Windows, Mac, Linux, iOS, and Android, irrespective of CPU architecture.
- ramijames 3y agoIt is, but at the same time I know that if I re-run it in two years it will suffer from bitrot and ill have to futz around with it to get to run. I hate that a lot.
- cxr 3y agoSurely by "re-run" you mean "try to re-build". If you write something that runs in the browser today (and you're not doing something dumb like using experimental or otherwise non-standard APIs), chances are extremely high that it will still work in two years. The browser is one of the most consistent, interoperable, stable software platforms that the industry has managed to produce.
- ramijames 3y agoYes, that's what I mean, thanks.
- ColinEberhardt 3y agoI can totally relate to that, and it is why I really got into WebAssembly. It is such a simple concept that you can understand it fully, easy to write by hand, create an emulator, and more. Feels like stepping back in time :-)
- pier25 3y agoSo many memories with the family's beloved Sony MSX as a kid in the 80s.
- rickcarlino 3y agoSimilarly, I’ve heard some people call early Forth systems of the 1980s to be complete operating systems, which I would agree with. Many of them shipped with tiny editors, block management systems, and multitaskers. It was one of the most interesting eras of computing.
- jdblair 3y agoI remember when I finally figured out the point of GOSUB (I was maybe 13, so 1986), and why it was more powerful than GOTO. Still no stack, and the only calling convention was that RETURN would take you back to the line after where you called GOSUB. Writing this words now, I don't know that I ever looked into what happened if you called GOSUB from a GOSUB routine, or how deep you could call. That would imply some sort of stack! [edited to correct a typo]
- jdblair 3y agoUnderstanding the point of DATA was also a big breakthrough for me, but that happened earlier.
- EvanAnderson 3y agoApplesoft BASIC allowed nested GOSUBs. I think you could get about 10 deep, if memory serves. You could absolutely do recursive calls. You would have to implement subroutine-local variable scope yourself. (I would have use arrays with an index that incremented at the beginning of each call and decremented before the RETURN.)
- timbit42 3y agoApplesoft BASIC was by Microsoft so it is pretty much identical to the other 6502 Microsoft BASICs like on the Commodore and OSI systems. Apple and Commodore both customized their Microsoft BASICs somewhat. If you benchmark Applesoft BASIC and Commodore BASIC, on systems with the same clock speed (eg. 1 MHz), they benchmark the same.
- tenebrisalietum 3y agoCoverting GOSUB X:RETURN to GOTO X was my first tail-call optimization. > I don't know that I ever looked into what happened if you called GOSUB from a GOSUB routine I want to say all BASICs had a stack (not sure about Apple Integer BASIC), or used the CPU stack. Expression evaluation also used it, and if you overflowed it you would get a ?FORMULA TOO COMPLEX error.
- ikari_pl 3y ago
- _spduchamp 3y agoRENUM? What!?!!?
- nilamo 3y agoKind of sounds like Smalltalk?
- declank 3y agoThe Amstrad CPC 464 plus is what I grew up with. In the footnote sure it was fast to jump into BASIC but of course loading from cassettes took ages :)
- LanzVonL 3y agoWhy doesn't somebody make a nice new BASIC computer where you can bit bang the hardware? Give BASIC some new keywords for Internet use, boom.