We are currently working on new rules for what content should and shouldn't be allowed on this website, and are looking for feedback! See Esolang:2026 topicality proposal to view and give feedback on the current draft.

扌宀 machine

From Esolang
Jump to navigation Jump to search

扌宀 machine is designed by PSTF.

Definition

扌宀 machine is a variant of S^A machine.

A 扌宀 machine consists of an infinite tape and the following 8 operations.

  1. Increase the value of current cell(hereinafter referred as N) by a where a is a constant
  2. Decrease the value of X by 1 if X>0 else do nothing
  3. Swap the values of cell #x and cell #y
  4. Move to cell #x
  5. If N is 0, jump to line x, where x is a constant
  6. Transfer the value of N to the screen
  7. Transfer the input value to N
  8. Jump to line x, where x is a constant

As the definition shown, any S^A machine can be represented by these operations:

1 + a
2 - a
3 % x y
4 # x
5 ? x
6 .
7 ,
8 ! x

Computational Class Proof

Since 扌宀 machine is a variant of S^A machine and might be a superset of S^A machine, so it is also Turing-complete.

It can be used to simulate Brainfuck, and is also a programming machine.

Example

Hello, World!

Note, the input and output mode used here is character input and output.

+ 11
? 18
> 1
+ 6
> 2
+ 9
> 3
+ 8
> 4
+ 4
> 5
+ 3
> 6
+ 1
> 0
- 1
! 2
> 1
+ 6
.
> 2
+ 2
.
+ 7
.
.
+ 3
.
> 3
.
> 4
- 1
.
> 2
- 1
.
> 1
.
+ 3
.
- 6
.
- 8
.
> 4
+ 1
.
> 5
+ 1
.

See Also

Categories