Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!mcsun!hp4nl!eurtrx!euraiv1!reino From: reino@cs.eur.nl (Reino de Boer) Newsgroups: comp.lang.pascal Subject: Re: TP Pageing in Textmode Message-ID: <1989Dec11.085234.2846@cs.eur.nl> Date: 11 Dec 89 08:52:34 GMT References: <21679@adm.BRL.MIL> Organization: Erasmus Universiteit Rotterdam, dept. CS (Informatica) Lines: 45 kb36+@andrew.cmu.edu (Keith Douglas Beiter) writes: >I am writing programs in TP5.0 for a friend that make up a help function >[...text deleted...] he wants to have >the programs I am writing on video page 3 in text mode ($bb00). Since I >am using the MEM command, I can easily send it to page 3. The only >trouble is, I cannot find anything in Turbo Pascal that deals with >changing the visual/active page in text mode. I can use the PAGE Try the following: { uses dos } var old_page : byte; function get_page : byte; var cpu : registers; begin cpu.ah := $0F; { Function 0FH: Get Current Video Mode } intr( $10, cpu ); { ROM BIOS Interrupt 10H: Video Services } get_page := cpu.bh end; procedure set_page( pageno : byte ); var cpu : registers; begin with cpu do begin ah := $05H; { Function 05H: Select Active Page } al := pageno end; intr( $10, cpu ) { ROM BIOS Interrupt 10H: Video Services } end; begin old_page := get_page; set_page( 3 ); { your code } set_page( old_page ); { return to BASIC } end. Hope this helps -- Reino -- Reino R. A. de Boer Erasmus University Rotterdam ( Informatica ) e-mail: reino@cs.eur.nl