Live data from Hacker News

BASIC was not just a programming language

gcher.com

41–50 of 121 posts

Re: BASIC was not just a programming language

#41
post #28

Earlier quoted context omitted.

Define 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'

on 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. Wh…

> 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.

Re: BASIC was not just a programming language

#42
post #36

Always 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.

IIRC the standard full install still includes Python with an IDE and some PyGame examples, right in the start menu.

Re: BASIC was not just a programming language

#43
post #4

I 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 sam…

“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.“ I genuinely feel that Dijkstra’s famous rant about BASIC had a big hand in killing it off. I don’t think it was the intention but it created so much bias against BASIC. If you created something in basic, or even suggested using…

For me the biggest motivation to not dip my toes too much into BASIC on 8-bit computers was the abysmal performance. If I remember right, assembler was about 100x faster, compiled high-level languages like PASCAL about 10x faster, and FORTH somewhere inbetween compiled languages and assembler.

Re: BASIC was not just a programming language

#45
One 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.

Re: BASIC was not just a programming language

#46
post #45

One 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.

The 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.

Re: BASIC was not just a programming language

#47
post #6

> 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?

Commodore Plus/4, C16/116 and C128 had it (BASIC V3.5 and up). COMAL on the C64 also had it.

Re: BASIC was not just a programming language

#48

Earlier quoted context omitted.

IIRC BBC BASIC let you choose the renumber increment, but the ZX Spectrum didn't.

For approved choices :) > AUTO10,1000 Silly > _

Wow 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.

Re: BASIC was not just a programming language

#49

Earlier quoted context omitted.

on 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. Wh…

> 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), Gra…

> 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

Right, technically correct! On the other hand, the command to return to BASIC from CP/M was "AMSDOS" - the distinction to be seen by the user was to be AMSDOS vs CP/M as two operating systems.

Btw. which book describes these internals? ;>>>

Re: BASIC was not just a programming language

#50

Earlier quoted context omitted.

“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.“ I genuinely feel that Dijkstra’s famous rant about BASIC had a big hand in killing it off. I don’t think it was the intention but it created so much bias against BASIC. If you created something in basic, or even suggested using…

For me the biggest motivation to not dip my toes too much into BASIC on 8-bit computers was the abysmal performance. If I remember right, assembler was about 100x faster, compiled high-level languages like PASCAL about 10x faster, and FORTH somewhere inbetween compiled languages and assembler.

FORTH could've been a very elegant alternative to BASIC on 8-bit class hardware, but one major problem with it was that having to enter absolutely everything as RPN/postfix notation could be very unintuitive at times. E.g. prefix or mixfix notation for some things such as math is only very slightly harder to parse, but then provides a big gain in user friendliness. And floating point math takes up a big chunk of the code in typical BASIC ROMs, so it was clearly regarded as important to duplicate that desk calculator-like UX.
Post reply on HN