Fabrizio Caruso Posted February 20, 2019 Share Posted February 20, 2019 Hi everyone! I am trying to use Atari BASIC to print some text in graphics mode 1+16 but the position command seems not to do what you would expect. The code below will show "hello" at the center of the top line and not at position 0,0.10 graphics 1+16 20 position 0,0 30 print #6,"hello" 40 goto 40 How can I have the hello print at the top left corner in this graphic mode? Quote Link to comment Share on other sites More sharing options...
phaeron Posted February 20, 2019 Share Posted February 20, 2019 The POSITION statement is fine. The problem is the comma in the PRINT statement between #6 and "hello", which inserts ten spaces. Use a semicolon instead. 3 Quote Link to comment Share on other sites More sharing options...
_The Doctor__ Posted February 20, 2019 Share Posted February 20, 2019 so close 10 graphics 17 20 position 0,0 30 print #6;"hello"; 40 goto 40 Quote Link to comment Share on other sites More sharing options...
Fabrizio Caruso Posted February 20, 2019 Author Share Posted February 20, 2019 Thanks everyone and sorry for my noob question Quote Link to comment Share on other sites More sharing options...
+mytek Posted January 1, 2022 Share Posted January 1, 2022 Although this isn't about using the +16 full screen mode, I thought it relevant to this topic and figured it would be best to drop this query here. So I'm running a Graphics 2 screen with the text window still present. I understand how to position text where you want it to appear in either the Graphic 1 or 2 screens within Basic, but I'll be darned if I can figure out how to position text within the 4-line small text window. Because the POSITION X,Y statement only seems to apply to the large text window. Any hints? Quote Link to comment Share on other sites More sharing options...
thorfdbg Posted January 1, 2022 Share Posted January 1, 2022 1 hour ago, mytek said: I understand how to position text where you want it to appear in either the Graphic 1 or 2 screens within Basic, but I'll be darned if I can figure out how to position text within the 4-line small text window. Because the POSITION X,Y statement only seems to apply to the large text window. Any hints? Yes. The cursor position in the text window is in separate memory locations, namely in $290 for the row (Y position) and $291,$292 for the column (X position). The editor handler exchanges these with the regular row/column coordinates whenever an editor window is present below a graphics mode. 2 Quote Link to comment Share on other sites More sharing options...
+mytek Posted January 1, 2022 Share Posted January 1, 2022 (edited) 6 hours ago, thorfdbg said: Yes. The cursor position in the text window is in separate memory locations, namely in $290 for the row (Y position) and $291,$292 for the column (X position). The editor handler exchanges these with the regular row/column coordinates whenever an editor window is present below a graphics mode. Based on what you stated, this worked... 10 TXTROW=656:TXTCOL=657:GRAPHICS 2 20 POKE TXTROW,2:POKE TXTCOL,10:PRINT "HELLO"; 30 GOTO 30 Your memory location references helped me find it quickly on page 57 of "Mapping The Atari". Since there are only 4 lines in the standard text window in this graphics mode, TXTROW will be between 0-3. I assumed that the MSB of TXTCOL (658) would default to zero after invoking GRAPHICS 2, so I didn't bother to set it. Thank you EDIT: I added a semicolon after the PRINT "HELLO"; - otherwise the cursor will jump to the bottom of the screen. Edited January 1, 2022 by mytek added semicolon 2 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.