Path: ns-mx!hobbes.physics.uiowa.edu!zaphod.mps.ohio-state.edu!qt.cs.utexas.edu!yale.edu!yale!umich!sharkey!mudos!lily From: lily@mudos.ann-arbor.mi.us (Russ Woodroofe) Newsgroups: comp.sys.apple2 Subject: Re: Assembler Line Drawing Code Message-ID: <1991Dec01.234148.1845@mudos.ann-arbor.mi.us> Date: 1 Dec 91 23:41:48 GMT References: <1991Nov30.210632.8025@reed.edu> Organization: The Programmer's Pit Stop, Ann Arbor MI Lines: 29 Look in the ROMs. There are routines built in that will draw lines yes, on page 1 OR 2. (HLIN from BASIC). Routines you will need: (taken from Assembly language for the Applesoft Programmer) HGR $F3E2 Set page one as current page, sets hgr mode on (HGR from Applesoft) HGR2 $F3D8 Above, but for page 2, and full screen (HGR2 from Applesoft) SETHCOL $F6EC Put Applesoft color code (1-7) in the x reg and call converts to a bit mask and stores in $E4 (HCOLOR= from Applesoft) HPOSN $F411 Position hires cursor. Y reg=High byte horizontal position X reg=Low byte horizontal position A reg=vertical postion This also copies the contents of $E4 to $1C HPLOT $F457 Plot a point. Registers as HPOSN. Calls HPOSN to get point (HPLOT from Applesoft) HLIN $F53A Draws a line from last point to specified point. X reg=Horizontal High byte, YA reg=horizontal low byte Y reg=vertical (HLIN from Applesoft) If you need to switch pages without calling HGR/HGR2, put the MSB of the graphics page in $E6 (ie $20 for 1, $40 for 2) I've written some graphics stuff before, so I can be of SOME help if you want to mail me... I never figured out the stuff about reading the scan to avoid flicker though... oh well. -------------------------The Power--------------------------------------- -----------------Boring, non-unique, but effective signature-------------