From 8f9ce4bbbac36e1f4806e6d05ca7588035ed162b Mon Sep 17 00:00:00 2001 From: Paul Gardner-Stephen Date: Wed, 24 Apr 2019 16:24:05 +0930 Subject: [PATCH] deal with more similar strings --- src/similarity.c | 1 + strings/008D8D02 | 3 +++ strings/0291F3 | 3 +++ strings/38E928 | 4 ++++ strings/424153 | 3 +++ strings/48AD01DC | 5 +++++ strings/85D78A489848 | 4 ++++ strings/A5D338E928 | 5 +++++ strings/B1F38D8702 | 4 ++++ strings/E6C90DD0034C | 3 +++ 10 files changed, 35 insertions(+) create mode 100644 strings/008D8D02 create mode 100644 strings/0291F3 create mode 100644 strings/38E928 create mode 100644 strings/424153 create mode 100644 strings/48AD01DC create mode 100644 strings/85D78A489848 create mode 100644 strings/A5D338E928 create mode 100644 strings/B1F38D8702 create mode 100644 strings/E6C90DD0034C diff --git a/src/similarity.c b/src/similarity.c index b0eeee8e..f4b26e30 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]==0xa5) break; // LDA $xx if (f1[i+1]==0xa0) break; // LDY #$xx if (f1[i+1]==0x69) break; // ADC #$xx if (f1[i+1]==0xc9) break; // CMP #$xx diff --git a/strings/008D8D02 b/strings/008D8D02 new file mode 100644 index 00000000..f5246b47 --- /dev/null +++ b/strings/008D8D02 @@ -0,0 +1,3 @@ +Fragment + STA $028D + +Only one whole instrution here. Not copyrightable. diff --git a/strings/0291F3 b/strings/0291F3 new file mode 100644 index 00000000..f7c64b41 --- /dev/null +++ b/strings/0291F3 @@ -0,0 +1,3 @@ +Fragment / STA ($F3),Y + +Only one whole instruction here. Not copyrightable. diff --git a/strings/38E928 b/strings/38E928 new file mode 100644 index 00000000..275674fe --- /dev/null +++ b/strings/38E928 @@ -0,0 +1,4 @@ +SEC / SBC #40 + +Effectively a single instruction "subtract 40 from A". +Not copyrightable. diff --git a/strings/424153 b/strings/424153 new file mode 100644 index 00000000..52cdd84b --- /dev/null +++ b/strings/424153 @@ -0,0 +1,3 @@ +First three letters of BASIC + +Not copyrightable. diff --git a/strings/48AD01DC b/strings/48AD01DC new file mode 100644 index 00000000..0c25d77b --- /dev/null +++ b/strings/48AD01DC @@ -0,0 +1,5 @@ +PHA / LDA $DC01 + +Save A before loading a memory address. +This is what you do when a CPU doesn't have enough registers to hold +everything at once, and is very common on a 6502. Not copyrightable. diff --git a/strings/85D78A489848 b/strings/85D78A489848 new file mode 100644 index 00000000..be386372 --- /dev/null +++ b/strings/85D78A489848 @@ -0,0 +1,4 @@ +STA $D7 / TXA / PHA / TYA / PHA + +Save A in a memory location, and push X and Y onto the stack. +Nothing creative or copyrightable here. diff --git a/strings/A5D338E928 b/strings/A5D338E928 new file mode 100644 index 00000000..e6f7df95 --- /dev/null +++ b/strings/A5D338E928 @@ -0,0 +1,5 @@ +LDA $D3 / SEC / SBC #40 + +Load A from a memory location and subtract 40 from it. +Nothing creative or copyrightable here. Would be a single +instruction on many other CPU architectures. diff --git a/strings/B1F38D8702 b/strings/B1F38D8702 new file mode 100644 index 00000000..ee06a503 --- /dev/null +++ b/strings/B1F38D8702 @@ -0,0 +1,4 @@ +LDA ($F3),Y / STA $0287 + +Copy byte from pointer to memory location. +Nothing creative or copyrightable here. diff --git a/strings/E6C90DD0034C b/strings/E6C90DD0034C new file mode 100644 index 00000000..6a214a61 --- /dev/null +++ b/strings/E6C90DD0034C @@ -0,0 +1,3 @@ +Fragment / CMP #$0D / BNE past JMP / JMP $nnnn + +Take the jump if A = $0D. Nothing creative or copyrightable here.