Gla This one won't be especially deep or hevy but I think it might be useful, yeas all the information in this article can be found in "Internals" and "Concise" but, their chapters about Line-A don't feature the experience and trouble shooting that only can be experienced by "trial and error". Therefor read careful caurse this article will feature several extreamly well (modesy, what's that? is it a new pizza?) documented sources as well as some plain raw facts. But why waste time let's get right on with the stuff, by the way it's good if you have some previous experience about the bit mapped grapics (see the previous issue of the Inc for that). This article is splitted up into two parts, why? Well thatre is some utterly extreame calls that requires a deeper look, they will be described in the Part two while the more normal ones is found in Part one article in this issue. One more thing before I'll get on with it, there is something utterly badly documented thing called "Line-F" I'll comeback in a later issue (hopefully in the next one) with a deep description of what that is. The Line-F are called with DC.W $F00x instead of the line-A's DC.W $A00x. Line-A grapics, part one. Before I'll describe an DC.W $A000 ything in the deep I'll start with a brief overview of the commands and what Line-A actually is. The commands are: $A000 The "initzialiation" of Line-A it returnes some values. $A001 The dot plotting routine $A002 This one get's the color of a dot on screen. $A003 Draw line, the most intresting. $A004 Draw horizontal line (like above but only horizontal) $A005 Draw a filled Rectangle/box. $A006 Draw a filled polygon (slow!) $A007 Bit block transfer (see the other Line-A article) $A008 Text block transfer (see above) $A009 Mouse on $A00A Mouse off, it don't removes the interrupt just the pointer. $A00B Change mouse style "look". $A00C Remove sprite (software, slow) $A00D Draw sprite (above!) $A00E Copy raster form, haves nothing to bo with raster bars. $A00F Fill The line-A isn't very user friendly it's rather a bit hostile against the user since if you pass a completly messed up coordinate to $A006 it won't return a error message like the GEMDOS and BIOS/XBIOS traps does it will crash of mess up your poor ST/STE compleately. I guess it's not included as a trap caurse it dosen't have anything to do with GEMDOS nor BIOS/XBIOS in case you didn't know it, the BIOS and Xbios are both calling the GEMDOS and the otherway around, but Line-A is Atari's idea and have nothing to do with the IBM-PC, from where Gemdos is originaly). Though the Xbios is ST specific. Let's now continue with explaining the most important Line-A variables. The most anoying ones must be the X1,Y1 and X2,Y2 pairs. They are used in most calls though they arent used in $A001 (plot) where one could expect to find a such command. Do keep in mind that the registers D0-D2 and A0-A2 will be thrashed. Save them away with this line. MOVEM.L D0-D2/A0-A2,-(SP) And recover them with: MOVEM.L (SP)+,D0-D2/A0-A2 The usage of line A is very easy as soon as one gets a hang of the build up of it. To draw a horizontal line for example, one will have to do like this: * Call line A to get the start of the line-A calls. * Pass the required values to line A. * Call the function with DC.W $A004 In "The Consice Atari St" is the parameters required to be sent organized like this. $26 X1 coordinate $28 Y1 coordinate $2A X2 coordinate What is the hex value written before the description of the parameter? Well, it's the offset from the start of Line-A where the values should be passed into. With this example I hope that you'll understand. DC.W $A000 MOVE.W 10,$26(A0) MOVE.W 10,$28(A0) MOVE.W 300,$2A(A0) MOVE.W 120,$2C(A0) Since A0 contains the base address of the line-A parameter table is it that simple to do it. Another way to do that and perhaps easyer to understand is like this: DC.W $A000 ADD.W #$26,A0 MOVE.W #10,(A0) I hope you'll understand what the "offset" is now. Now wont this article feature any more, now load the Part one article and read about the first 7 calls in that one. In Part two (allso in this issue) is the last 9 calls featuerd. The reason why I devided them up was becurse the first 7 are user friendly and "easy" while the last 9 is lousy documented (with a few exceptions such as $A00A and $A009) and don't have any source examples. But if you reads the blitter article then will ya understand that you don't need Line-A for most of those 9 calls since all of them can be done with some rather easy blitter calls and they are done much faster in that way. Any questions? If so send me a letter (or two) to: Kent Johansson Mariehmsv„gen 37a S-902 36 Ume† Sweden. Or give me a call: 090-139994 +46(0)90139994