Code: Select all
POKE 163890,2
NEW
Code: Select all
char *mem;
mem = _makerel(0x28032L)
mem[0]=2;
Code: Select all
POKE 163890,2
NEW
Code: Select all
char *mem;
mem = _makerel(0x28032L)
mem[0]=2;
If I do that in BASIC (i.e. change border and clear nothing happens whereas with NEW the screen mode changes from TV mode to Monitor mode and on my JSU rom it switches from NTSC to PAL. I've also tried MODE and again, nothing. So NEW seems to do something on top of that that causes the computer to refresh.mk79 wrote:NEW deletes the program and redraws the Basic windows. You're not in Basic, what exactly should happen? If you want to redraw your own C windows, just do a Border/Clear call on them.
That did the trick. Unfortunately it didn't work for my purpse...I was hoping the program that was running would yield time to my exec'ed process so I could kick screen resolution back to TV mode but the program below never ran. I'll have to go and debug that other program instead to see if I can undo the screen switch. I did that with Tank Busters almost 30 years ago and found out where it was forcing the screen switch so I could run it on my US TV back then...think I must have used Qmon for that since I own it.mk79 wrote:Ah, now I get your problem. Use MT.DMOD trap to change your screen mode, don‘t poke it in the system variables. That should have the desired effect.
Code: Select all
#include stdio_h
long key[8] = {0X0};
long ret[8];
main()
{
char *mem;
pause(2700);
key[0]=16; /* 0x10 -- $10 */
key[2]=2;
trap1(key,ret);
}
Hi,mk79 wrote:Ah, now I get your problem. Use MT.DMOD trap to change your screen mode, don‘t poke it in the system variables. That should have the desired effect.
Yes. But to be pedantic, changing the system variables does nothing per se. What the NEW command however does is re-setting the mode by first reading it and then setting it again, presumably to get a free re-initialization of its windows. The hardware doesn't allow reading the actual mode, so the value written in the system variable is used instead. This is where the mode change happens in this case. But it's seldom a good idea to just go and write stuff to the variables, many times there is a better way.Derek_Stewart wrote:This is the correc tprocedure to chnage the QL Screen Mode, as just poking the System Variables will chnage the Screen Mode as required, but the operating system will not register the screen mode change, causing a conflicit.
This is mentioned most good QL technical books.