Pointless challenge: 6502 wordsquares, 3x3

Let's talk about anything related to the 6502 microprocessor.
Post Reply
User avatar
BigEd
Posts: 11464
Joined: 11 Dec 2008
Location: England
Contact:

Pointless challenge: 6502 wordsquares, 3x3

Post 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.

.
..
.
...
.
..
.
....
.
..
.
...
.
..
.
User avatar
BitWise
In Memoriam
Posts: 996
Joined: 02 Mar 2004
Location: Berkshire, UK
Contact:

Re: Pointless challenge: 6502 wordsquares, 3x3

Post by BitWise »

Challenge accepted. I'll be back.
Andrew Jacobs
6502 & PIC Stuff - http://www.obelisk.me.uk/
Cross-Platform 6502/65C02/65816 Macro Assembler - http://www.obelisk.me.uk/dev65/
Open Source Projects - https://github.com/andrew-jacobs
User avatar
BitWise
In Memoriam
Posts: 996
Joined: 02 Mar 2004
Location: Berkshire, UK
Contact:

Re: Pointless challenge: 6502 wordsquares, 3x3

Post 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.
Attachments
square.zip
(643.96 KiB) Downloaded 192 times
Last edited by BitWise on Tue Jun 12, 2018 2:10 pm, edited 1 time in total.
Andrew Jacobs
6502 & PIC Stuff - http://www.obelisk.me.uk/
Cross-Platform 6502/65C02/65816 Macro Assembler - http://www.obelisk.me.uk/dev65/
Open Source Projects - https://github.com/andrew-jacobs
User avatar
BigEd
Posts: 11464
Joined: 11 Dec 2008
Location: England
Contact:

Re: Pointless challenge: 6502 wordsquares, 3x3

Post by BigEd »

That was quick! Well done! And not so very many - but enough to be interesting - with 6 distinct opcodes.
User avatar
BitWise
In Memoriam
Posts: 996
Joined: 02 Mar 2004
Location: Berkshire, UK
Contact:

Re: Pointless challenge: 6502 wordsquares, 3x3

Post 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.
Andrew Jacobs
6502 & PIC Stuff - http://www.obelisk.me.uk/
Cross-Platform 6502/65C02/65816 Macro Assembler - http://www.obelisk.me.uk/dev65/
Open Source Projects - https://github.com/andrew-jacobs
User avatar
BigEd
Posts: 11464
Joined: 11 Dec 2008
Location: England
Contact:

Re: Pointless challenge: 6502 wordsquares, 3x3

Post by BigEd »

Now I'm imagining you chiselling code onto stone tablets...
User avatar
BitWise
In Memoriam
Posts: 996
Joined: 02 Mar 2004
Location: Berkshire, UK
Contact:

Re: Pointless challenge: 6502 wordsquares, 3x3

Post by BitWise »

BigEd wrote:
Now I'm imagining you chiselling code onto stone tablets...
Some days it feels like that.
Andrew Jacobs
6502 & PIC Stuff - http://www.obelisk.me.uk/
Cross-Platform 6502/65C02/65816 Macro Assembler - http://www.obelisk.me.uk/dev65/
Open Source Projects - https://github.com/andrew-jacobs
John West
Posts: 383
Joined: 03 Sep 2002

Re: Pointless challenge: 6502 wordsquares, 3x3

Post 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.
Post Reply