OxC0FFEE Posted September 19, 2022 Share Posted September 19, 2022 (edited) Two different questions, I suppose, about direct access to the text window (not using PRINT #6) How to use drawing commands (PLOT, DRAWTO, etc) into the text window, not the graphics portion? I suspect that it's not possible to PLOT characters into it. If that's not possible, I can also poke the desired values into the text window, but how do I figure out where in memory to poke to? SAVMSC (88,89) seem to indicate the location of the graphics portion, not the text window memory location. Edited September 19, 2022 by OxC0FFEE Quote Link to comment Share on other sites More sharing options...
TGB1718 Posted September 19, 2022 Share Posted September 19, 2022 Text window address in BASIC is peek(660)+peek(661)*256 1 Quote Link to comment Share on other sites More sharing options...
OxC0FFEE Posted September 19, 2022 Author Share Posted September 19, 2022 Is it possible to page-flip the text window by poking into those two locations? I tried that and the result is not what I expected. I'm using TBXL so I've got DPEEK and DPOKE. It seems like the text window lives by default at the end of the graphics screen (because when I decrement it I get garbage on the graphics screen corresponding to the text in the text window), so I was hoping I could increment it by a full textwindow (160 characters) by DPOKE 660,DPEEK(660)+160, put new text into that, and switch back and forth by DPOKEing to 660. Quote Link to comment Share on other sites More sharing options...
TGB1718 Posted September 20, 2022 Share Posted September 20, 2022 660 and 661 are the address locations for the text window, the display list will also be pointing at that location, so changing 660 and 661 will not achieve what your after, you also need to change the display list LMS address too. Here's a gr.4 display list 112 112 112 73 128 157 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 66 <<<<<<<<<<<<<< LMS instruction 96 <<<<<<<<<<<<<<< need to change this (lo byte) 159 <<<<<<<<<<<<<< and this (high byte) 2 2 2 65 74 157 Display list address 40266 Text window address 40800 1 Quote Link to comment Share on other sites More sharing options...
Rybags Posted September 20, 2022 Share Posted September 20, 2022 (edited) The text window is E: which doesn't really support Plot/Drawto (Basic does it in Gr. 0 because it also opens #6 as S: ) Various workarounds could be used. In theory you could save/restore certain screen variables like SAVMSC, DINDEX and RAMTOP as well as the cursor position locations then swap between 2 screens though if one is just a text window then potentially you could be wasting about 800 bytes on non displayed data. If the main part of the screen is Gr. 12 (aka Antic mode 4) then you could just do a custom display list that uses the bottom 4 lines as the text window. But you then get potential of the main/text window operations disrupting the other part of the screen. Edited September 20, 2022 by Rybags 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.