Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!aplcen!uunet!mcsun!hp4nl!nikhefh!t68 From: t68@nikhefh.nikhef.nl (Jos Vermaseren) Newsgroups: comp.sys.atari.st Subject: Re: How do you create non-scrolling screen regions? Summary: Its very simple Message-ID: <801@nikhefh.nikhef.nl> Date: 9 Mar 90 11:00:42 GMT References: <2344@ultb.isc.rit.edu> Organization: Nikhef-H, Amsterdam (the Netherlands). Lines: 37 In article <2344@ultb.isc.rit.edu>, ajy2208@ultb.isc.rit.edu (A.J. Yarusso) writes: > Hi everyone, > > I need to know how to create region(s) on the screen that are > independent from normal screen i/o (mainly, scrolling..). Most terminal > programs have a line or two somewhere on the screen that doesn't scroll. > Usually these are status displays to show useful information (baud rate, > system connected to, various toggles, etc..). > > I've searched my wonderful MWC manual, but there's no mention on how > to create something to this effect. If I had $250 to plunk down for > developer docs, I'd do that. If Atari was more leniant with disclosure The docs wouldn't help you, because the trick is very simple. 1: Compute how meny bytes there are in the region you want to keep fixed (like two lines in monochrome = 80*16*2 bytes) 2: Ask via the XBIOS for the Logbase pointer. Keep it for later. 3: Subtract the computed amount 4: Set the new Logbase via the XBIOS 5: Insert and delete lines to your hearts content, but never put the cursor in the top lines (the two lines of the example don't really exist. Don't use a clear screen or any other code that would affect the non existing lines. 6: After scrolling, put the Logbase back to its old value. If you start with asking for the resolution you can make this fully portable. If you want this to work also for non standard fonts you have to determine the font height first. This height can be found at the negative Line-A variables. They are described in a book by Katherine Peel (in one of the appendices). Alternative way of finding: play around with some standard fonts and a debugger. The bytes with a negative offset of at most 46 from what dc.w $A000 returns in a0 have been fixed by Atari. (it is amazing how many programs get confused by a 8*12 font. Even GEM shows a few bugs). Jos Vermaseren