Pete,
understand or agree with all you say. Except:
Yes. But this
is neither a typo nor a printing error. If you read four
blocks of 200(8) _words_ each, starting at zero, you fill exactly
2000(8) _bytes_, and the next free location is 2000(8). As you state,
the printed version is prepared for conversion to single density (by
clearing the 400 bit in locations 2036 and 2072, right?) by reading in
four blocks... - So, the reason is somewhat similar to that for the
TS-11.
Yes, but if it's single density, which is the only reason you'd read four
sectors, the sectors are 128 bytes [100(8)] not 256, so it's still only
1000(8).
Sure, you need not read four sectors if they are 200 words each, but as
we noted earlier, the routine will always read these four sectors (so
you need only change two words in order to switch to single density),
and if these four sectors happen to be from a double-density RX02, you
will want to have sufficient room for them.
My guess is they left it that way (reading up to sector #7 and having
the bootstrap at location 2000) to be sure nobody will forget to change
the sector count when switching single / double density. It doesn't take
that much time to read the additional two sectors, and it doesn't happen
too frequently - after all, this is neither DOS nor Windoze! ;-)
Possibly. But if you work it out completely, I think
you'll find you save
very little. Not all of the tests are checking for an error, either.
I haven't tried: is it possible to get a false error indication while
you are supposed to wait until the RXV11 has digested parameters like
sector / track number? From reading the docs, I would assume that the
only reason for the error bit to come on at this time might be an
invalid parameter like sector > 26, and in this case, you'll probably
better abort as well (sure, should not happen during boot...). So why
not just use this check every time you wait for the controller, once the
check is in the subroutine anyway?
But, you're right: savings aren't too extreme with this approach, as the
sequence BIT-BEQ-BMI takes three words, and a JSR would need two. In
turn, you need two additional words for a MOV #something,SP plus one for
the RTS, and there are four places with a BMI, so in total we save four
words by spending three: makes a total of one word saved. Didn't you say
something like this before? ;-)
However, once you free R0, you can use it to store the track number
instead of SWABing R4. Again: two SWAB words saved, one paid at
initialization time (MOV R4,R0). Then, you will omit the MOV #100240,R0
(minus two words) at the expense of adding one word to the BIT
instruction in the WAITRX routine...
Let me continue, and we can open a contest for writing the shortest
bootstrap! ;-)
Regards,
Andreas
--
Andreas Freiherr
Vishay Semiconductor GmbH, Heilbronn, Germany
http://www.vishay.com