[comp.sys.atari.st] Hard disk boot bug

fischer-michael@YALE.ARPA (Michael Fischer) (07/20/87)

Version 2.3 of HDB.PRG leaves the printer strobe line in the wrong
state, causing my printer to lose the first character sent to it.
(Other printers might react differently to this bug.)  The strobe
line is bit 5 of port-A of the gi sound chip and should normally
be 1.  It is set to 0, then back to 1, to signal the printer to
sense the data lines.  The low order three bits of that same register
are used to select the floppy disk.  HDB sets those bits to 5, thereby
selecting drive A, apparently to correct the problem in the previous
version of HDB of the floppy drive motor continuing to run after
booting.  Unfortunately, it clears the remaining bits at the same
time, causing the printer problem.

The code that does this is:
        $654    lea    $ffff8800,a0   ;get address of sound chip
        $65a    move.b #14,(a0)       ;select port-A register
        $65e    move.b #$05,2(a0)     ;write 0x5 to port-A
The fix is to change the last of these instructions to
        $65e    move.b #$25,2(a0)     ;write 0x25 to port-A
which forces the strobe line to its normal state of 1 as well as
selecting the floppy.

Note that a null character still gets sent to the printer during
the bootup process, but most printers will ignore it.

--Mike Fischer 
    Arpa:    <fischer@yale.arpa>
    Bitnet:  <fischer@yalecs>
-------