From: rosenkra@convex.com (William Rosenkranz)
Subject: Re: Making the screen one line shorter (at the bottom) -- How?
Organization: CONVEX Computer Corporation, Richardson, Tx., USA
Date: Sat, 11 Apr 1992 09:13:06 GMT
X-Disclaimer: This message was written by a user at CONVEX Computer
              Corp. The opinions expressed are those of the user and
              not necessarily those of CONVEX.


while we are on the subject of portability, is using Physbase() to twiddle
pixels considered portable these days? it is a documented Xbios function.
what about _v_base_ad ($44E)? again a documented "guaranteed not to change"
system variable. if not, why? please don't tell me "because some add on
graphics cards only grok VDI". they are the ones breaking the rules as i
see it if this is the case. will either of these work on a TT? i believe
MiNT still defines Physbase() in <osbind.h> (correct me if i am wrong) so
that this should work under MiNT at least. what does the TT developer's
docs say about Physbase and v_base_ad? are these ok? does this function
and variable exist in the TT TOS? in the same location as other TOS versions?
since it is doubtful that i will ever have a TT or add-on graphics card,
i really could care less for my own use. however, if i could make a program
portable with relatively little effort, i'd like to know. otherwise, i will
stick to accepted/sanctioned 1990 and earlier programming practice (line A,
Physbase, etc).

i can understand not using line A since the TT does not support it (eventho
this has previously been condoned by atari, even encouraged [see Dec 17, 1989
S.A.L.A.D. docs]). not having access to Xbios or system variables is just
plain unacceptable in my book. these were something we were supposed to be
able to rely on from 1985 onwards. progress is one thing. major changes
to common (at least by me) programming practices is another.

what are the acceptable methods of changing system fonts, without GDOS or
equivalent? do the VDI functions work without GDOS? is there any way to
change fonts in a portable way without GDOS or VDI? how are fonts loaded
on the TT? does it come with GDOS or equiv? does the TT have a termcap-like
capability? vt52/vt100?

in lieu of all of these methods, can someone post self-contained, portable
routines to draw lines and set pixels? something like:

	void draw_line (int x1, int y1, int x2, int y2);
	void set_pixel (int x, int y, int on_off);

i don't want to open a workstation anywhere else in the code. doing this
with both line A and Physbase is trivial, well documented, localized to
small areas of code, and fast. i am thinking monochrome, but a color
solution would also work. can these be implemented like this:

	void set_pixel(int x, int y, int on_off);
	{
		open_worstation();
		do_pixel(x, y, on_off);
		close_workstation();
	}

ie contain all the VDI functions in one routine. i realize this would
otherwise be painfully slow, but at least a check can be made for
"standard" config to bypass the VDI trash. this means that the workstation
would be repeatedly openned/closed each time graphics were needed. text
could be positioned with normal vt52 (curses/termcap/whatever).

i ask these questions because i want to make some major changes to my
mgif, manpager, and nroff codes. they were posted in sort of a reasonable
tho somewhat hackish form and i want to try and improve them if i can find
the time. how is the screen driver for ghostscript written? is it portable
(ie run on TT and special graphics cards)?

-bill
rosenkra@convex.com
-- 
Bill Rosenkranz            |UUCP: {uunet,texsun}!convex!rosenkra
Convex Computer Corp.      |ARPA: rosenkra@convex.com