From e7b1b22eb0d9f6be3895aaaecfe21f0e49d39f74 Mon Sep 17 00:00:00 2001 From: Paul Gardner-Stephen Date: Wed, 24 Apr 2019 17:32:35 +0930 Subject: [PATCH] deal with remaining similar strings --- src/similarity.c | 1 + strings/026868 | 4 ++++ strings/029D7702E8 | 3 +++ strings/20CFFFB0 | 8 ++++++++ strings/488A48 | 4 ++++ strings/68AA68 | 4 ++++ strings/692885D3 | 4 ++++ strings/8A48A5D0F0 | 4 ++++ strings/A4D3B1D185 | 4 ++++ strings/A5D8F002 | 4 ++++ strings/CA10F760 | 3 +++ strings/D66020 | 4 ++++ strings/E6D320 | 4 ++++ strings/E9C6D6 | 4 ++++ strings/F338E9 | 4 ++++ strings/F7C884C8 | 4 ++++ 16 files changed, 63 insertions(+) create mode 100644 strings/026868 create mode 100644 strings/029D7702E8 create mode 100644 strings/20CFFFB0 create mode 100644 strings/488A48 create mode 100644 strings/68AA68 create mode 100644 strings/692885D3 create mode 100644 strings/8A48A5D0F0 create mode 100644 strings/A4D3B1D185 create mode 100644 strings/A5D8F002 create mode 100644 strings/CA10F760 create mode 100644 strings/D66020 create mode 100644 strings/E6D320 create mode 100644 strings/E9C6D6 create mode 100644 strings/F338E9 create mode 100644 strings/F7C884C8 diff --git a/src/similarity.c b/src/similarity.c index f4b26e30..0a34d5da 100644 --- a/src/similarity.c +++ b/src/similarity.c @@ -152,6 +152,7 @@ int main(int argc,char **argv) // Similarly for random byte before such instructions if (f1[i+1]==0x85) break; if (f1[i+1]==0xa9) break; // LDA #$xx + if (f1[i+1]==0xa2) break; // LDX $xx if (f1[i+1]==0xa5) break; // LDA $xx if (f1[i+1]==0xa0) break; // LDY #$xx if (f1[i+1]==0x69) break; // ADC #$xx diff --git a/strings/026868 b/strings/026868 new file mode 100644 index 00000000..7ac1a12f --- /dev/null +++ b/strings/026868 @@ -0,0 +1,4 @@ +fragment / PLA / PLA + +2x PLA is a common way to pop a return address from the stack. +Nothing copyrightable here. diff --git a/strings/029D7702E8 b/strings/029D7702E8 new file mode 100644 index 00000000..64771d93 --- /dev/null +++ b/strings/029D7702E8 @@ -0,0 +1,3 @@ +fragment / STA $0277,X / INX + +loop fragment. Not copyrightable. diff --git a/strings/20CFFFB0 b/strings/20CFFFB0 new file mode 100644 index 00000000..92ffe3e7 --- /dev/null +++ b/strings/20CFFFB0 @@ -0,0 +1,8 @@ +JSR $FFCF / branch based on C flag + +$FFCF is a publically documented call point in the C64 KERNAL, +and indicates its response via the C flag, so such constructions +in callers are totally expected and anticipated normal use of the +API. Since using an API is an expected use of a system, it can +be argued that there is an implicit license to do such things, in +the non-existent reality where such a sequence could be copyrighted. diff --git a/strings/488A48 b/strings/488A48 new file mode 100644 index 00000000..271ff8e7 --- /dev/null +++ b/strings/488A48 @@ -0,0 +1,4 @@ +PHA / TXA / PHA + +Save A and X registers to stack. +Nothing creative or copyrightable here. diff --git a/strings/68AA68 b/strings/68AA68 new file mode 100644 index 00000000..1e182c11 --- /dev/null +++ b/strings/68AA68 @@ -0,0 +1,4 @@ +PLA / TAX / PLA + +Pop A and X registers from the stack. +Not copyrightable. diff --git a/strings/692885D3 b/strings/692885D3 new file mode 100644 index 00000000..ea685cdc --- /dev/null +++ b/strings/692885D3 @@ -0,0 +1,4 @@ +ADC #40 / STA $D3 + +Add 40 to a memory location. Single instruction on many architectures. +Not copyrightable. diff --git a/strings/8A48A5D0F0 b/strings/8A48A5D0F0 new file mode 100644 index 00000000..201d6916 --- /dev/null +++ b/strings/8A48A5D0F0 @@ -0,0 +1,4 @@ +TXA / PHA / LDA $D0 / BRANCH somewhere + +Save X register before loading A and branching somewhere. +Nothing copyrightable here. diff --git a/strings/A4D3B1D185 b/strings/A4D3B1D185 new file mode 100644 index 00000000..80781da5 --- /dev/null +++ b/strings/A4D3B1D185 @@ -0,0 +1,4 @@ +LDY $D3 / LDA ($D1),Y / STA $xx + +Derefernce a pointer in ZP and store retreived value somewhere. +Not copyrightable. diff --git a/strings/A5D8F002 b/strings/A5D8F002 new file mode 100644 index 00000000..a40ecb67 --- /dev/null +++ b/strings/A5D8F002 @@ -0,0 +1,4 @@ +LDA $D8 / BEQ + +Take a branch based on contents of a ZP location. +Not creative or copyrightable. diff --git a/strings/CA10F760 b/strings/CA10F760 new file mode 100644 index 00000000..58f01dba --- /dev/null +++ b/strings/CA10F760 @@ -0,0 +1,3 @@ +DEX / BRANCH backwards / RTS + +Loop fragment. Not copyrightable. diff --git a/strings/D66020 b/strings/D66020 new file mode 100644 index 00000000..e9d66af3 --- /dev/null +++ b/strings/D66020 @@ -0,0 +1,4 @@ +Fragment / RTS / JSR + +A routine ends, and another starts with a JSR. Very common. +Not copyrightable. diff --git a/strings/E6D320 b/strings/E6D320 new file mode 100644 index 00000000..237df2a3 --- /dev/null +++ b/strings/E6D320 @@ -0,0 +1,4 @@ +INC $D3 / JSR somewhere + +Only one whole instruction. +Not copyrightable. diff --git a/strings/E9C6D6 b/strings/E9C6D6 new file mode 100644 index 00000000..4ff406f8 --- /dev/null +++ b/strings/E9C6D6 @@ -0,0 +1,4 @@ +fragment / DEC $D6 + +Only a single complete instruction. +Not copyrightable. diff --git a/strings/F338E9 b/strings/F338E9 new file mode 100644 index 00000000..ca5f866b --- /dev/null +++ b/strings/F338E9 @@ -0,0 +1,4 @@ +fragment / SEC / SBC #$xx + +Set carry before subtracting. This is normal procedure. +Nothing copyrightable or creative here. diff --git a/strings/F7C884C8 b/strings/F7C884C8 new file mode 100644 index 00000000..35a9992f --- /dev/null +++ b/strings/F7C884C8 @@ -0,0 +1,4 @@ +fragment / INY / STY $C8 + +increment Y and store somewhere. +Not copyrightagble.