Printing at row 24

Page 1/2
| 2

By MäSäXi

Paragon (1884)

MäSäXi's picture

04-01-2009, 21:39

2009 SCREEN 1: KEYOFF: LOCATE1,24: PRINT"Why I can´t print here? :/"

Even I use KEYOFF, msx acts still like those color auto goto list run are still there and printing at row 24 makes my print to hop at row 23 (and whole text screen jumps one row upwards too, of course).

Screen 1 has 24 rows, I can use that row when writing BASIC program (after KEYOFF, naturally) so why I cannot print there in my program? Is it impossible in BASIC? Eek!

Login or register to post comments

By arnold_m

Master (173)

arnold_m's picture

04-01-2009, 22:01

2010 SCREEN 1: KEYOFF: LOCATE 1,24: PRINT"You need a semi-colon.";

Without the semi-colon basic will move the cursor to the next line,
and since the cursor is already at the last line basic will scroll everything up.

By Vampier

Prophet (2409)

Vampier's picture

04-01-2009, 23:56

lol Smile

By [D-Tail]

Ascended (8263)

[D-Tail]'s picture

05-01-2009, 05:12

Um, there is that poke to extend the editor space to more than 24 lines. E.g., 25 Tongue. This will make BASIC think 25 lines can be displayed and will only scroll up when you put a CR-terminated line on #25. Gotta look that one up for ye though, but I assume a bloke like NYYRIKKI will do that faster from the back of his head.

By dvik

Prophet (2200)

dvik's picture

05-01-2009, 05:58

POKE &HF3B1,25

By MäSäXi

Paragon (1884)

MäSäXi's picture

05-01-2009, 10:25

2010 SCREEN 1: KEYOFF: LOCATE 1,24: PRINT"You need a semi-colon.";

Without the semi-colon basic will move the cursor to the next line,
and since the cursor is already at the last line basic will scroll everything up.

Thanks but semicolon is not enough for this problem. Sad I already tried it..... over twenty years ago......!!!! LOL!Eek!

But I will try that poke.... thanks Dvik! Smile None BASIC manual says anything about this poke..... nice..... but on the other hand, none BASIC manuals won´t say much else either.... Sad

By MäSäXi

Paragon (1884)

MäSäXi's picture

05-01-2009, 10:31

D-tail, so this poke REALLY gives 2 5 rows?!?! Tongue WOW!!!!!!!!! LOL!

And I asked just access for existing 24 rows.... Tongue Damn.... I should have asked for 40 columns SCREEN 1 instead!!!TongueTongueTongue

But does it cause any problems if I print to row 25? If yes, which kind of problems, which I should be aware of when programming in BASIC? Does it work, if I type LOCATE 7,25: PRINT"Hello Mummy and Daddy!!" ? Tongue Or must I use POKEs and VPOKEs for printing?

By MäSäXi

Paragon (1884)

MäSäXi's picture

05-01-2009, 10:40

D-tail, do you mean that row 25 does not scroll, or WHOLE screen does not scroll, until I print chr$(13) at row 25?

By AuroraMSX

Paragon (1902)

AuroraMSX's picture

05-01-2009, 13:17

Thanks but semicolon is not enough for this problem. Sad I already tried it..... over twenty years ago......!!!! LOL!Eek!Then try again, because it does work

2011 KEYOFF: FOR X=0 TO 23: PRINT X: NEXT: PRINT "Line 24!";: A$=INPUT$(1)

And you'll see the 0 scroll off the screen leaving the number 1 to 23 on screen and the text Line 24! with the cursor behind it.

The poke works, too, but lines 25 and up are not visible on screen of course. Try this:

2012 POKE &HF3B1,25: KEYOFF: FOR X=0 TO 23: PRINT X: NEXT: PRINT "Line 24!": A$=INPUT$(1)

(Note: no ; after the last PRINT!)And you'll see the same as before, but without the cursor and possibly some garbage on screen because you're using memory that's not meant to be used as screen buffer.

By AuroraMSX

Paragon (1902)

AuroraMSX's picture

05-01-2009, 13:23

Next challenge: print a character 'X' on position 31,23 using only LOCATE and PRINT. So, without using POKE &HF3B1 and without using VPOKE :-P (and in screen mode 1 of course ;-))

{edit: actually, you don't even need LOCATE, just PRINT is enough Smile}

By MäSäXi

Paragon (1884)

MäSäXi's picture

05-01-2009, 14:11

Thanks... Smile I was too tired last nite when I wrote my question... my whole problem was to print 32 characters to the row 24 and that was impossible without that poke. 31 characters or less was allright of course (at row 23 I mean) but 32nd character made rows to jump upwards.... and semicolon didn´t help at all when I printed to the last (23rd) row. Thanks, now with that poke I can print at 31,24. Thanks. Smile

Using that POKE &HF3B1,25, except you can´t see the cursor after LIST is executed (unless you press UP cursor), there is one strange behaviour. Make BASIC program, run it and then CTRL+STOP it. Then start to press RETURN key and you get "Ok" message after every RETURN. You can normally use LIST on example, as long as you use it when cursor is at the row 25, but if you move cursor to beginning of that "Ok" or to some empty row between "Ok"s, and use LIST then you may get "Syntax error", same with RUN.

Hmmmmm.... strange... my basic program did it, but then I wanted to be sure and wrote simple one line program to test it again, and this time i didn´t got any "Ok"s.....

OH! Now I got it, I forgot that KEYOFF from my simple one line test program... without KEYOFF, cursor stayed visible, and when I got to last row by pressing RETURNs, those color auto goto list run keylists jumped upwards until they disappeared from the top row!!! LOL! Then I typed KEYOFF and cursor disappeared and started to give those "Ok"s. Smile

Page 1/2
| 2