Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Text scrolling
#1
I'm continuing my porto of an old ZX Spectrum program.
Now the next problem:
It was text based and printed everything to the bottom of the screen and the rest of the screen was scrolled.

With the Boriel Basic the behavior is different: Once the bottom of the screen is reached printing rolls over and continues at the top of the screen.

Is it possible to change the behavior so that it scrolls?
Reply
#2
You can scroll the screen using the scroll.bas library, but I can also add the default scroll behaviour to the compiler.
What compiler version are you using?
Reply
#3
zxb 1.9.2
Reply
#4
I had a look at scroll.bas.
It seems that this is are bare scrolling routines.
I.e. it is not connected with printing or is it?
I mean, it does not automatically scroll if I printed the whole screen. Or does it?
Reply
#5
Exactly.
But I can enable normal PRINT behaviour for compatibility. Will add that update. :roll: (nobody wanted Scroll before)
Reply
#6
OK, thanks.
Reply
#7
Try this version (beta), and tell me if it works.
It's exactly as 1.9.2. It just add the print scrolling (without the "scroll?" message!)
http://boriel.com/files/zxb/zxbasic-1.9.3-win32.zip
http://boriel.com/files/zxb/zxbasic-1.9.3.tar.gz
http://boriel.com/files/zxb/zxbasic-1.9.3.zip

And tell me, please :roll:
Reply
#8
I'm new to the group. Wonderful compiler you have going here.

I'm trying to find how to scroll text up a screen, and I see that scroll.bas has 1 pixel scrolling routines, but not 8 pixels horizontal or vertical scrolling (with attribute shifting). Is there also a function to get the current position of a cursor after printing in 42 column mode (row, column)?

You mentioned 1.9.2 in this thread, but you didn't provide any guidance with how text scrolling works in 1.9.2. I'm currently on the most recent release and can't find any text scroll functions in the markup.

Please can you assist?
Reply
#9
What you want to look at is "WindowScrollUp.bas" - you can set it to the whole screen if you want. If you have colour, you can call the attr scroll library right after to scroll both together.

Then just print to the new line space at the bottom of the screen.
Reply
#10
Hi,

I put the following in my basic file:

#include <windowScrollUP.bas>

and the compile reports:

Error: file 'windowScrollUP.bas' not found
Reply
#11
This would only work if you had it in the supplied library folder with the compiler.

Copy the script from the library here, paste it into a new file "windowscrollup,bas"

And then use #include "windowscrollup.bas" - use quotes, not the <angle> brackets.
Reply
#12
(01-27-2020, 11:35 PM)yeti Wrote: I'm new to the group. Wonderful compiler you have going here.

I'm trying to find how to scroll text up a screen, and I see that scroll.bas has 1 pixel scrolling routines, but not 8 pixels horizontal or vertical scrolling (with attribute shifting). Is there also a function to get the current position of a cursor after printing in 42 column mode (row, column)?

You mentioned 1.9.2 in this thread, but you didn't provide any guidance with how text scrolling works in 1.9.2. I'm currently on the most recent release and can't find any text scroll functions in the markup.

Please can you assist?

If you just want to scroll the text screen completely (as the normal PRINT does) this has been implemented in 1.10.0 (not released yet). You can get a prerelease here:
http://www.boriel.com/files/zxb/zxbasic-...-win32.zip
http://www.boriel.com/files/zxb/zxbasic-...ta5.tar.gz
http://www.boriel.com/files/zxb/zxbasic-...-beta5.zip
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)