mirror of
https://github.com/fadden/6502bench.git
synced 2025-07-14 04:23:56 +00:00
Add multi-inline extension script to tutorial
It's useful to have an example of an extension script that handles multiple types of things. It's also good to show that scripts can handle data types other than strings, and can chase an address to format data items elsewhere in the code. This required updating the tutorial binary, adding the new script, and updating the tutorial text and associated screen shots.
This commit is contained in:
@ -3,7 +3,6 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using PluginCommon;
|
||||
|
||||
namespace ExtensionScriptSample {
|
||||
@ -15,7 +14,7 @@ namespace ExtensionScriptSample {
|
||||
private IApplication mAppRef;
|
||||
private byte[] mFileData;
|
||||
|
||||
// Only one call.
|
||||
// Only one label.
|
||||
private const string CALL_LABEL = "PrintInlineL1String";
|
||||
private int mInlineL1StringAddr; // jsr
|
||||
|
||||
@ -62,7 +61,7 @@ namespace ExtensionScriptSample {
|
||||
if (offset + 3 >= mFileData.Length) {
|
||||
return; // length byte is off end
|
||||
}
|
||||
int len = mFileData[3]; // first byte past JSR
|
||||
int len = mFileData[offset + 3]; // first byte past JSR
|
||||
if (offset + 4 + len > mFileData.Length) {
|
||||
mAppRef.DebugLog("L1 string ran off end of file at +" +
|
||||
(offset + 4).ToString("x6"));
|
||||
|
Reference in New Issue
Block a user