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

Pass operand to extension script JSR/JSL handlers

Sort of silly to have every handler immediately pull the operand out
of the file data.  (This is arguably less efficient, since we now
have to serialize the argument across the AppDomain boundary, but
we should be okay spending a few extra nanoseconds here.)
This commit is contained in:
Andy McFadden
2019-10-17 13:15:25 -07:00
parent c8dfa94ce2
commit 716dce5f28
10 changed files with 38 additions and 36 deletions

View File

@@ -65,10 +65,11 @@ namespace RuntimeData.Apple {
return false;
}
public void CheckJsl(int offset, out bool noContinue) {
public void CheckJsl(int offset, int operand, out bool noContinue) {
const int INLINE_ENTRY = 0xe100a8;
noContinue = false;
if (offset + 7 < mFileData.Length && mFileData[offset + 1] == 0xa8 &&
mFileData[offset + 2] == 0x00 && mFileData[offset + 3] == 0xe1) {
if (offset + 7 < mFileData.Length && operand == INLINE_ENTRY) {
// match!
int req = Util.GetWord(mFileData, offset + 4, 2, false);