Page 1 of 1

Two questions

Posted: Tue Apr 24, 2018 11:52 am
by Krauts In Space
1st)
I want a controlled end of my program by polling EXIT key via GETK and jump to a label for clearing stack, flags, etc. How to get this? GETK delivers keycode 33 but also quits execution. I could press R/S, but ...

2nd)
I can switch to graphics mode 200*120 / 400*240 but can't switch back to alphanumeric / stack display. How to get this? I think addressing a virtual variable might do this but I can't find out how.

Re: Two questions

Posted: Tue Apr 24, 2018 12:28 pm
by grsbanks
Krauts In Space wrote:
Tue Apr 24, 2018 11:52 am
1st)
I want a controlled end of my program by polling EXIT key via GETK and jump to a label for clearing stack, flags, etc. How to get this? GETK delivers keycode 33 but also quits execution. I could press R/S, but ...
KEY 9 GTO xx achieves this if you want to organise your program into a menu-driven structure.
Krauts In Space wrote:
Tue Apr 24, 2018 11:52 am
2nd)
I can switch to graphics mode 200*120 / 400*240 but can't switch back to alphanumeric / stack display. How to get this? I think addressing a virtual variable might do this but I can't find out how.
Not sure but I think EXITALL should achieve this. Give it a go. I don't have my DM42 to hand right now.

Re: Two questions

Posted: Tue Apr 24, 2018 1:27 pm
by Krauts In Space
grsbanks wrote:
Tue Apr 24, 2018 12:28 pm
Krauts In Space wrote:
Tue Apr 24, 2018 11:52 am
1st)
I want a controlled end of my program by polling EXIT key via GETK and jump to a label for clearing stack, flags, etc. How to get this? GETK delivers keycode 33 but also quits execution. I could press R/S, but ...
KEY 9 GTO xx achieves this if you want to organise your program into a menu-driven structure.
As I'm using the whole keyboard for my program, no menus, this doesn't help me.

Re: Two questions

Posted: Tue Apr 24, 2018 2:10 pm
by Thomas Okken
Krauts In Space wrote:
Tue Apr 24, 2018 1:27 pm
grsbanks wrote:
Tue Apr 24, 2018 12:28 pm
KEY 9 GTO xx achieves this if you want to organise your program into a menu-driven structure.
As I'm using the whole keyboard for my program, no menus, this doesn't help me.
Then there is no help for you, I'm afraid. KEY GTO and KEY XEQ are the only ways to redefine EXIT, and pressing EXIT during GETKEY halts program execution, as you noticed. That's it, there are no other options.

Re: Two questions

Posted: Tue Apr 24, 2018 2:19 pm
by Krauts In Space
Thomas Okken wrote:
Tue Apr 24, 2018 2:10 pm
Krauts In Space wrote:
Tue Apr 24, 2018 1:27 pm
grsbanks wrote:
Tue Apr 24, 2018 12:28 pm
KEY 9 GTO xx achieves this if you want to organise your program into a menu-driven structure.
As I'm using the whole keyboard for my program, no menus, this doesn't help me.
Then there is no help for you, I'm afraid. KEY GTO and KEY XEQ are the only ways to redefine EXIT, and pressing EXIT during GETKEY halts program execution, as you noticed. That's it, there are no other options.
Hmmm ... to bad! :/
Nevertheless thanks for you answers.

For my other problem, leaving graphic mode, I also found no solution.
If there's not clean way to leave it, maybe a future extension to GrMod, storing -1 for instance to come back to stack view, would be nice.

Re: Two questions

Posted: Tue Apr 24, 2018 8:57 pm
by PierreMengisen
for the second question, try
" "
AVIEW

Re: Two questions

Posted: Wed Apr 25, 2018 7:42 am
by Krauts In Space
PierreMengisen wrote:
Tue Apr 24, 2018 8:57 pm
for the second question, try
" "
AVIEW
Hello Pierre,
thankyou for your advice but this also didn't work.

Gernot

Re: Two questions

Posted: Wed Apr 25, 2018 7:50 am
by keithdalby