Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!princeton!orsvax1!pyrnj!caip!cbmvax!daveb From: daveb@cbmvax.cbm.UUCP (Dave Berezowski) Newsgroups: net.micro.amiga Subject: Re: SuperBitMap, Console IO - Questions Message-ID: <28@cbmvax.cbmvax.cbm.UUCP> Date: Sun, 23-Mar-86 11:52:59 EST Article-I.D.: cbmvax.28 Posted: Sun Mar 23 11:52:59 1986 Date-Received: Tue, 25-Mar-86 04:19:02 EST References: <567@uw-june> Organization: Commodore Technology, West Chester, PA Lines: 52 > By the way, any chance of adding Scrollable regions to the Console devices > repertoire of escape codes? That seems to be the only thing standing between > me and my VAX (VMS) editors (EDT, TPU). > Thanks for any pointers. > Cheers *** REPLACE THIS LINE WITH YOUR MESSAGE *** The console device already has set scrollable region commands (sort of). They can be found in the Amiga DOS Deveoper's Manual on page A-7 (old white book). The commands are: CSI Ps t - set page length CSI Ps u - set line length CSI Ps x - set left offset CSI Ps y - set top offset I've used set top offset and set page length to emulate the scrollable window regions of a VT100; a code segment follows. set_windows(top_row,bottom_row) UBYTE top_row, bottom_row; { WRITE (CSI); /* control sequence introducer $9b */ WRITE ('H'); /* home cursor THIS IS IMPORTANT */ digits(--top_row * 8); /* convert top_row argument to pixels and then to ascii digits */ WRITE (CSI); WRITE (huns); WRITE (tens); WRITE (ones); WRITE ('y'); /* set top offset */ digits (bottom_row - top_row); /* comp length and conv to ascii */ WRITE (CSI); WRITE (tens); WRITE (ones); WRITE ('t'); /* set page length */ The above really isn't a code segment, but I imagine that you get the idea. Some notes: a) WRITE - outputs a char to the console device b) digits - converts a # to its ascii digits in huns, tens, & ones. c) YOU ABSOLUTELY HAVE TO HOME THE CURSOR FIRST d) The ('* 8') is there as I am working with a font that is eight pixels high; you may want to use a variable instead. Have fun! Regards, David Berezowksi (daveb@cbmvax)