1
0
mirror of https://github.com/fadden/6502bench.git synced 2025-07-25 14:24:13 +00:00

Define interfaces for inline call handlers and BRK

Instead of providing no-op CheckJsr/CheckJsl, plugins now declare
which calls they support by defining interfaces on the plugin class.

I added a CheckBrk call for code like Apple /// SOS calls, which
use BRK as an OS call mechanism.  The formatting doesn't work quite
right yet because I've been treating BRK as a two-byte instruction.
Hardly anything else does, and I think it's time I stopped (but not
in this commit).

Note: THIS BREAKS ALL PLUGINS that use the inline JSR/JSL feature,
which is pretty much all of them.
This commit is contained in:
Andy McFadden
2019-08-02 16:06:27 -07:00
parent d41266442d
commit 0616e4e4a4
8 changed files with 126 additions and 33 deletions

View File

@@ -34,7 +34,7 @@ using PluginCommon;
*/
namespace RuntimeData.Apple {
public class GSOS : MarshalByRefObject, IPlugin {
public class GSOS : MarshalByRefObject, IPlugin, IPlugin_InlineJsl {
private const string GSOS_FUNC_TAG = "AppleIIgs-GSOS-Functions"; // tag used in .sym65 file
private bool VERBOSE = false;
@@ -58,11 +58,6 @@ namespace RuntimeData.Apple {
mFunctionList = PlatSym.GenerateValueList(platSyms, GSOS_FUNC_TAG, appRef);
}
public void CheckJsr(int offset, out bool noContinue) {
// Not used by GS/OS
noContinue = false;
}
public void CheckJsl(int offset, out bool noContinue) {
noContinue = false;
if (offset + 7 < mFileData.Length && mFileData[offset + 1] == 0xa8 &&