[comp.sys.atari.st] Info-Atari16 Digest V86 #32

Info-Atari16@SCORE.STANFORD.EDU (Info-Atari16 Digest) (12/04/86)

Info-Atari16 Digest   Thursday, December  4, 1986   Volume 86 : Issue 32

This weeks Editor: Bill Westfield

Today's Topics:

                            Administrivia
                               Re: less
                    Intercepting keystrokes on ST
             Re: Info-Atari16 Digest V86 #21  (breakout)
              Re: Re: yet another # of files limitation
                         Lost Bitnet digests
                           OSS Prolog Query
                      another try: wanted: datab
                      APL.68000 - more questions
             SPEAK.ARC - how does one do file redirection
                              arc - help
            Re: Public Domain Midi Software (attn: Pixar)
                Re: RAMDISK that survives system reset
                   Re: 520ST/1040ST DEVELOPMENT KIT
                      Saving the cursor position

----------------------------------------------------------------------
From: Info-ATARI16-Request@Score.Stanford.edu
Subject: Administrivia

Two different digests labeled Volume 86 Issue 30 were mailed out.
This is Issue 32, and there was NO issue 31.

Sorry for any resulting confusion.

BillW

------------------------------
Date: 1 Dec 86 23:55:31 GMT
From: s.cc.purdue.edu!afo@h.cc.purdue.edu  (Alan Davis)
Subject: Re: less
To: info-atari16@score.stanford.edu

>Could someone please send me a copy of LESS and SPEECH, I couldn't get
>either to work.

Me too!!

Alan Davis
Purdue University Computing Center

USENET:   {seismo, decvax, ucbvax, ihnp4}!pur-ee!s.cc!afo
BITNET: ADAVIS@PURCCVM

------------------------------

Date: 2 Dec 86 00:12:15 GMT
From: phri!orville!dvm!dave@nyu.arpa  (David Brand)
Subject: Intercepting keystrokes on ST
To: info-atari16@score.stanford.edu

WANTED: some sort of routine that catches control-C on the Atari ST
and (ideally) emulates a signal() call, but in desperation, I'll take
anything that just sets a flag when ctrl-C is hit.

The keystroke intercept routine from a memory resident utility would
probably be ideal.

If such a routine is not currently available, I could use some pointers
on where these characters are available to be intercepted.  Taking them
out of the acia seems to reset the interrupt condition and I don't feel
like duplicating Atari's entire ROM input routine.

Any pointers, references, hints... would be GREATLY appreciated.
-- 

					- Dave

...{decvax,ihnp4,ucbvax}!allegra!phri!orville!dvm!dave

------------------------------

Date: 2 Dec 86 01:26:45 GMT
From: imagen!atari!neil@ucbvax.Berkeley.EDU  (Neil Harris)
Subject: Re: Info-Atari16 Digest V86 #21  (breakout)
To: info-atari16@score.stanford.edu

BREAKOUT.ACC is NOT a public domain program!  It is an unfinished product of
Atari Corporation and is not meant for general distribution.

--->Neil @ Atari

...{hoptoad, lll-lcc, pyramid, imagen, sun}!atari!neil

BIX: neilharris		CIS: 70007,1135		Delphi: NEILHARRIS
GENIE: nharris		WELL: neil		Atari Corp. BBS 408-745-5308

US Mail: Atari Corp.
         1196 Borregas Ave.
         Sunnyvale, CA 94086

"Loose chips sink ships."

[ BREAKOUT.ACC has been deleted from the INFO-ATARI archives.
  Stanford and I, of course, take no responsibility for things
  posted through us.  We're just a dumb program.  This sort of
  thing is one of the reasons why the INFO-IBMPC archives at ISI
  are run on a "source only" basis.  Please everyone be more careful,
  so that we don't need to do anything similar here...   --BillW]

------------------------------

Date: 1 Dec 86 19:17:17 GMT
From: imagen!atari!apratt@ucbvax.Berkeley.EDU  (Allan Pratt)
Subject: Re: Re: yet another # of files limitation
To: info-atari16@score.stanford.edu

The Desktop can't handle more than 400 (or so) files in ALL open
windows put together.  I'm not sure about imagen!turner's 256-file
limit in one window, but I am sure that the root directory of each
device is of limited size, and subdirectories are NOT limited.  If
there is such a limit, it is imposed by the desktop, not the OS, so
if you abandon the desktop (in favor of a CLI-type shell) you will not
find most of these limits.

The 40-folder limit stands.  The rumors that it's gone are greatly
exaggerated.  You can sometimes create more than that, but this limit
is like a loaded gun: just point and click.

/----------------------------------------------\
| Opinions expressed above do not necessarily  |  -- Allan Pratt, Atari Corp.
| reflect those of Atari Corp. or anyone else. |     ...lll-lcc!atari!apratt

------------------------------

Date: 2 DEC 86 12:28-N
From:  U00170%HASARA5.BITNET@WISCVM.WISC.EDU
To:  INFO-ATARI16@SU-SCORE.ARPA
Subject: Lost Bitnet digests

Hello Bill.

I just read in the atari16 digest #30(b) that the gateway machine
in Wisconsin was off the air for some day's.
Bitnetters have not received the digests 19-25. Maybe you could
be so kind to send these seven digests again via Wisc.Edu.
Greetings,
Berend F. de Vries.
U00170@HASARA5 (BITNET)

[The missing digests are being remailed to bitnet recipients at the
 rate of about two per day, except for Issue 21, which contained BREAKOUT]

------------------------------

Date: 2 Dec 86 08:38:28 GMT
From: atwell@utah-cs.arpa  (Bart L. Atwell)
Subject: OSS Prolog Query
To: info-atari16@score.stanford.edu

I have seen OSS Prolog for sale and I was wondering if anyone has used
it and has any comments on it.  I've seen Turbo Prolog blasted as not being
real Prolog (real Prolog doesn't have strong typing).  What about OSS?

Bart

------------------------------

DATE:    02 DEC 86 13:35 CET
TO:  INFO-ATARI16@SU-SCORE
FROM:  T235301%DM0LRZ01.BITNET@WISCVM.WISC.EDU
SUBJECT: another try: wanted: datab

I am looking for a small database system for my ST that can be
linked to C, Pascal and/or Fortran programs. Maybe good ISAM
routines (multiple secondary indices, ...) will do also.
I would prefer public domain, but if the programs are not too expensive
I could spend some DM's on them (but not hundreds for VIP|)
Does anyone out there in net-word know some programs???
Please let me know too|

Thank you in advance,
Bernhard Schneck
<T235301 @ dm0lrz01 . bitnet>

------------------------------

Date: Tue, 02 Dec 86 17:01:43 SET
To:  info-atari16@su-score.ARPA
From:  XCG112%DBNUAMA1.BITNET@WISCVM.WISC.EDU
Subject: APL.68000 - more questions

In article <581@water.UUCP>, jdickey@SPAM.ISTC.SRI.COM (Lee Dickey) writes:

> ...This APL has followed the lead of IBM in several ways. ...

Since I have been using both VS APL on a VM/CMS system and the (fairly
recent) APL/PC on the PC/AT, I'm very interested in this APL.68000. So
I have several questions:

   -  How IBM-like is it ? Does it use the same APL workspace format
      as APL/PC ? Or is there at least some means of conversion, so that
      applications can be ported from the PC/AT to the ST ?

   -  How is the AP (auxiliary processor) concept implemented ? What APs
      are provided ? Do they correspond to the IBM APs, either in name
      (e.g. AP100 etc) or in usage ?

   -  Are there any printer drivers provided ? The IBM APL/PC does give
      APL character print features on all EPSON-compatible dot matrix
      printers (in 8-dot mode only). Is the user able to reconfigure the
      printer drivers or switch between different types of printer ?

   -  What is the retail price, and should I (from Germany) order it in
      the UK or directly in the USA ?

Both help with these questions and information on other APL implementations
will be appreciated.

                             Volker A. Brandt (XCG112@DBNUAMA1.BITNET)
                                              (Bonn, West Germany)

------------------------------

Date: Tue, 2 Dec 86 10:54:51 est
From: Eric Terrell <terrell@ohio-state.ARPA>
To: info-atari16@su-score.arpa
Subject: SPEAK.ARC - how does one do file redirection


I downloaded and unARCed the speak.arc file, but it is a mystery to me
how the file redirection is accomplished.  Does one have to have one of
the "shells" to accomplish this?

Thanks in advance,

Terrell

------------------------------

Date: Tuesday, 2 December 1986 12:29:55 EST
From: Bill.von.Hagen@gauss.ece.cmu.edu
To: info-atari16@su-score.arpa
Subject: arc - help

I am a poor unfortunate who has never managed to get a copy of arc to
dowload sucessfully to my ST.   Could someone please e-mail me one which had
proved downloadable (and runable)?  As more software arrives which is in arc
format, I am really feeling the need for this.

	Thanks very much!
		
		Bill von Hagen (wvh@gauss.ece.cmu.edu)

------------------------------

Date: 30 Nov 86 18:12:12 GMT
From: trwrb!sansom@ucbvax.Berkeley.EDU  (Richard Sansom)
Subject: Re: Public Domain Midi Software (attn: Pixar)
To: info-atari16@score.stanford.edu

> To the person who responded to my request for public domain MIDI
> software, from "Pixar" in Marin County, CA:

"Pixar", aren't you a division of Lucasfilm/ILM?  If so, could we
please get whatever you have to offer posted to the net?  If that's not
possible, I'll settle for email ;-)

-Rich

-- 
 __________ ______ ____ _____ ___
/_________//___   ||__|/____|/__/   Richard E. Sansom
   ___    ____/  / ____________     TRW Electronics & Defense Sector
  /  /   /  /\  <  |    /|    /     One Space Park Drive, R3/1028
 /  /   /  /  \  \ |   / |   /      Redondo Beach, CA 90278
/__/   /__/    \__\|__/  |__/       ...{decvax,ucbvax,ihnp4}!trwrb!sansom

------------------------------

Date: Tue, 2 Dec 86 13:34:06 est
From: <ram%yale-ring@YALE.ARPA>
Subject: Re: RAMDISK that survives system reset
To: info-atari16@su-score.ARPA
In-Reply-To: Info-Atari16 Digest <Info-Atari16@Score.Stanford.EDU>, Mon 1 Dec 86 12:19:29 PST

>    From: Eric Terrell <terrell@ohio-state.ARPA>    
>
>    I will be posting a ramdisk program that survives system resets.
>    UNarc the file, and then follow the instructions in eternal.txt.
    
You might give us some additional information... Is this the same ramdisk
(due to John Harris) that was posted a while ago or is this a new one?  Does
it autoload from the AUTO folder?  Is it resizable?

[To other potential posters:]

Please try to include *some* information in the postings.  I love the software
but it is annoying to read "Here is a nifty program... download it, uudecode
it, unarc it, and then read the help file to see what it does" as the only
description of a large uuencoded program.  (I'm exagerating, of course, but
you get the idea.)  A small well-chosen description can save users a lot of
trouble if they can figure out if (a) they want it, (b) they already have it,
and (c) their particular system configuration can run it, without having to go
through the trouble of downloading the program to find out the hard way.

Thanx!

-- Ashwin.

ARPA:    Ram-Ashwin@yale
UUCP:    {decvax,linus,seismo}!yale!Ram-Ashwin
BITNET:  Ram@yalecs

[Yes, please!    -BillW]

------------------------------

Date: Tue, 2 Dec 86 12:32:23 pst
From: neville@ads.ARPA (Neville Newman)
To: info-atari16@score.stanford.edu
Subject: Re: 520ST/1040ST DEVELOPMENT KIT

i contacted the parties associated with both ads.  These were
just normal one-time sales of no-longer used software/hardware.
The only thing worth getting upset about is having missed the
great deals.
						-neville

------------------------------

Date:           Tue, 2 Dec 86 17:11 EDT
From:              <RDROYA01%ULKYVX.BITNET@WISCVM.WISC.EDU> (Robert
Subject:        Saving the cursor position
To:  INFO-ATARI16@SU-SCORE.ARPA
X-Original-To:  INFO-ATARI16@SU-SCORE.ARPA

I have a text editor that allows terminal connections via the serial line
and vt52 emulator (but without the desktop).  Currently I save the terminal
screen each time I return to the editor, and restore it when I reconnect.
One problem I have is that I'd like to save the cursor position for each
terminal connection so I can restore it when I return to the remote.  The
problem is that the save cursor command (ESC j) is wiped out by any call to
erase to end of page or erase to end of line.  Since the text editor has to
use these functions (I've tried to code around them, but update without them
is too slow), I need to find a way to record the current cursor position
that is returned by ESC j.  Does anyone know where the OS saves this info
and how I can get at it to restore the position when needed?

BTW even though it's not documented, ESC K (clear to end of line) destroys
the remembered position also.

Thanks in advance and all that,

Robert Royar

------------------------------

End of Info-Atari16 Digest
**************************
-------

sgstree@cad.Berkeley.EDU@polyslo.UUCP (Samuel Streeper) (12/06/86)

To the person who asked about how to save the cursor position:

The wrong way - if you output esc-j esc-k (save cursor immediately followed
by restore cursor), you will find that upon return d0 has cursor x 
coordinate, and d1 has cursor y coordinate.

A better way:
(pointed out to me by jwahar bammi)
After line-a initialization register a0 points to the line a variables.
Assuming that a0 has that pointer,

	move.w -28(a0),d0
	move.w -26(a0),d1

will leave x in d0, y in d1. I wish I could find documentation on the line
a variables. Can any one help out? For example, I have noticed that
the mouse coordinates may be found at -602(a0) and -600(a0).
Are these stable?
                             Samuel Streeper

bammi@cwruecmp.UUCP (Jwahar R. Bammi) (12/10/86)

In article <8612060458.AA20395@polyslo.UUCP> sgstree@cad.Berkeley.EDU@polyslo.UUCP (Samuel Streeper) writes:

>will leave x in d0, y in d1. I wish I could find documentation on the line
>a variables. Can any one help out? For example, I have noticed that
>the mouse coordinates may be found at -602(a0) and -600(a0).
>Are these stable?

	There seems to be lack of Line A documentation around. I hope the
following include file that i cooked up a while ago helps:

usenet: .....!decvax!cwruecmp!bammi		jwahar r. bammi
csnet:       bammi@case
arpa:        bammi%case@csnet-relay
compuServe:  71515,155

--aline.h--

		/***********************************************\
		*						*
		*       	     aline.h			*
		*	Common include file for C interface	*
		*	to low level Line A calls		*
		*						*
		*	J.R. Bammi				*
		*	  decvax!cwruecmp!bammi			*
		*	  bammi%case@csnet-relay.ARPA		*
		*	  bammi@case.CSNET			*
		*						*
		\***********************************************/

#include "compiler.h"		/* Compiler dependant defines	*/
				/* Defines things like WORD, LONG etc */

/*****************************************************************************\
*		                                                              *
*                                 Defines                                     *
*									      *
\*****************************************************************************/

/*
 *  Object colors (default pallette)
 *
 */
#define WHITE    0
#define BLACK    1
#define RED      2
#define GREEN    3
#define BLUE     4
#define CYAN     5
#define YELLOW   6
#define MAGENTA  7
#define LWHITE   8
#define LBLACK   9
#define LRED     10
#define LGREEN   11
#define LBLUE    12
#define LCYAN    13
#define LYELLOW  14
#define LMAGENTA 15


/* 
 * Vdi writing modes
 *
 */
#define MD_REPLACE 1
#define MD_TRANS   2
#define MD_XOR     3
#define MD_ERASE   4


/*
 * Raster Op Codes
 *
 */
#define ALL_WHITE  0
#define S_AND_D    1
#define	S_AND_NOTD 2
#define S_ONLY     3
#define NOTS_AND_D 4
#define	D_ONLY     5
#define S_XOR_D    6
#define S_OR_D     7
#define	NOT_SORD   8
#define	NOT_SXORD  9
#define D_INVERT  10
#define	NOT_D     11
#define	S_OR_NOTD 12
#define NOTS_OR_D 13
#define	NOT_SANDD 14
#define ALL_BLACK 15

/*
 * Sprite formats
 *
 */
#define SP_VDI	    0
#define SP_XOR	    1

/*
 * Line A Opcodes
 *
 */
#define	INIT		0
#define PUTPIXEL	1
#define GETPIXEL	2
#define LINE		3
#define HLINE		4
#define RECTANGLE	5
#define FPOLYGON	6
#define BITBLT		7
#define TEXTBLT		8
#define SHOWMOUSE	9
#define HIDEMOUSE	10
#define TRANMOUSE	11
#define USPRITE		12
#define DSPRITE		13
#define CPYRASTER	14
#define FSEEDFILL	15	/* ROM TOS only	*/




/*****************************************************************************\
*		                                                              *
*                                 Types                                       *
*									      *
\*****************************************************************************/

	/* A pointer to the type LINEA is returned by the Line A init call
	 * ($A000), in registers A0 and D0.
         * This pointer is saved in the global variable 'linea'.
	 *
	 */
typedef struct {

/* Type    Name       Offset   Function		    Comments		      */
/* -------------------------------------------------------------------------  */
   WORD   VPLANES;    /*  0  # of Planes	 Also see CurrRez             */
   WORD	  VWRAP;      /*  2  Bytes / scan line    "    "    "                 */
		      /*     VWRAP can be changed to implement special effects*/
		      /*     Doubling VWRAP will skip every other scan line   */
		      /*					              */
		      /*                                                      */
   WORD	  *CONTRL;    /*  4  Ptr to CONTRL Array  Contrl gets set to this     */
   WORD	  *INTIN;     /*  8  Ptr to INTIN  Array  Intin  gets set to this     */
   WORD	  *PTSIN;     /* 12  Ptr to PTSIN  Array  Ptsin  gets set to this     */
   WORD   *INTOUT;    /* 16  Ptr to INTOUT Array  Intout gets set to this     */
   WORD   *PTSOUT;    /* 20  Ptr to PTSOUT Array  Ptsout gets set to this     */
		      /*     CONTRL is the control array		      */
		      /*     INTIN is the array of input parameters	      */
		      /*     PTSIN is the array of input coordinates          */
		      /*	  Even entrys are X coordinate		      */
		      /* 	  Odd  entrys are corresponding Y coodinates  */
		      /*     INTOUT is the array of output parameters         */
		      /*     PTSOUT is the array of output coordinates        */
		      /*	organizes like PTSIN.			      */
		      /*					              */
   WORD   COLBIT0;    /* 24  Plane 0 Color Value  All Three Rez's	      */
   WORD   COLBIT1;    /* 26  Plane 1 Color Value  Med and Low Rez only	      */
   WORD	  COLBIT2;    /* 28  Plane 2 Color Value  Low Rez only 		      */
   WORD   COLBIT3;    /* 30  Plane 3 Color Value  Low Rez Only 		      */
		      /*     Foreground color COLBIT0 + 2*COLBIT1 + 4*COLBIT2 */
		      /*	              + 8*COLBIT3		      */
		      /*					              */
		      /*                                                      */
   WORD	  LSTLIN;     /* 32  Always set to -1, Done for you in Init_Aline     */
		      /*     Does anyone know what it is supposed to be?      */
		      /*					              */
   WORD   LNMASK;     /* 34  Linemask used when drawing lines, same as Vdi's  */
		      /*     line style                                       */
		      /*					              */
   WORD	  WMODE;      /* 36  Writing mode                                     */
		      /*     0=Replace Mode-Replace all bits in Dest with src */
		      /*     1=Trans. Mode-Only additional bits in src set(OR)*/
		      /*     2=Xor Mode- Src XOR Dest			      */
		      /*     3=Inverse Trans.- (NOT src) Or Dest              */
		      /*     Values upto 16 are permitted                     */
		      /*					              */
   WORD   X1;	      /* 38  X1 coordinate used in various calls              */
		      /*					              */
   WORD   Y1;         /* 40  Y1 coordinate used in various calls              */
		      /*					              */
   WORD   X2;         /* 42  X2 coordinate used in various calls              */
		      /*					              */
   WORD   Y2;         /* 44  Y2 coordinate used in various calls              */
		      /*					              */
		      /*                                                      */
   WORD   *PATPTR;    /* 46  Pointer to current fill pattern                  */
                      /*     Must be integral power of 2 (words) in length    */
   WORD   PATMSK;     /* 50  I don't know why they call it a mask. It is in   */
		      /*     reality the length in words of the current patt. */
   WORD   MFILL;      /* 52  Multi Plane fill flag 1 == Current fill Pattern  */
		      /*     is for Muti Plane.                               */
		      /*                                                      */
		      /*                                                      */
   WORD   CLIP;       /* 54  Clipping Flag 1 == TRUE                          */
   WORD   XMINCL;     /* 56  Min X of clipping window			      */
   WORD   YMINCL;     /* 58  Min Y of clipping window                         */
   WORD   XMAXCL;     /* 60  Max X of clipping window			      */
   WORD   YMAXCL;     /* 62  Max Y of clipping window                         */
		      /*                                                      */
		      /*                                                      */
   WORD   XDDA;       /* 64  Accumulator for Scaling, Must be set to 0x08000  */
                      /*     before each call to Text Blt. Done for you in    */
		      /*     in aline_text()                                  */
   WORD   DDAINC;     /* 66  Scaling factor - Fractional amount to scale char */
		      /*     When scaling up = 256 *(Size-Textsize)/Textsize  */
		      /*     When scaling down = 256*(Size)/Textsize          */
		      /*     scaling down does not work                       */
   WORD   SCALDIR;    /* 68  Scaling direction 0 == down                      */
   WORD   MONO;       /* 70  Mono flag 0== current font is a propotional font */
		      /*     Its Ok for Thickening to increase the width of   */
		      /*     the current character.                           */
		      /*     1 == current font is mono spaced, so thickening  */
		      /*     may not increase the width of the current char   */
		      /*                                                      */
   WORD   SOURCEX;    /* 72  X coordinate of character in the font form       */
		      /*     SOURCEX is caluclated from info in the font      */
		      /*     header for the current font (see FONT_HEAD type) */
		      /*     SOURCEX = off_table[char-first_ade]	      */
		      /*     SOURCEX is calculated for you in aline_text()    */
		      /*     The pointer to a table of font header for the    */
		      /*     internal fonts is returned in A2 on init (A000)  */
   WORD   SOURCEY;    /* 74  Y coodinate of character in the font form        */
		      /*     Typically set to 0 (top line of font form)	      */
   WORD   DESTX;      /* 76  X coordinate of character on screen              */
   WORD   DESTY;      /* 78  Y coordinate of character on screen              */
   WORD   DELX;       /* 80  Width of Character				      */
		      /*     Difference between two SOURCEX's	              */
   WORD   DELY;       /* 82  Height of Character                              */
		      /*     form_height field of FONT_HEAD of current font   */
   WORD   *FBASE;     /* 84  Pointer to start of font form                    */
   WORD   FWIDTH;     /* 88  Width of the current font's form                 */
		      /*                                                      */
   WORD   STYLE;      /* 90  Vector of style flags			      */
		      /*     Bit 0 = Thicken Flag			      */
		      /*     Bit 1 = Lighten Flag			      */
		      /*     Bit 2 = Skewing Flag			      */
		      /*     Bit 3 = Underline Flag (ignored)		      */
		      /*     Bit 4 = Outline Flag			      */
		      /*                                                      */
   WORD   LITEMASK;   /* 92  Mask used for lightening text      	      */
		      /*     The Mask is picked up from the font header       */
   WORD   SKEWMASK;   /* 94  Mask used for skewing text			      */
		      /*     The Mask is picked up from the font header       */
   WORD   WEIGHT;     /* 96  The number of bits by which to thicken text      */
		      /*     The number is picked up from the font header     */
   WORD   ROFF;       /* 98  Offset above baseline when skewing               */
                      /*     Again picked up from the font header             */
   WORD   LOFF;       /* 100 Offset below character baseline when skewing     */
                      /*     Again picked up from the font header             */
		      /*                                                      */
   WORD   SCALE;      /* 102 Scaling Flag 1 == true                           */
		      /*                                                      */
   WORD   CHUP;	      /* 104 Character rotation vector.                       */
   		      /*     0 = normal (0 degrees)			      */
		      /*     1800 = 180 degrees				      */
      		      /*     2700 = 270 degrees                               */
		      /*                                                      */
   WORD   TEXTFG;     /* 106 Text foreground color			      */
		      /*                                                      */
   char   *SCRTCHP;   /* 108 Address of buffer required for creating special  */
		      /*     text effects. The size of this buffer should be  */
		      /*     1K according the Internals. The Atari document   */
		      /*     of course does not talk about such things :-)    */
                      /*                                                      */
   WORD   SCRPT2;     /* 112 The offset of the scaling buffer buffer in above */
                      /*     buffer. Internals suggests an offset of 0x0040   */
                      /*     As usual the Atari document does'nt say a thing  */
                      /*                                                      */
   WORD   TEXTBG;     /* 114 Text background color (Ram Vdi only)             */
                      /*     used for the BitBlt writing modes (4-19) only    */
                      /*                                                      */
   WORD   COPYTRAN;   /* 116 Copy raster form type flag (Ram vdi only)        */
                      /*     0 => Opaque type                                 */
                      /*          n-plane source  ->  n-plane dest            */
                      /*              BitBlt writing modes (4-19)             */
                      /*    ~0 => Transparent type                            */
                      /*          1-plane source  ->  n-plane dest            */
                      /*              Vdi writing modes (1-3)                 */
                      /*                                                      */
   WORD(*SEEDABORT)();/* 118 Pointer to function returning int, which is      */
                      /*     called by the fill logic to allow the fill to    */
                      /*     be aborted. If the routine returns FALSE (0)     */
                      /*     the fill is not aborted. If it returns TRUE (~0) */
                      /*     the fill is aborted                              */
/* -------------------------------------------------------------------------  */

} LINEA;              /*       P H E W !!!!!                                  */


	/*
	 * Global Variables at negative offsets from the Line A parameter
	 * block address returned by init.
	 *
	 */
/* Offset	Type	Description					      */
/* -------------------------------------------------------------------------- */
/* -4		 W	Max Y pixel screen value			      */
/* -6		 W	Text Status byte				      */
/* -10		 L	Font offset table address			      */
/* -12		 W	Max X pixel screen value			      */
/* -14		 W	Font Width					      */
/* -16		 W	First font ASCII code (first_ade)		      */
/* -18		 W	Last  font ASCII code (last_ade )                     */
/* -22		 L	Font address					      */
/* -23		 B	Cursor countdown timer				      */
/* -24		 B	Cursor flash interval				      */
/* -26		 W	Y cursor position				      */
/* -28           W	X cursor position				      */
/* -30		 W	Offset to first cell				      */
/* -34		 L	Current cursor address				      */
/* -36		 W	Foreground color index				      */
/* -38		 W	Background color index				      */
/* -40		 W	Offset to next cell				      */
/* -42           W	Max cells high - 1				      */
/* -44		 W	Max cells across - 1				      */
/* -46		 W	Cell height in pixels				      */
/* -------------------------------------------------------------------------- */

/*
 * Atari did'nt specify any names for these variables
 * so i invented them!
 *
 */
#define MAXY		*((WORD  *)((char  *)aline + (char  *) -4L))
#define TEXTSTATUS	*((WORD  *)((char  *)aline + (char  *) -6L))
#define FONTOFFTABLE	*((char **)((char **)aline + (char **)-10L))
#define MAXX		*((WORD  *)((char  *)aline + (char  *)-12L))
#define FONTWIDTH	*((WORD  *)((char  *)aline + (char  *)-14L))
#define FIRSTADE	*((WORD  *)((char  *)aline + (char  *)-16L))
#define	LASTADE		*((WORD  *)((char  *)aline + (char  *)-18L))
#define FONTDATA	*((char **)((char **)aline + (char **)-22L))
#define	CURTIMER	*((char  *)((char  *)aline + (char  *)-23L))
#define CURINTERVAL	*((char  *)((char  *)aline + (char  *)-24L))
#define CURX		*((WORD  *)((char  *)aline + (char  *)-26L))
#define	CURY		*((WORD  *)((char  *)aline + (char  *)-28L))
#define	FSTOFFSET	*((WORD  *)((char  *)aline + (char  *)-30L))
#define	CURADDRESS	*((char **)((char **)aline + (char **)-34L))
#define	FGCOLOR		*((WORD  *)((char  *)aline + (char  *)-36L))
#define	BGCOLOR		*((WORD  *)((char  *)aline + (char  *)-38L))
#define	NOFFSET		*((WORD  *)((char  *)aline + (char  *)-40L))
#define	CELLSHIGH	*((WORD  *)((char  *)aline + (char  *)-42L))
#define	CELLSACROSS	*((WORD  *)((char  *)aline + (char  *)-44L))
#define	CELLHEIGHT	*((WORD  *)((char  *)aline + (char  *)-46L))


	/* A pointer to array of type FONT is returned by the Line A init call
	 * ($A000), in regsister A1.
         * This pointer is saved in the global array variable 'fnt'.
	 *
	 */

typedef struct _font {

/* Type    Name       Offset   Function		    Comments		      */
/* -------------------------------------------------------------------------  */
   WORD   face_id;    /*  0 Font face identifier  1 == system font            */
                      /*                                                      */
   WORD   size;       /*  2 Font size in points                               */
                      /*                                                      */
   char   name[32];   /*  4 Face name                                         */
                      /*                                                      */
   WORD   first_ade;  /* 36 Lowest ADE value in the face (lowest ASCII value  */
                      /*    of displayable character).                        */
                      /*                                                      */
   WORD   last_ade;   /* 38 Highest ADE value in the face (highest ASCII value*/
                      /*    of displayable character).                        */
                      /*                                                      */
   WORD   top;        /* 40 Distance of top line relative to baseline         */
                      /*                                                      */
   WORD   ascent;     /* 42 Distance of ascent line relative to baseline      */
                      /*                                                      */
   WORD   half;       /* 44 Distance of half line relative to baseline        */
                      /*                                                      */
   WORD   descent;    /* 46 Distance of decent line relative to baseline      */
                      /*                                                      */
   WORD   bottom;     /* 48 Distance of bottom line relative to baseline      */
                      /*    All distances are measured in absolute values     */
                      /*    rather than as offsets. They are always +ve       */
                      /*                                                      */
   WORD   wchar;      /* 50 Width of the widest character in font             */
                      /*                                                      */
   WORD   wcell;      /* 52 Width of the widest cell character cell in face   */
                      /*                                                      */
   WORD   left_off;   /* 54 Left Offset see Vdi appendix G                    */
                      /*                                                      */
   WORD   right_off;  /* 56 Right offset   "      "     "                     */
                      /*                                                      */
   WORD   thicken;    /* 58 Number of pixels by which to thicken characters   */
                      /*                                                      */
   WORD   underline;  /* 60 Width in  pixels of the underline                 */
                      /*                                                      */
   WORD   lighten;    /* 62 The mask used to lighten characters               */
                      /*                                                      */
   WORD   skew;       /* 64 The mask used to determine when to perform        */
                      /*    additional rotation on the character to perform   */
                      /*    skewing                                           */
                      /*                                                      */
   WORD   flags;      /* 66 Flags                                             */
                      /*      bit 0 set if default system font                */
                      /*      bit 1 set if horiz offset table should be used  */
                      /*      bit 2 byte-swap flag (thanks to Intel idiots)   */
                      /*      bit 3 set if mono spaced font                   */
                      /*                                                      */
   WORD   *h_offset;  /* 68 Pointer to horizontal offset table                */
                      /*                                                      */
   WORD   *off_table; /* 72 Pointer to character offset table                 */
                      /*                                                      */
   char   *data;      /* 76 Pointer to font data                              */
                      /*                                                      */
   WORD   width;      /* 80 Form width (#of bytes /scanline in font data)     */
                      /*                                                      */
   WORD   height;     /* 82 Form height (#of scanlines in font data)          */
                      /*                                                      */
 struct _font *next;  /* 84 Pointer to next font in face                      */
                      /*                                                      */
/* -------------------------------------------------------------------------  */
} FONT;

	
	/*
	 * OP_TAB type required for Bit Blt parameter block.
	 * each entry defines the logic operation to apply for
	 * the 4 Fore/Back ground bit combinations
	 */
typedef struct {

/* Type    Name       Offset   Function		    Comments		      */
/* -------------------------------------------------------------------------  */
   char   fg0bg0;     /* 0	Logic op to employ when both FG and BG are 0  */
   char   fg0bg1;     /* 1	Logic op to employ when FG = 0 and BG = 1     */
   char   fg1bg0;     /* 2	Logic op to employ when FG = 1 and BG = 0     */
   char   fg1bg1;     /* 3	Logic op to employ when both FG and BG are 1  */
/* -------------------------------------------------------------------------  */
} OP_TAB;


/*
 * Source and destination description blocks
 */
typedef struct  {
	WORD	bl_xmin;		/* Minimum x			*/
	WORD	bl_ymin;		/* Minimum y 			*/
	char	*bl_form;		/* Word aligned memory form 	*/
	WORD	bl_nxwd;		/* Offset to next word in line  */
	WORD 	bl_nxln;		/* Offset to next line in plane */
	WORD 	bl_nxpl;		/* Offset to next plane 	*/
}SDDB;

	/* Offsets to next word in plane */
#define HI_NXWD		2
#define MED_NXWD	4
#define LOW_NXWD	8

	/* Scan line widths of the screen */
#define HI_NXLN		80
#define MED_NXLN	160
#define LOW_NXLN	160

	/*
	 * Offsets between planes - always the same due to
	 * the way the STs video memory is laid out
         */
#define NXPL		2

	/* 
	 * Bit Blt Parameter Block Type (for function $A007)
	 *
	 */

typedef struct {

/* Type    Name           Offset   Function		    Comments	      */
/* -------------------------------------------------------------------------  */
   WORD	   bb_b_wd;     /*	 width of block in pixels 		      */
   WORD	   bb_b_ht;     /*	 height of block in pixels		      */
   WORD	   bb_plane_ct; /*	 number of planes to blit 		      */
   WORD	   bb_fg_col;   /*	 foreground color 			      */
   WORD	   bb_bg_col;   /*	 back	ground color 			      */
   OP_TAB  bb_op_tab;   /*	 logic for fg x bg combination 		      */
   SSDB	   bb_s;        /*	 source info block			      */
   SSDB	   bb_d;        /*	 destination info block 		      */
   WORD	   *bb_p_addr;  /*	 pattern buffer address 		      */
   WORD	   bb_p_nxln;   /*	 offset to next line in pattern 	      */
   WORD	   bb_p_nxpl;   /*	 offset to next plane in pattern 	      */
   WORD	   bb_p_mask;   /*	 pattern index mask 			      */
   char	   bb_fill[24];	/*	 work space				      */
/* -------------------------------------------------------------------------  */
} BBPB;


/*
 * Memory Form Definition Block
 *
 */
typedef struct
{
	char		*fd_addr;    /* Addrerss of upper left corner of first*/
                                     /* plane of raster area. If NULL then    */
                                     /* MFDB is for a physical device         */
	WORD		fd_w;	     /* Form Width in Pixels                  */
	WORD		fd_h;        /* Form Height in Pixels                 */
	WORD		fd_wdwidth;  /* Form Width in words (fd_w/sizeof(int))*/
	WORD		fd_stand;    /* Form format 0= device spec 1=standard */
	WORD		fd_nplanes;  /* Number of memory planes               */
	WORD		fd_r1;       /* Reserved                              */
	WORD		fd_r2;       /* Reserved                              */
	WORD		fd_r3;       /* Reserved                              */
} MFDB;




/*
 * Sprite definition block
 *
 */
typedef struct
{
	WORD	sp_xhot;		/* Offset to X hot spot		*/
	WORD	sp_yhot;		/* Offset to Y hot spot		*/
	WORD	sp_format;		/* Format SP_VDI or SP_XOR 	*/
	WORD	sp_bg;			/* Background color		*/
	WORD	sp_fg;			/* Foregroud color		*/
	WORD	sp_data[32];		/* Sprite data - 		*/
					/* Alternating words of back/fore */
					/* ground data			  */
					/* Note that:			  */
					/*   sprite save block is         */
					/*  10+VPLANES*64 bytes long	  */

} SFORM;


/*
 * Macros for the most reasonable linea functions.
 * All the rest require a long discussion.

/*****************************************************************************\
*		                                                              *
*                  Macros for some Line A functions			      *
*		                                                              *
\*****************************************************************************/

#define putpixel(x,y,v)	((PTSIN[0]=x),(PTSIN[1]=y),(INTIN[0]=v),linea1())
#define getpixel(x,y)	((PTSIN[0]=x),(PTSIN[1]=y),linea2())
#define SABORT_FUNC	funcs[FSEEDFILL]

/*****************************************************************************\
*		                                                              *
*                             Global Variables				      *
*		                                                              *
\*****************************************************************************/

	/*
	 * Global Variables are defined in alglobal.c, extern every where else
	 *
	 */
#ifndef ALGLOBAL

extern LINEA *aline;	/* Pointer to line a parameter block returned by init */

extern FONT  *fonts[];	/* Array of pointers to the three system font headers */
			/* returned by init (in register A1)    	      */

extern WORD  (*funcs[])(); /* Array of pointers to the 15 line a functions    */
			   /* returned by init (in register A2)		      */
			   /* only valid in ROM'ed TOS			      */
#endif /* ALGLOBAL */

	/*** EOF  ***/
-- 
usenet: .....!decvax!cwruecmp!bammi		jwahar r. bammi
csnet:       bammi@case
arpa:        bammi%case@csnet-relay
compuServe:  71515,155