Classic Computer Magazine Archive START VOL. 4 NO. 7 / FEBRUARY 1990

Clipboard


by Heidi Brumbaugh


Overcrowded AUTO Folder?

If your AUTO folder is stuffed to the brink with every terminate-and-stay-resident (TSR) program ever written for the ST, here are a couple of tips to make your life easier:

You can disable a program from running at boot time simply by changing the extension from .PRG to .PR_; change it back to .PRG to reinstall it. This will save memory in your computer as well as preventing finicky TSR's from getting in each other's way.

There are times, however, when you want to run a TSR for a single session without installing it permanently. Some programs, such as the Universal Item Selector II and HotWire, don't need to be in the AUTO folder to run--you can install them from the Desktop by double-clicking on them. A convenient way to make all the programs in your AUTO folder executable is to edit the DESKTOP.INF file to make your disabled programs runnable. Find the lines in DESKTOP.INF that define executable programs:

#G 03 FF *.APP@ @#G 03 FF *.PRG@ @

And insert the line:

#G 03 FF *.PR_@ @

Now you can install HotWire, for example, simply by double-clicking on HOTWIRE.PR_.

In some cases the applications you use require completely different sets of AUTO programs. For instance, you may need GDOS to run a desktop publishing package and find that all your other TSR's must be disabled due to memory requirements.

A fast way to handle this situation is to set up different AUTO-folder configurations on different drives. In this case, create an AUTO folder containing only GDOS on drive D. Run your hard disk utilities program and select Set Hard Disk Autoboot. Follow this procedure to set the autoboot back to C when you're done.


Mouse Training

Here's a tip from START contributor Phil Comeau:

Many paint programs provide an "eraser" tool that rubs out part of a painting. It's hard to keep the mouse steady when erasing in a straight line. I position the eraser where I want to start, then hold down the [Alternate] and [Insert] keys while I press the arrow keys in the direction I'd like the mouse to travel. The result is erasure in a perfectly horizontal or vertical line.

Note that this will work with any paint drawing tool. In fact, you can use the [Alternate]-[Insert]-arrow-keys combination to simulate moving the mouse with the left button held down in just about any ST application.


And the Winner is...

In the June 1989 issue of START, the Clipboard ran a contest challenging readers to write an assembly routine to flip a pixel as quickly as possible.

The submitted routine had to be able to replace the FLIPPIXM.S routine in that issue's "Programming in Pascal" column.

The winner of the contest is Bob Vixie of Colorado Springs, Colorado. Bob's entry took only 112 clock cycles, which was 20 cycles faster than the next fastest entry and more than four times as fast as Bruce Wiebe's original FLIPPIXM.S. We were hard-pressed to think of a way to improve on Bruce's algorithm.

Most of the entries used a multiplication table to look up the Y position of the pixel on the screen. Since the contest announcement made no specification as to the size of the code, this was allowed.

I'd like to thank all the people who participated in the contest; the response showed that there are a lot of people who take their assembly language speed programming seriously. Thanks also to Jim Kent, who helped judge the contest and to my former instructors Bob and Gail McDowell, whose assignment to speed up an assembly language code section inspired this contest.

Heidi Brumbaugh is the former Programs Editor for START magazine.



Flippix contest-winner Bob Vixie's solution:

  COMMENT PASCAL
  XDEF FLIPPIX
  SECTION TEXT
FLIPPIX:
  move.I (sp)+,a1 * 12 pop return address off stock
  move.I (sp)+,d0 * 12 pop y off stack
  move.I (sp)+,d1 * 12 pop x off stack
  move.I (sp)+,a0 * 12 pop screen address off stack
  move.w d1,d2 * 4 save a copy of x for later use
  Isr.w #3,d2 * 12 divide x by 8 to get a byte number
  add.w d0,d0 * 4 multiply y by 2 for index into table
  add.w Y80(pc,d0.w),d2 * 14 add y *80 from table to x / 8
  not.w d1 * 4 negate x for proper bit numbering
  bchg d1,0(a0,d2.w) * 18 flip the bit on the screen jmp
  (a1) * 8 return to calling routine
Y80:
dc.w
dc.w
dc.w
dc.w
dc.w
dc.w
dc.w
dc.w
dc.w
dc.w
dc.w
dc.w
dc.w
dc.w
dc.w
dc.w
dc.w
dc.w
dc.w
dc.w
dc.w
dc.w
dc.w
dc.w
dc.w
dc.w
dc.w
dc.w
dc.w
dc.w
dc.w
dc.w
dc.w
dc.w
dc.w
dc.w
dc.w
dc.w
dc.w
dc.w
dc.w
dc.w
dc.w
dc.w
dc.w
dc.w
dc.w
dc.w
dc.w
dc.w
0,
640,
1280,
1920,
2560,
3200,
3840,
4480,
5120,
5760,
6400,
7040,
7680,
8320,
8960,
9600,
10240,
10880,
11520,
12160,
12800,
13440,
14080,
14720,
15360,
16000,
16640,
17280,
17920,
18560,
19200,
19840,
20480,
21120,
21760,
22400,
23040,
23680,
24320,
24960,
25600,
26240,
26880,
27520,
28160,
28800,
29440,
30080,
30720,
31360,
80,
720,
1360,
2000,
2640,
3280,
3920,
4560,
5200,
5840,
6480,
7120,
7760,
8400,
9040,
9680,
10320,
10960,
11600,
12240,
12880,
13520,
14160,
14800,
15440,
16080,
16720,
17360,
18000,
18640,
19280,
19920,
20560,
21200,
21840,
22480,
23120,
23760,
24400,
25040,
25680,
26320,
26960,
27600,
28240,
28880,
29520,
30160,
30800,
31440,
160,
800,
1440,
2080,
2720,
3360,
4000,
4640,
5280,
5920,
6560,
7200,
7840,
8480,
9120,
9760,
10400,
11040,
11680,
12320,
12960,
13600,
14240,
14880,
15520,
16160,
16800,
17440,
18080,
18720,
19360,
20000,
20640,
21280,
21920,
22560,
23200,
23840,
24480,
25120,
25760,
26400,
27040,
27680,
28320,
28960,
29600,
30240,
30880,
31520,
240,
880,
1520,
2160,
2800,
3440,
4080,
4720,
5360,
6000,
6640,
7280,
7920,
8560,
9200,
9840,
10480,
11120,
11760,
12400,
13040,
13680,
14320,
14960,
15600,
16240,
16880,
17520,
18160,
18800,
19440,
20080,
20720,
21360,
22000,
22640,
23280,
23920,
24560,
25200,
25840,
26480,
27120,
27760,
28400,
29040,
29680,
30320,
30960,
31600,
320,
960,
1600,
2240,
2880,
3520,
4160,
4800,
5440,
6080,
6720,
7360,
8000,
8640,
9280,
9920,
10560,
11200,
11840,
12480,
13120,
13760,
14400,
15040,
15680,
16320,
16960,
17600,
18240,
18880,
19520,
20160,
20800,
21440,
22080,
22720,
23360,
24000,
24640,
25280,
25920,
26560,
27200,
27840,
28480,
29120,
29760,
30400,
31040,
31680,
400,
1040,
1680,
2320,
2960,
3600,
4240,
4880,
5520,
6160,
6800,
7440,
8080,
8720,
9360,
10000,
10640,
11280,
11920,
12560,
13200,
13840,
14480,
15120,
15760,
16400,
17040,
17680,
18320,
18960,
19600,
20240,
20880,
21520,
22160,
22800,
23440,
24080,
24720,
25360,
26000,
26640,
27280,
27920,
28560,
29200,
29840,
30480,
31120,
31760,
480,
1120,
1760,
2400,
3040,
3680,
4320,
4960,
5600,
6240,
6880,
7520,
8160,
8800,
9440,
10080,
10720,
11360,
12000,
12640,
13280,
13920,
14560,
15200,
15840,
16480,
17120,
17760,
18400,
19040,
19680,
20320,
20960,
21600,
22240,
22880,
23520,
24160,
24800,
25440,
26080,
26720,
27360,
28000,
28640,
29280,
29920,
30560,
31200,
31840,
560
1200
1840
2480
3120
3760
4400
5040
5680
6320
6960
7600
8240
8880
9520
10160
10800
11440
12080
12720
13360
14000
14640
15280
15920
16560
17200
17840
18480
19120
19760
20400
21040
21680
22320
22960
236D0
24240
24880
25520
26160
26800
27440
28080
28720
29360
30000
30640
31280
31920


Got an ST trick or tip to share? We're interested in tips for the rank beginner or expert programmer, for exploring the Desktop or for getting the most out of any popular ST program. Send your tips to the Clipboard, START Magazine, 544 Second Street., San Francisco, CA 94107.