Executables consisting exclusively of alpha-numeric characters.
The digits "0123456789" are used for dark, the letters "acemnorsuvwxz" for light.
Removing instructions that are not alpha-numerical, strips functionality down to the minimum:
- 4.5 of the 7 registers available (%bx, %si, %di, %bp, %ah)
- 4 of the ~80 instructions groups available (XOR,IMUL,CMP,Jcc)
- constant values start from 48, (only range 0x30-0x39,0x61-0x79)
By cosmic coincidence, the 2 instructions needed to jailbreak are available.
On top of that, self-modifying code and radix13 encoding.
This should have been released a decade ago.
As compensation, it has been remastered.
The reward was making it 30% smaller.
This is cool! It reminds me of a paper I read in 2017 in which the author creates a C89 compiler that compiles to printable ASCII by using similarly limited instructions.
ASCII executables have been made in the past and use any displayable ASCII character. The difference with those is that this project is exclusively alphanumeric. To my knowledge that is a first.
It also doesn't use self-modifying code. In words of the author:
>This is like telling the waiter that you don’t eat poultry but eggs are okay, and then they bring you an egg, but that egg hatches into a chicken right after they bring it to you. Come on. [...] While self-modifying code is a powerful technique, it makes this problem "too easy;" I want to explore what programs can be written natively in the printable subset of X86.
As was noted by jstrieb, there exists a compiler that does that, so basically any native program. There is no challenge in that.
A real challenge would be, how far can you cripple an instruction set such that it still can do something useful.
Crippling is done by reducing the 192 printable characters to 36 alphanumeric characters. That leaves 4 instructions with limited addressing modes.
This problem is hard because what you need, even for self modifying code is not available. What smile does is to make that available with the only two instructions left over that modify values: XOR and IMUL.
While smile is also impressive, I think you are unfairly downplaying tom7's work. While it uses bigger instruction set, it never executes any non-printable instruction at all.
Thank you for pointing out my grammatical failure. Tom's work is amazing, I read it and was really impressed. There are not many people who swim on this level of coding.
What I meant was that I knew that executables consisting of printable ascii is possible, I just wasn't happy that the ascii art was cluttered with symbols.
To make it more aesthetic and to create shading differences by utilizing the glyph sizes, I was looking into selecting the tallest (digits) and shortest (lowercase letters). However, the lowercase letters with ascenders and descenders make it fuzzy so they were removed too.
With these restrictions the ante of the challenge were raised significantly. In my response I was referring to that. Downplaying Tom is unfair as his work is marvellous, and I know because I also build compilers. I wish I could correct the text to make this clear but it is now locked.
When ASCII art is the executable....
Executables consisting exclusively of alpha-numeric characters. The digits "0123456789" are used for dark, the letters "acemnorsuvwxz" for light.
Removing instructions that are not alpha-numerical, strips functionality down to the minimum:
By cosmic coincidence, the 2 instructions needed to jailbreak are available. On top of that, self-modifying code and radix13 encoding.This should have been released a decade ago. As compensation, it has been remastered. The reward was making it 30% smaller.