EtchedPixels / FUZIX

FuzixOS: Because Small Is Beautiful
Other
2.15k stars 271 forks source link

Pointer reassignment bug in floppy driver #941

Closed xmotif closed 1 year ago

xmotif commented 1 year ago

When _devfd_init is called, GetPrm stores the drive table pointer in IY. Eventually, Motor is called via Recal -> FdCmd -> Motor. All along it is assumed that IY is unchanged. Within Motor, external function _plt_idle is called. For platform-rc2014, at least, the first thing that _plt_idle does is change IY to #_timer_source. _devfd_init writes the value 1 to (IY) but coincidentally #_timer_source is often set to 1 so this bug does not cause crashes in most systems.

EtchedPixels commented 1 year ago

That's a good find.. nasty bug