Article View: comp.os.msdos.programmer
Article #3707Re: flicker free drawing
From: Jerzy Tarasiuk
Date: Fri, 09 Oct 1992 10:45
Date: Fri, 09 Oct 1992 10:45
24 lines
2163 bytes
2163 bytes
Oh, no, cannot do without wait on retrace at all, regardless of how many video pages you have (if your program is quick enough it can fill all pages while first is displayed :-). And should be aware of some video cards which doesn't switch page during display (they wait for retrace to make the requested page active, before retrace they will not change displayed page regardless of how many times program requests it), I don't know what such a card does if page change is requested during vertical retrace: display new page after end of retrace or display once old ? I hope they display new... And, about limiting time: can program timer interrupt to measure amount of time requested by program and write servicing routine which switches tasks; your program can 1. check how much time lasts vertical retrace and how much time lasts displaying to determine how timer chip should be programmed, 2. set timer interrupt service which waits for retrace signal change, programs timer chip (note retrace and display times are different, must reprogram rtimer chip on every interrupt) to get next interrupt immediately before retrace signal change, and activates proper task - display update during retrace, other (assume display updating isn't the only what the program does ? :-) during display. Note setjmp()/longjmp() can be used for task switching in TurboC. For assembly programming - note every task must have own stack and task switch is done by: save all registers on stack, save SS:SP in task descriptor, load new SS:SP from new task descriptor, restore registers from stack, return (registers can be saved in t.d., too).
Technical Details
Message-ID:
<JT.92Oct9114558@fizyk1.fuw.edu.pl>Path:
arc1-ca.pugleaf.net!sparky!uunet!mcsun!sunic!fuw.edu.pl!cocos!jtReferences:
<7052@transfer.stratus.com> <BvrqxE.8GK@news.cso.uiuc.edu>Show Full Headers
Complete Article Headers
Newsgroups: comp.os.msdos.programmer Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!sunic!fuw.edu.pl!cocos!jt From: jt@fuw.edu.pl (Jerzy Tarasiuk) Subject: Re: flicker free drawing In-Reply-To: jas37876@uxa.cso.uiuc.edu's message of Wed, 7 Oct 1992 20:44:00 GMT Message-ID: <JT.92Oct9114558@fizyk1.fuw.edu.pl> Sender: news@fuw.edu.pl Nntp-Posting-Host: fizyk1 Organization: Warsaw University Physics Dept. References: <7052@transfer.stratus.com> <BvrqxE.8GK@news.cso.uiuc.edu> Date: Fri, 9 Oct 1992 10:45:58 GMT Lines: 24