19
\$\begingroup\$

Robber's challenge

This challenge challenges the Cop to write a non-empty program that, when run, produces some non-empty output in language A, and, when reversed, produces some non-empty output in language B. The program may produce any output to STDERR when run in either language, but may not take input in any way.

The cop should provide the following information:

  • The forwards program
  • The output when run in language A
  • The output when run backwards in language B

Robbers should attempt to find the two languages used

Rules

  • The criteria for a valid programming language are the same as those of The Programming Language Quiz, Mark II - Cops:

  • Each answer must run in less than a minute on a reasonable PC.

  • Different versions of a language count as the same language.

  • Languages with different flags are valid. However, flags must be revealed to avoid obscure combinations.

  • Cracking a submission consists of finding any pair of programming languages that work, not just the intended ones.

An answer is safe if it is not cracked until two months after the question is posted.

An answer can not compete one month after this challenge has been posted.

The shortest safe answer by byte count wins.

Example cop post

# ??? and ???, 128 bytes

```
print(1)#.++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
```

Language A expected output: `1`  
Language B expected output: `v`

and, when cracked,

# Python 3 and brainfuck, 128 bytes, cracked by [<user>](<link to robbers post>)

```
print(1)#.++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
```

Language A expected output: `1`  
Language B expected output: `v`

<explanation>
\$\endgroup\$
0

15 Answers 15

8
\$\begingroup\$

Japt and Seriously, 5 Bytes - Cracked by math junkie.

STINK

Language A expected output: the current date and time on the machine, in its locale formatted like so Sun Jun 05 2022 18:41:48 GMT+0100 (British Summer Time).

this is just the trailing K getting a JavaScript date()

Language B expected output of KNITS:









































































































































































































































































































                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,......................................................................................................................................................................................................000000000000000000000000000111111111111111111111111111111111111111111111111111111111111222222222222222222222222222222222222222222222222222222222222333333333333333333333333333333333333333333333333333333333333444444444444444444444444444444444444444444444444444444444444555555555555555555555555555555555555555555555555555555555555666666666666666666666666666666666666666666666666666666666666777777777777777777777777777777777777777777777777777777777777888888888888888888888888888888888888888888888888888888888888999999999999999999999999999999999999999999999999999999999999GTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeefffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiikkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkklllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllmmnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooopppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppprrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrsssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssstttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwy

..that is, in order:

\$298\$ newline characters
\$2278\$ space characters
\$198\$ ,s
\$198\$ .s
\$27\$ 0s
\$60\$ 1s
\$60\$ 2s
\$60\$ 3s
\$60\$ 4s
\$60\$ 5s
\$60\$ 6s
\$60\$ 7s
\$60\$ 8s
\$60\$ 9s
\$1\$ G
\$98\$ Ts
\$591\$ as
\$595\$ bs
\$295\$ ds
\$1289\$ es
\$297\$ fs
\$199\$ hs
\$98\$ is
\$98\$ ks
\$693\$ ls
\$2\$ ms
\$591\$ ns
\$1091\$ os
\$98\$ ps
\$397\$ rs
\$492\$ ss
\$893\$ ts
\$99\$ us
\$296\$ ws
\$1\$ y
\$1\$ newline character.

The N gets us the text of "99 Bottles of Beer", S then sorts the characters.

\$\endgroup\$
1
7
\$\begingroup\$

Gol><> and ;#+, 12 bytes, cracked by MathJunkie

push 72;ll-l

Language A expected output: 16

Language B expected output: -1

You got half the intended language pair right. But not the other half.

\$\endgroup\$
1
5
\$\begingroup\$

05AB1E and Noether, 5 bytes, cracked by Jonathan Allan

PLACO

Language A (forwards): 2483027905

Language B (backwards): 26

\$\endgroup\$
1
4
\$\begingroup\$

Befunge-96 and befunge-97, 8 bytes, Cracked by steffan

_2h2,@#>

Outputs 4 going forwards and 0x00 0x02 bytes going backwards.

Well, that lasted all of five minutes :P

\$\endgroup\$
1
4
\$\begingroup\$

Burlesque and Marbelous, 11 bytes, Safe

23 45 67 ++

Forward:

4567
23

Note: It outputs exactly this in the official online interpreter. But it also outputs a few more trailing characters in other interpreters, presumably because of different command line arguments for the different ways handling standard input, which is not supported in the official online interpreter. But I think I don't need to reveal the flags, because this is the only way running the official online interpreter, which is linked from the official website linked from the Esolangs page.

Backward:

vT2

Should be easy because it's obvious how it works in both languages.

\$\endgroup\$
3
  • \$\begingroup\$ How it works forwards: pushes 23 to stack, pushes 45 to stack, pushes 67 to stack, concatenate 45 and 67 via ++, and implicit output. \$\endgroup\$ Jun 5 at 6:49
  • \$\begingroup\$ How it works backwards: ++ does nothing, pushes char with hex unicode 76 to stack, pushes char with hex unicode 54 to stack, pushes char with hex unicode 32 to stack, implicit output (or could the implicit output automatically convert numbers to the corresponding unicode characters? Not sure... These are just my guesses. I'm pretty sure both languages are stack-based. Upvote. \$\endgroup\$ Jun 5 at 6:50
  • \$\begingroup\$ @NobodyNeedsNames Backward is a 2D language with multiple instruction pointers, each having a single integer as the state, not stack based. \$\endgroup\$
    – jimmy23013
    Aug 8 at 8:18
3
\$\begingroup\$

Pyth and Pip, 6 bytes, cracked by whqwert

h+hTCG

Language A expected output: 156490583352162063278528710879425690470022892627113539022649734
Language B expected output: 98.29704308057353

\$\endgroup\$
1
3
\$\begingroup\$

StupidStackLanguage and Deadfish~, 12 bytes, cracked by math junkie

ioaddrsirmix

Language A (forwards): -1

Language B (backwards): 2

\$\endgroup\$
1
3
\$\begingroup\$

BRASCA and Foo (or others), 2 bytes, cracked by jimmy23013

`"

Language A expected output: "
Language B expected output: `

They both start a string with the first character and implicitly end it (no ending string character), and therefore the other character is printed.

\$\endgroup\$
1
3
\$\begingroup\$

Perl 6 and x86-16 (MS-DOS COM), 41 bytes, Safe

say q@if-X	~h	$hL~hCF)o,AF)XD`hBZQ]P ,XQ@

The forward program prints:

if-X	~h	$hL~hCF)o,AF)XD`hBZQ]P ,XQ

Note the trailing newline.

The reverse program prints:

@QX, P]QZBh`DX)FA,o)FCh~Lh@QX, P]QZBh`DX)FA,o)FCh~Lh

One of these languages should be much easier than the other.

The forward program is fairly straightforward. say prints a string followed by a newline, and q is an operator that treats the next character as though it were a quote mark.

The reverse program is an x86-16 MS-DOS COM executable. MS-DOS programs are always loaded at 0x100, and if you disassemble it assuming that, you get the following:

0x100:  40          inc  ax
0x101:  51          push cx
0x102:  58          pop  ax
0x103:  2C 20       sub  al, 0x20
0x105:  50          push ax
0x106:  5D          pop  bp
0x107:  51          push cx
0x108:  5A          pop  dx
0x109:  42          inc  dx
0x10a:  68 60 44    push 0x4460
0x10d:  58          pop  ax
0x10e:  29 46 41    sub  word ptr [bp + 0x41], ax
0x111:  2C 6F       sub  al, 0x6f
0x113:  29 46 43    sub  word ptr [bp + 0x43], ax
0x116:  68 7E 4C    push 0x4c7e
0x119:  68 24 09    push 0x924
0x11c:  68 7E 09    push 0x97e
0x11f:  58          pop  ax
0x120:  2D 66 69    sub  ax, 0x6966
0x123:  40          inc  ax
0x124:  71 20       jno  0x146
0x126:  79 61       jns  0x189

This looks like nonsense! How could it possibly output anything? I wrote the program using only printable characters, which leaves only a handful of instructions available, many of them not useful. In particular, it leaves no instructions that actually output anything. Loops aren't possible either, because loops are just jumps with negative offsets, and no negative numbers can be made from printable characters.

To get around this, the program is self-modifying: the instructions at 0x10e and 0x113 modify the instructions at 0x120 and 0x122 by subtracting off a constant. After these instructions, the modified program disassembles to:

0x100:  40          inc  ax
0x101:  51          push cx
0x102:  58          pop  ax
0x103:  2C 20       sub  al, 0x20
0x105:  50          push ax
0x106:  5D          pop  bp
0x107:  51          push cx
0x108:  5A          pop  dx
0x109:  42          inc  dx
0x10a:  68 60 44    push 0x4460
0x10d:  58          pop  ax
0x10e:  29 46 41    sub  word ptr [bp + 0x41], ax
0x111:  2C 6F       sub  al, 0x6f
0x113:  29 46 43    sub  word ptr [bp + 0x43], ax
0x116:  68 7E 4C    push 0x4c7e
0x119:  68 24 09    push 0x924
0x11c:  68 7E 09    push 0x97e
0x11f:  58          pop  ax
0x120:  CD 21       int  0x21
0x122:  78 FB       js   0x11f
0x124:  71 20       jno  0x146
0x126:  79 61       jns  0x189

The first ten bytes are setting up the registers to their needed values. cx is initially 0x00ff on most versions of MS DOS (including DOSBox, the free interpreter I tested it on), which is used to set bp to 0x00df for addressing purporses. dx is set to 0x100, the start of the string to be output later.

The next twelve bytes modify the loop as described above, using the sub r/m16,r16 form of subtraction. The value of bp is critical to address the memory in the program without using unprintable characters.

The next nine bytes set up the three interrupts to be called (in reverse order). The upper byte sets the command to be run (output to stdout for 0x09 and exit for 0x4c), the lower byte is not important.

The key here is the loop pop ax, int 0x21, js 0x11f, which pops a value of the stack and then makes a 0x21 interrupt. Specifically, it makes the ah=0x09 interrupt (print a $-terminated string starting at dx to stdout) twice and then the ah=0x4c interrupt (exit program).

Finally, the last 5 bytes q yas are never reached and only matter for the forward version of the program.

I tested this program with DOSBox: simply copy the program as an executable (.COM) file into a DOSBox folder and run it. Be careful to preserve the horizontal tab.

\$\endgroup\$
2
  • \$\begingroup\$ Do the languages satisfy the rules on what constitutes a programming language? (So it's not a variant of HQ9+ using $ as the eof character?) \$\endgroup\$
    – jimmy23013
    Jun 6 at 4:58
  • \$\begingroup\$ @jimmy23013 Yes, they are both definitely programming languages. \$\endgroup\$
    – Chris
    Jun 6 at 5:03
2
\$\begingroup\$

??? and ???, 209 bytes

+++++++++++++++++.++
++++++++++++++++++++
++++++++++++++++++++
++++++++++++++++++++
++++++++++++++++++++
++++++++++++++++++++
++++++++++++++++++++
++++++++++++++++++++
++++++++++++++++++++
:+++++++++++++++++++

Forward: 9

Backward: [

\$\endgroup\$
0
2
\$\begingroup\$

MarioLANG and brainfuck, 520 bytes, cracked by jimmy23013

...:+
>.>.-
-.---
-.---
-<.--
-->.+
+++-+
<<<.+
->.>+
->.-+
-----
-<.++
+++<+
-.->+
->.++
+++++
+++<-
+.++-
+>.<-
+.---
>.+++
->.<+
-<<<+
-<.>+
->..+
-.+>+
-.>.-
-.---
-.---
-<.--
-->.+
+++<+
-<<.+
->.>+
->.--
----+
-<.++
+++<+
-.->+
->.++
+++++
+++<+
-.+++
->.<+
-.---
>.+++
->.<+
-<<<+
-<.++
>>..+
-.+>+
-.>.-
-.---
-.---
-<.--
-->.+
+++<+
-<<.+
>.>>+
-.---
---<+
-.+++
++<.+
->>.+
+++++
+++++
-<.++
>.<.+
+>.-+
->.--
>]-<+
-<<<+
-<<++
->+++
+++++
>++++
>++++
+++++
+++>+
+++++
+++++
+++>+
+++++
+++++
->[++
+++++
:-++

Forwards: -25

Backwards:

Nobody is Awesome!!!
Nobody is Awesome!!!
Nobody is Awesome!!!
\$\endgroup\$
6
  • \$\begingroup\$ Is the forward output exactly -25? I found a language that also outputs a preceding null byte. \$\endgroup\$
    – jimmy23013
    Jun 5 at 8:48
  • \$\begingroup\$ @jimmy23013 exactly -25. Though can you state that language? \$\endgroup\$ Jun 5 at 11:33
  • \$\begingroup\$ Ah, I suppose that must be a red herring because it also outputted a trailing space. MarioLANG. Backward is brainfuck. \$\endgroup\$
    – jimmy23013
    Jun 6 at 0:27
  • \$\begingroup\$ Wait, does MarioLANG output the space? hmm... \$\endgroup\$ Jun 6 at 0:37
  • \$\begingroup\$ You cracked it. \$\endgroup\$ Jun 6 at 0:37
2
\$\begingroup\$

Javascript and Bash, 193 bytes, cracked by Komali

(![]+[/“¡Ḟọ@⁼ị»/])[!+[...([])]+!+[]]+(!!!!!!![/“¡Ḟọ@⁼ị»/]+[])[+!+[]]+(![]+[])[!+[/“¡Ḟọ@⁼ị»*/]+!+[]]+(![]+[])[+!![]]//# i /''»ị⁼@ọḞ¡“{/ h {"}"/}{/ c ..]][[+][-_;};5$""3$  o3$''1$e {)(..]][[+][-_

Language A expected output: lala

Langauge B expected output: hi

\$\endgroup\$
1
1
\$\begingroup\$

Forwards:

"""+!|>1bab@|!+"""1110111p exit;"1" tuO

Backwards:

Out "1";tixe p1110111"""+!|@bab1>|!+"""

Forwards output:

1110111

Backwards output:


1

Shouldn't be too bad.

\$\endgroup\$
1
\$\begingroup\$

TrumpScript and A Pear Tree, 4 bytes, cracked by whqwert

Forwards:

+:
:+
0O

Backwards:

O0
+:
:+

Forwards:

Parsing error:
What are you doing on line 3?

Backwards:

a partridge

Should be quite easy...

\$\endgroup\$
3
  • \$\begingroup\$ Backwards is A Pear Tree of course but I'm too lazy to go find out the other one \$\endgroup\$
    – Steffan
    Jun 5 at 4:00
  • \$\begingroup\$ Correct, Backwards is a pear tree \$\endgroup\$ Jun 5 at 4:06
  • 1
    \$\begingroup\$ Cracked \$\endgroup\$
    – whqwert
    Jun 5 at 4:08
0
\$\begingroup\$

??? and ???, 9 bytes

ps"x9O@"(

Forwards output: 9

Backwards output: @O9x

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.