[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Programming *ERROR* in BASIC.SYSTEM! (vent!)



In article <D89EIw.55v@actrix.gen.nz>, dempson@atlantis.actrix.gen.nz
(David Empson) wrote:

:In article <3oisor$ahg@condor.ic.net>,
:Jerry Kindall <kindall@falcon.ic.net> wrote:
:> Dave Althoff (dalloff@freenet.columbus.oh.us) wrote:
:> : And people wonder why I hate ProDOS so much.
:> 
:> Just wait until you find out that most P8 clock drivers trash the input 
:> buffer so that the contents of the input buffer can't be relied upon past 
:> any MLI call that causes a clock read... B)
:
:Which ones apart from the ThunderClock driver (which is also used for
:several ThunderClock clones)?
:
:The NSC driver shouldn't, the AppleWatch driver shouldn't, the Time II
:driver shouldn't, and the IIgs one doesn't.
 
Take it from someone who has done EXTENSIVE reverse-engineering of the NSC
driver: It does. At least, the version that I have worked with does. It
routinely parks 5 scratch bytes (6 for certain time/date values) in the
input buffer, starting at address $0270. Why they picked that location is
beyond me, but I suspect (with no solid proof) that it was to avoid
clobbering the input buffer as much as possible while still leaving higher
stuff alone. ($0280+ is usually used by ProDOS as an MLI pathname buffer)
When the call to read the clock is finished, it fries those same
locations, usually to $00, sometimes to seemingly random values. Don't ask
me WHY it fries them... I still haven't been able to figure out the reason
behind it. It just does. Keep that in mind, and you'll be a bit happier
camper when you're writing code that plays in the $0200 range on NSC
equipped systems. Until I tore that bit of the code apart, I was having
hairy screaming fits trying to figure out why a couple of homebrew
routines that used that area as scratch space kept blowing up at seemingly
random intervals. As for the other clocks/drivers, I have no clue, but I
try to stay away from the $0200-$02FF range entirely when coding any more.
Too many bits of code want to lay claim to that chunk of real estate for
my comfort.

-- 

+-------------------+ \__    Roadkill on the information superhighway...
|Don Bruder         | |  \       AUGH! +-------------------------------+
|dakidd@cris.com    | |_@_\____&   /   | I will choose a purpose clear:|
|I eat my roadkill! |_|____|__@|  @    | I will choose Free-will -Rush |
+/.\/.\--------+ /.\/.\=(__)/.\] \|/   +-------------------------------+
_\_/\_/__________\_/\_/_____\_/__/_\__     Finger for PGP public key