Rocket Software Homepage
Forum Home Forum Home > AccuTerm Knowledge Base (read only) > Green Screen
  New Posts New Posts RSS Feed - Issue with multiple screen pages and extended mode
  FAQ FAQ  Forum Search   Register Register  Login Login

The AccuTerm forum has moved. Go to community.rocketsoftware.com to register for the new Rocket forum.

Forum LockedIssue with multiple screen pages and extended mode

 Post Reply Post Reply
Author
Message
mkane View Drop Down
Newbie
Newbie


Joined: June 18 2013
Location: United Kingdom
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote mkane Quote  Post ReplyReply Direct Link To This Post Topic: Issue with multiple screen pages and extended mode
    Posted: June 18 2013 at 4:31am
I have been troubleshooting an odd problem with our application which causes the screen to be displayed incorrectly when run in Accuterm. In an effort to track down exactly what is causing the problem, I have written a little test program. I have been successful in replicating the issue in a fairly small chunk of code, but I still haven’t gotten to the root of what’s doing it.

I’m hoping that by sharing my findings on here, somebody will be able to help me pinpoint the problem.

The issue seems to only occur when the following two things are true:

- The session is set up with multiple screen pages (in accuterm settings Terminal > Screen > Screen pages)
- The session switches between normal and extended terminal modes, and the extended mode has over 24 rows.

Here are my session settings:

Terminal emulation : Wyse 60
Screen size (normal) : 80 columns by 24 rows
Screen size (extended) : 160 columns by 46 rows
Screen pages : 2
History rows : 500
Automatic line wrap : enabled

Oh, and I'm running 7.1a sp2 (7.1.1012) on Windows 7 64 bit.

And here is my test program:



     STX = CHAR(2)
     SUB = CHAR(26)
     ESC = CHAR(27)
*
* set up control sequences
*
     CLS = SUB
     FWD = ESC: 'K'
     BCK = ESC: 'J'
     EXTON = ESC: STX: 'E'
     EXTOFF = ESC: STX: 'N'
*
* switch to either normal or extended mode
*
     CRT 'A - extended mode, B - normal mode '
     INPUT A
     BEGIN CASE
       CASE A = 'A'
        CRT EXTON:
        NO.COLS = 160
        NO.ROWS = 46
       CASE A = 'B'
        CRT EXTOFF:
        NO.COLS = 80
        NO.ROWS = 24
       CASE 1
        STOP
     END CASE
*
* forward page and clear screen
*
     CRT FWD: CLS:
     DX = 0; DY = 0; GOSUB Move
*
* fill every row
*
     FOR Y = 1 TO NO.ROWS
       DY = Y - 1
       DX = 0
       GOSUB Move
       STRING = (Y 'R%2'): '/': NO.ROWS 'R%2': STR('.', NO.COLS - 6)
       CRT STRING
    NEXT Y

    DX = 0; DY = 0; GOSUB Move
    STOP

*
**
**
*
Move: ** equiv to @(DX,DY):
*
    STRING = ESC: 'a': (DY + 1) 'R%2': 'R': (DX + 1) 'R%3': 'C'
    CRT STRING:
    RETURN


Please excuse the hard coded sequences, I wanted to completely rule out any device driver complications.

When I run the program and select B (normal mode) the result is as expected:



However when I run the program and select A (extended mode) the screen does not display as expected:



Note that we have a blank line introduced after row 24 – it’s as if Accuterm’s page sizes have got mixed up.

From this point on the session is almost unusable. Clearing the screen only clears the first 24 rows for example. Choosing ‘reset terminal’ from the menu brings back order and everything is fine again.

Is this a bug in Accuterm and are there any workarounds?

Any help or suggestions gratefully received!

Mark
Back to Top
mkane View Drop Down
Newbie
Newbie


Joined: June 18 2013
Location: United Kingdom
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote mkane Quote  Post ReplyReply Direct Link To This Post Posted: June 18 2013 at 7:45pm
Oops, forgot to say the obvious. If I set the 'screen pages' setting back to a single page, the display issue illustrated above doesn't happen. Of course this isn't an option as our application makes much use of terminal paging ..
Back to Top
PSchellenbach View Drop Down
Admin Group
Admin Group

Moderator

Joined: December 15 2003
Location: United States
Status: Offline
Points: 2150
Post Options Post Options   Thanks (0) Thanks(0)   Quote PSchellenbach Quote  Post ReplyReply Direct Link To This Post Posted: June 19 2013 at 12:09pm
Hi Mark -

I have been able to duplicate the problem. I'll let you know when I find the cause.

Thanks,

Pete
Back to Top
PSchellenbach View Drop Down
Admin Group
Admin Group

Moderator

Joined: December 15 2003
Location: United States
Status: Offline
Points: 2150
Post Options Post Options   Thanks (0) Thanks(0)   Quote PSchellenbach Quote  Post ReplyReply Direct Link To This Post Posted: June 21 2013 at 6:09am
Hi Mark -

It appears that the problem is due to the fact that the screen scrolling area is saved for each page. When you are in normal (80 column) mode and switch to the 2nd page, that page has the scrolling region set to the size of the "normal" screen. Now, if you switch back to page 1 and switch to extended (132 column) mode, the first page is re-calculated to use the new page size, but the 2nd page is stuck with the normal page size.

I can fix this in the next release, but for now, I think the only work-around is when changing normal/extended mode, switch to each page and change modes. For example, I modified your code that sets the screen mode as follows:
     BEGIN CASE 

       CASE A = 'A'
        FOR PG=1 TO 2
        CRT FWD:
        CRT EXTON:
        CRT EXTOFF:
        CRT EXTON:
        NEXT PG
        NO.COLS = 160
        NO.ROWS = 46
       CASE A = 'B'
        FOR PG=1 TO 2
        CRT FWD:
        CRT EXTOFF:
        CRT EXTON:
        CRT EXTOFF:
        NEXT PG
        NO.COLS = 80
        NO.ROWS = 24
       CASE 1
        STOP
     END CASE

I know the code looks strange. The only way I could find that would force the screen size to recalculate is to change modes on each page.

Thanks,

Pete
Back to Top
mkane View Drop Down
Newbie
Newbie


Joined: June 18 2013
Location: United Kingdom
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote mkane Quote  Post ReplyReply Direct Link To This Post Posted: June 23 2013 at 8:03pm
Pete,

Thanks very much for your prompt response. I've just tried your work around and it appears to be working nicely. You're a star.

Thanks
Mark
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.03
Copyright ©2001-2019 Web Wiz Ltd.