Login
Back to forumSee the full topicGo to last reply

Posted By

TLC
on 2022-08-27
04:44:14
 Re: Plus/4 $FF28 Bug (TEDMON Bug?)

This topic popped up on the cbm-hackers mailing list once some time ago. See: http://www.softwolves.com/arkiv/cbm-hackers/15/15561.html

TL;DR: the bug is caused by both TEDMON and Basic disk I/O routines using the same zero page locations. TEDMON uses $77 and a couple of bytes on as a temporary buffer. Basic's clear DS$ routine at $CD57 (which is called by most Basic disk I/O commands) uses $79, $7A and $7B as DS, and the pointer to the last error message i.e. DS$ if my memory serves me well*. Unless DS i.e. $79 is 0 (which it almost certainly is not after having executed some A commands in monitor), the routine will go on writing $28 and $FF to ($7A),Y, which at this time points to somewhere usually $3058. (Other scenarios i.e. other target and content are AFAIR possible.)

For the bug to trigger, it should be enough to assemble something in monitor (e.g. using the A command), then X from monitor, and request a directory (or execute some other Basic disk command).

To completely avoid the bug (even despite sharing memory addresses between Tedmon and Basic), zeroing $79 prior to exiting from monitor should have sufficed.

*Thinking it over, I'm indeed not sure about the "($7A) should point to the DS$ string" part anymore, will need to double check.



Back to top


Copyright © Plus/4 World Team, 2001-2024