That thing with the bottom two lines
That thing with the bottom two lines
Was it a good design idea for Spectrum BASIC to separate the upper and lower screen, and treat the "bottom two lines" differently?
Down sides:
• Writing to those lines is a special case. You can't PRINT AT y in a loop from y=0 to 23, for example.
• The lower screen has its own attributes, so INK 2: PRINT #0;"blah" does not honour the choice of red.
• It has no obvious default attributes either, so I can't get around the problem by doing INK #0;2
• I would imagine that it complicates redirection. For example, if I want to spool all output to a disk file, or the printer, I can redirect #2, but what will happen with PRINT #0 and #1? (I've actually never tried using the redirection features...)
• Er, why does #1 accept output anyway? I thought it was an input stream, for INPUT and INKEY$.
Up sides:
• Presumably made it easier for them to implement BASIC editor features, like "pull down a line for editing" in 48 mode, and the "Screen" function on the 128 context menu.
• Handy for "status line" displays, like the score in a game.
• ...?
Down sides:
• Writing to those lines is a special case. You can't PRINT AT y in a loop from y=0 to 23, for example.
• The lower screen has its own attributes, so INK 2: PRINT #0;"blah" does not honour the choice of red.
• It has no obvious default attributes either, so I can't get around the problem by doing INK #0;2
• I would imagine that it complicates redirection. For example, if I want to spool all output to a disk file, or the printer, I can redirect #2, but what will happen with PRINT #0 and #1? (I've actually never tried using the redirection features...)
• Er, why does #1 accept output anyway? I thought it was an input stream, for INPUT and INKEY$.
Up sides:
• Presumably made it easier for them to implement BASIC editor features, like "pull down a line for editing" in 48 mode, and the "Screen" function on the 128 context menu.
• Handy for "status line" displays, like the score in a game.
• ...?
Re: That thing with the bottom two lines
Not really. I can see why they did it to make BASIC line entry easier, but it's just very messy as an implementation. They really would've been better off with a full screen editor experience like the 128 had, it certainly would have made coding easier IMO. Or made more use of the streams functionality to enable separate text output windows on screen (like on the CPC) and then just had BASIC reset stream #1 for line editing purposes whenever a program ends (or not and let the user define their own weird layout I guess)
Re: That thing with the bottom two lines
Do you tried to POKE 23659,0 and then print?
Be careful, your program must not return/break! In that case it will hang.
Be careful, your program must not return/break! In that case it will hang.
- 1024MAK
- Bugaboo
- Posts: 3135
- Joined: Wed Nov 15, 2017 2:52 pm
- Location: Sunny Somerset in the U.K. in Europe
Re: That thing with the bottom two lines
It's a hang over from the ZX80 (which only had a 4K byte ROM). The ZX81 ROM built on the ZX80 ROM (now 8K bytes in size). Then the ZX Spectrum ROM is a development of the ZX81 ROM...
Sinclair wanted maximum features for lowest cost (read keep something that worked, and make everything fit in only 16K bytes of ROM).
Mark
Sinclair wanted maximum features for lowest cost (read keep something that worked, and make everything fit in only 16K bytes of ROM).
Mark
Standby alert
“There are four lights!”
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb
Looking forward to summer later in the year.
“There are four lights!”
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb
Looking forward to summer later in the year.
Re: That thing with the bottom two lines
Well, I'm really accustomed to it, like many of us here I guess. It was my first contact with a computer and for some time I couldn't imagine that it could work in another way.
But it isn't the most comfortable way. Full screen editor is simply better. Practically all modern programming environments use full screen editor today, right?
But when Spectrum was created it wasn't a norm. Many 8 bit computers had in their Basic similar solutions to Spectrum - you don't edit whole code but first choose a line and then you edit this line.
It was a way of dealing with limited memory. And it was some historical thing - most very early computers had some limited buffer where you could process your input data in.
So it just a typical solution for 1982 which aged a bit badly.
But it isn't the most comfortable way. Full screen editor is simply better. Practically all modern programming environments use full screen editor today, right?
But when Spectrum was created it wasn't a norm. Many 8 bit computers had in their Basic similar solutions to Spectrum - you don't edit whole code but first choose a line and then you edit this line.
It was a way of dealing with limited memory. And it was some historical thing - most very early computers had some limited buffer where you could process your input data in.
So it just a typical solution for 1982 which aged a bit badly.
Re: That thing with the bottom two lines
Yeah, line editors were reasonably common. It's more the weird quirk where running programs can't easily use the full screen for PRINT or PLOT that I find particularly odd. Though it never bothered me that much back in the day I guess.
- WhatHoSnorkers
- Manic Miner
- Posts: 255
- Joined: Tue Dec 10, 2019 3:22 pm
Re: That thing with the bottom two lines
You're right in that INK 2 on its own doesnt' work, but you just need to put the INK in the PRINT statement itself. Same with the PAPER. I believe it gets the default PAPER from the BORDER so you'll need to pad as necessary.
Drawing and plotting in there isn't possible. When I needed nice lines there for a full screen grid, I drew on most of the screen, then copied bytes from screen memory down there. That worked OK.
Drawing and plotting in there isn't possible. When I needed nice lines there for a full screen grid, I drew on most of the screen, then copied bytes from screen memory down there. That worked OK.
I have a little YouTube channel of nonsense
https://www.youtube.com/c/JamesOGradyWhatHoSnorkers
https://www.youtube.com/c/JamesOGradyWhatHoSnorkers
Re: That thing with the bottom two lines
This presupposes that I conveniently know what the current colour is, without peeking. Maybe it was set with VAL, or by a previous program, or manually by the user!WhatHoSnorkers wrote: ↑Tue Feb 13, 2024 6:34 am You're right in that INK 2 on its own doesnt' work, but you just need to put the INK in the PRINT statement itself.
Re: That thing with the bottom two lines
Yep, I think one of the fairly rare areas where the Speccy scores over the BBC Micro is the BASIC editor, even the 48k one, when you want to edit an existing line. On the Beeb you have that strange double-cursor mechanism where you have to LIST the desired line, cursor your way up there, and then hold down a special Copy key to re-enter it (or just the parts you want to keep). The Amstrad CPC (as far as I recall) involves entering EDIT 100 and then line 100 pops up for editing.
On the other hand, it's annoying that you can only cursor left and right in the 48k editor, as it takes an age to reach the end of a long line (especially since it gets slower as you go along: must be some O(n^2) thing ). I saw a utility called $KIPPER that allows you to use the up and down cursors too.
Re: That thing with the bottom two lines
^Yes, this. I quite like the 'current line' approach and the re-building of the screen, although I do agree that the implementation could have been a bit neater. But overall I like the approach and, as others have said, it's what you get used to.equinox wrote: ↑Tue Feb 13, 2024 8:08 am Yep, I think one of the fairly rare areas where the Speccy scores over the BBC Micro is the BASIC editor, even the 48k one, when you want to edit an existing line (...) On the other hand, it's annoying that you can only cursor left and right in the 48k editor, as it takes an age to reach the end of a long line (especially since it gets slower as you go along (...)
Re: That thing with the bottom two lines
It's also not really just the bottom two lines. Especially when you're editing BASIC, that could be 6 to 8 lines too, depending on how long your lines are.
I do really like that it really focus you on the line you're editing. It's very useful there.
I do really like that it really focus you on the line you're editing. It's very useful there.
Re: That thing with the bottom two lines
Without going to check, I don't think there's any reason why the plot/draw routines could not take advantage and draw on the lower two lines...
Its dead easy to set a colour here anyway , 23624 , x , I sometimes set the 'main' screen area with this too using 23693 , x , followed by a CLS or a call to its routine (iirc) , just a bit easier to type in than setting all the permutations manually aka bright/flash etc
Its dead easy to set a colour here anyway , 23624 , x , I sometimes set the 'main' screen area with this too using 23693 , x , followed by a CLS or a call to its routine (iirc) , just a bit easier to type in than setting all the permutations manually aka bright/flash etc
Re: That thing with the bottom two lines
-
- Microbot
- Posts: 117
- Joined: Mon Apr 13, 2020 3:07 pm
Re: That thing with the bottom two lines
BTW, I always found it interesting that many of the early loading screens didn't use those lines, as apparently the tools used to create them couldn't draw there either.
It took several years before programs like The Artist or Art Studio appeared and full-screen loading screens became the norm. What an interesting setback.
Patrik
It took several years before programs like The Artist or Art Studio appeared and full-screen loading screens became the norm. What an interesting setback.
Patrik
Re: That thing with the bottom two lines
Yes, Art Studio required a bit of scrolling, purely because of menu layout. They could have chosen (Speccy-style) to keep the menus in the bottom two lines, but in fact they are in (off the top of my head) I think the top THREE lines.Patrik Rak wrote: ↑Wed Feb 21, 2024 11:27 am BTW, I always found it interesting that many of the early loading screens didn't use those lines, as apparently the tools used to create them couldn't draw there either.
It took several years before programs like The Artist or Art Studio appeared and full-screen loading screens became the norm. What an interesting setback.
Re: That thing with the bottom two lines
I see your BBC Micro line editor, and I raise you the Dragon 32. It was quicker to re-type the line every time.equinox wrote: ↑Tue Feb 13, 2024 8:08 am Yep, I think one of the fairly rare areas where the Speccy scores over the BBC Micro is the BASIC editor, even the 48k one, when you want to edit an existing line. On the Beeb you have that strange double-cursor mechanism where you have to LIST the desired line, cursor your way up there, and then hold down a special Copy key to re-enter it (or just the parts you want to keep). The Amstrad CPC (as far as I recall) involves entering EDIT 100 and then line 100 pops up for editing.
Spectribution: Dr. Jim's Sinclair computing pages.
Features my own programs, modified type-ins, RZXs, character sets & UDGs, and QL type-ins... so far!
Features my own programs, modified type-ins, RZXs, character sets & UDGs, and QL type-ins... so far!
Re: That thing with the bottom two lines
The CPC does it both ways. You can use EDIT to just call up a line for editing, but you can also use the Copy Cursor to copy all, or part, of a line from elsewhere on screen.equinox wrote: ↑Tue Feb 13, 2024 8:08 am On the Beeb you have that strange double-cursor mechanism where you have to LIST the desired line, cursor your way up there, and then hold down a special Copy key to re-enter it (or just the parts you want to keep). The Amstrad CPC (as far as I recall) involves entering EDIT 100 and then line 100 pops up for editing.
Re: That thing with the bottom two lines
Let's try to ignore Icon Graphix ...Patrik Rak wrote: ↑Wed Feb 21, 2024 11:27 am BTW, I always found it interesting that many of the early loading screens didn't use those lines, as apparently the tools used to create them couldn't draw there either.
It took several years before programs like The Artist or Art Studio appeared and full-screen loading screens became the norm. What an interesting setback.
Re: That thing with the bottom two lines
Wait. Was that the one they gave away on an SU covertape at some point? The one where you had to play a music tape in the tape deck while you were using it or the keyboard routines didn't work correctly?
Aside from that glaring bug, I seem to recall it wasn't actually that bad.
Re: That thing with the bottom two lines
It was very buggy and would crash from time to time. There was also the "difficult to draw in the icon menu space" thing -- umm, I think there may have been a way to get around this but it's too long ago to remember. At least it was much less good than Art Studio which politely let you push the menu aside and scroll 2 lines. Spectrum owners are used to ignoring 2 lines (PRINT #0).AndyC wrote: ↑Tue Mar 05, 2024 7:55 am Wait. Was that the one they gave away on an SU covertape at some point? The one where you had to play a music tape in the tape deck while you were using it or the keyboard routines didn't work correctly?
Aside from that glaring bug, I seem to recall it wasn't actually that bad.