1
0
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:
Andy McFadden
2021-08-15 09:52:12 -07:00
parent ec2ad529c8
commit 992e008e7d
13 changed files with 213 additions and 10 deletions

View File

@ -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"));