[comp.sys.atari.st] How to step drive B at 6 ms

mdoerr@uklirb.UUCP (10/27/87)

The following program shows how to decrease the step rate of drive B to 6ms.
It's useful in conjunction with the step doubler posted some time ago.
Please observe the comments in the listing to determine suitability for
your system.

Have fun, Michael.

|  Michael Doerr  |  Uni. Kaiserslautern  |  ...!uunet!unido!uklirb!mdoerr  |

=============================================================================

                   1 /	setstep.s	by Michael Doerr	26-Okt-9187
                   2 /
                   3 /	Change step rate of drive B to 6 ms.
                   4 /
                   5 /
                   6 /	This program uses undocumented low memory system variables.
                   7 /	Although it is known to work with the current (non-blitter)
                   8 /	version of the German ROM-TOS, you may have to change some
                   9 /	of these addresses to make it work with foreign versions
                  10 /	and/or blitter versions of ROM-TOS.
                  11 /
                  12 /	You may determine the relevant addresses for your version of TOS
                  13 /	by consulting the disassembled BIOS listing in the ABACUS Internals
                  14 /	book. Look for the routine called flopini. The needed addresses
                  15 /	are called dsb0 and dsb1 in the German version of the book.
                  16 /
                  17 /	Assemble with the Mark Willams assembler:
                  18 /	as setstep.s; gemfix l.out b6ms.prg
                  19 
                  20 
0002              21 _2ms=	2		/ value for 2 ms step rate
0003              22 _3ms=	3		/ value for 3 ms step rate
0000              23 _6ms=	0		/ value for 6 ms step rate
0001              24 _12ms=	1		/ value for 12 ms step rate
                  25 
                  26 / ***** Caution these addresses have only been tested with the
                  27 / ***** German non-blitter ROM-TOS !!!!
0A06              28 dsb0=	0x0a06		/ address of drive A information
0A0A              29 dsb1=	0x0a0a		/ address of drive B information
                  30 
                  31 
                  32 	.prvi
                  33 
0000  487A  000C  34 	pea	do_work(pc)
0004  3F3C  0026  35 	move.w	$38,-(a7)
0008  4E4E        36 	trap	$14		/ execute XBIOS(38): Supexec
                  37 
000A  4257        38 	clr.w	(a7)
000C  4E41        39 	trap	$1		/ terminate program
                  40 
000E              41 do_work:
000E  41F8  0A0D  42 	lea	[dsb1+3]:s,a0	/ change step rate of drive B (at offset 3
0012  10BC  0000  43 	move.b	$_6ms,(a0)	/ relative to dsb1) to 6 ms.
0016  4E75        44 	rts
                  45
                  46 /	end of program