SCREEN() doesn't return the character of the work video page

DOS specific questions.
Fox
Posts: 353
Joined: Aug 08, 2006 13:39
Location: Lille, France
Contact:

SCREEN() doesn't return the character of the work video page

Postby Fox » Jul 16, 2008 18:05

Hi,

I am using SCREEN() to retrieve some characters from the display in console mode (80x25). I am using double-buffering, too (that is I output text to a "work" video page and I keep displaying the "active" video page).
The problem I got is that SCREEN(x,y) returns me the character which is on the active (displayed) page, not the work page.

Is it the expected behavior of SCREEN in console mode?
If so, is there any other way I could retrieve some characters from the "work" video page? Unfortunately, I can't make a PCOPY each time I have to retrieve a char, as it makes my display flickering :-(
DOS386
Posts: 798
Joined: Jul 02, 2005 20:55

Re: SCREEN() doesn't return the character of the work video

Postby DOS386 » Jul 17, 2008 9:24

Fox wrote:that SCREEN(x,y) returns me the character which is on the active (displayed) page, not the work page. Is it the expected behavior of SCREEN in console mode?


Maybe a bug (I don't use it) ...

If so, is there any other way I could retrieve some characters from the "work" video page?


As usual, I could solve your problem the low level way with inline ASM ;-)
Laaca
Posts: 25
Joined: Dec 31, 2007 14:24

Postby Laaca » Jul 17, 2008 12:09

If you want to read char from 1,1 of videopage 0, everything is clear:
a = screen (1,1)

Question is position 1,1 of videopage 1.
Did you try this?

a = screen (1,1+maxline)

(in standard 80x25 resolution the maxline=25, of course)
I didn't try it but it could work.
Fox
Posts: 353
Joined: Aug 08, 2006 13:39
Location: Lille, France
Contact:

Postby Fox » Jul 17, 2008 15:24

Laaca wrote:Question is position 1,1 of videopage 1.
Did you try this?

a = screen (1,1+maxline)

(in standard 80x25 resolution the maxline=25, of course)
I didn't try it but it could work.


Hi,

The idea is interesting :-)
Unfortunately, it doesn't work. A SCREEN(1+maxline, 1) still reports the same thing than SCREEN(1,1)...
However, it was worth trying ;-)
MystikShadows
Posts: 612
Joined: Jun 15, 2005 13:22
Location: Upstate NY
Contact:

Postby MystikShadows » Jul 17, 2008 15:43

Yeah Screen(X,Y) works with the visible page because it gets the character of video memory which is always what's displayed (at least in QB....I guess it wouldn't take much to either add an optional parameter or do something independant that can go play in the "work" pages.
Fox
Posts: 353
Joined: Aug 08, 2006 13:39
Location: Lille, France
Contact:

Re: SCREEN() doesn't return the character of the work video

Postby Fox » Jul 18, 2008 19:56

DOS386 wrote:As usual, I could solve your problem the low level way with inline ASM ;-)


Well... If you could, it would be really nice of you :-P
DOS386
Posts: 798
Joined: Jul 02, 2005 20:55

Postby DOS386 » Jul 20, 2008 7:45

I'll try to code something ... just a question of time.

EDIT : Done ! http://www.freebasic.net/forum/viewtopic.php?t=11832

Return to “DOS”

Who is online

Users browsing this forum: No registered users and 2 guests