Jump to content
IGNORED

POSITION X,X + GRAPHICS 8


Recommended Posts

Seems over the years I've forgotten some 'basic' things about BASIC. For instance, I'm trying to display certain information in the GR.8 text window at the bottom of the screen, and to prevent it from scrolling I thought is a simple matter of for example : 1000 POSITION 0,0: ? "X=";INT(X),"Y=";INT(Y). With this it still scrolls. I have to resort to using 1000 [CLEAR]: ? "X=";INT(X),"Y=";INT(Y). But then it blinks. Kind of annoying to look at. If somebody could point out the solution it would be appreciated. Thanks !

Edited by Ricky Spanish
spelling, always spelling
Link to comment
Share on other sites

The position statement will be acting on the graphics portion of the screen.

The ? statement is working in the graphics window.

 

You can manipulate this by using memory locations 656 to 667, they control the 

text window row/column.

 Either that or get the text window address and POKE the values in

 

Try something like this, note the ';' at the end of the print line

 

10 GRAPHICS 8:X=12.345:Y=987.345
20 POKE 656,2:POKE 657,10: REM ROW 2 - COLUMN 10
25 ? "X=";INT(X),"Y=";INT(Y);
30 GOTO 30

 

You can turn the cursor off if you don't want it by POKE 752,1

and back on with POKE 752,0

 

Just for fun :)

 

10 GRAPHICS 8:X=12.345:Y=987.345
11 POKE 752,1
15 FOR I=0 TO 24
20 POKE 656,2:POKE 657,I
25 ? " X=";INT(X),"Y=";INT(Y);" ";
26 NEXT I
30 FOR I=24 TO 0 STEP -1
40 POKE 656,2:POKE 657,I
45 ? " X=";INT(X),"Y=";INT(Y);" ";
46 NEXT I
50 GOTO 15

Edited by TGB1718
Edit:
  • Like 1
  • Thanks 1
Link to comment
Share on other sites

2 minutes ago, Ricky Spanish said:

@TGB1718 I did notice one thing, if the value exceeds 100, then say goes back to 80, instead of showing 80, it will show 800, or say 151, then 50 it will show 501 etc., etc.

Print a few blank characters (spaces) after the numbers so it is always the same # of digits.  Printing to a line you have already written to (as you have seen) does not clear the line - it simply prints over top of what is already there.

  • Thanks 1
Link to comment
Share on other sites

3 hours ago, Ricky Spanish said:

And I totally missed that part. Apparently I need to brush up on my comprehension skills as well haha. 

Perhaps not, @TGB1718 just forgot to use monospaced font or the code block.

10 GRAPHICS 8:X=12.345:Y=987.345
11 POKE 752,1
15 FOR I=0 TO 24
20 POKE 656,2:POKE 657,I
25 ? " X=";INT(X),"Y=";INT(Y);" ";
26 NEXT I
30 FOR I=24 TO 0 STEP -1
40 POKE 656,2:POKE 657,I
45 ? " X=";INT(X),"Y=";INT(Y);" ";
46 NEXT I
50 GOTO 15

 

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...