From 62509d0bd7fec918c9af9662c7c50bed03be8dc1 Mon Sep 17 00:00:00 2001 From: Andy McFadden Date: Sat, 11 Sep 2021 14:12:09 -0700 Subject: [PATCH] Documentation / comment tweaks --- Asm65/OpDef.cs | 2 +- CommonUtil/BitTwiddle.cs | 15 +++++++++------ docs/sgtutorial/inline-data.html | 3 +++ 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/Asm65/OpDef.cs b/Asm65/OpDef.cs index 21d6843..64689c6 100644 --- a/Asm65/OpDef.cs +++ b/Asm65/OpDef.cs @@ -32,7 +32,7 @@ namespace Asm65 { Cont, // LDA, STA, PHP, NOP, ... (always continue to next instruction) NoCont, // RTS, BRK, ... (jump to new address, not specified in operand) CallSubroutine, // JSR, JSL (jump to new address, and also continue to next) - ConditionalBranch // BCC, BEQ, ... (jump to new address and/or continue to next) + ConditionalBranch // BCC, BEQ, ... (jump to new address, or continue to next) } /// diff --git a/CommonUtil/BitTwiddle.cs b/CommonUtil/BitTwiddle.cs index ddfbaf8..e69d49c 100644 --- a/CommonUtil/BitTwiddle.cs +++ b/CommonUtil/BitTwiddle.cs @@ -16,7 +16,10 @@ using System; namespace CommonUtil { - public class BitTwiddle { + /// + /// Some bit-twiddling functions. + /// + public static class BitTwiddle { /// /// Returns the argument, rounded up to the next highest power of 2. If the argument /// is an exact power of two, it is returned unmodified. @@ -32,7 +35,7 @@ namespace CommonUtil { /// /// /// Classic bit-twiddling approach. I can't find a "count leading zeroes" function - /// in C# that turns into a CPU instruction; if we had that, we could just use 1< public static int NextHighestPowerOf2(int val) { val |= val >> 1; // "smear" bits across integer @@ -50,8 +53,8 @@ namespace CommonUtil { /// /// If you pass in 10110100, this will return 00000100. /// - /// Two's complement negation inverts and adds one, so 01100 --> 10011+1 --> 10100. The - /// only set bit they have in common is the one we want. + /// Two's complement negation inverts and adds one, so 01100 --> 10011+1 --> 10100. + /// The only set bit they have in common is the one we want. /// public static int IsolateLeastSignificantOne(int val) { return val & -val; @@ -62,7 +65,7 @@ namespace CommonUtil { /// /// /// If you pass in 10110100, this will return 4. - /// + /// /// This comes from http://aggregate.org/MAGIC/#Population%20Count%20(Ones%20Count) . /// public static int CountOneBits(int val) { @@ -82,7 +85,7 @@ namespace CommonUtil { /// /// /// If you pass in 10110100, this will return 2. - /// + /// /// Also from http://aggregate.org/MAGIC/ . /// public static int CountTrailingZeroes(int val) { diff --git a/docs/sgtutorial/inline-data.html b/docs/sgtutorial/inline-data.html index 85a7fe2..516796f 100644 --- a/docs/sgtutorial/inline-data.html +++ b/docs/sgtutorial/inline-data.html @@ -132,6 +132,9 @@ shift-click the line at address $2077. Use Actions > Tag Bytes As Inline Data (Ctrl+HCtrl+I).

+

Unlike code start and end tags, where you only tag the byte + where the code starts or stops, for inline data you need to tag + every byte.