Page 1 of 1

Pointless challenge: 6502 wordsquares, 3x3

Posted: Tue Jun 12, 2018 12:49 pm
by BigEd
On the cover of the classic Advanced User Guide (for the BBC Micro) by Bray, Dickens, and Holmes, we find this:

Image

Or, in letters:

Code: Select all

BCC
PLP
LDY
You'll notice 6 mnemonics interleaved. Are there more ways to do this? Many more, or just one or two? Is it easy to find them? Fancy writing a program to find them all??

Here's a bit of whitespace, just in case there are spoilers below.

.
..
.
...
.
..
.
....
.
..
.
...
.
..
.

Re: Pointless challenge: 6502 wordsquares, 3x3

Posted: Tue Jun 12, 2018 1:14 pm
by BitWise
Challenge accepted. I'll be back.

Re: Pointless challenge: 6502 wordsquares, 3x3

Posted: Tue Jun 12, 2018 2:03 pm
by BitWise
BitWise wrote:
Challenge accepted. I'll be back.
There are more than you'd expect. Results in the two trace files (in the zip) for the 6502 and 65C02.

Re: Pointless challenge: 6502 wordsquares, 3x3

Posted: Tue Jun 12, 2018 2:08 pm
by BigEd
That was quick! Well done! And not so very many - but enough to be interesting - with 6 distinct opcodes.

Re: Pointless challenge: 6502 wordsquares, 3x3

Posted: Tue Jun 12, 2018 2:31 pm
by BitWise
BigEd wrote:
That was quick! Well done! And not so very many - but enough to be interesting - with 6 distinct opcodes.
Its a quiet day in the code mine.

Re: Pointless challenge: 6502 wordsquares, 3x3

Posted: Tue Jun 12, 2018 2:49 pm
by BigEd
Now I'm imagining you chiselling code onto stone tablets...

Re: Pointless challenge: 6502 wordsquares, 3x3

Posted: Tue Jun 12, 2018 3:33 pm
by BitWise
BigEd wrote:
Now I'm imagining you chiselling code onto stone tablets...
Some days it feels like that.

Re: Pointless challenge: 6502 wordsquares, 3x3

Posted: Tue Jun 12, 2018 4:41 pm
by John West
If we insist on six different instructions and ignore transposition, there are only two solutions. The second isn't hard to find, given the first.

Respect to whoever came up with that design.