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

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

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

Post by Fox »

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

Post by DOS386 »

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: 27
Joined: Dec 31, 2007 14:24

Post by Laaca »

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:

Post by Fox »

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:

Post by MystikShadows »

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

Post by Fox »

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

Post by DOS386 »

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

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