License plate language
License plate language is an esolang invented by User:None1. Programs are concatenations of first 2 characters in Chinese (inland) license plates.
Memory
This language has a stack and an accumulator, both can hold unbounded signed integers.
Commands
They are like this:
opcode argument
The opcode is a Chinese character, which is one of the 31 characters used for license plates. The argument is an uppercase letter. The value of the argument is the ASCII value of the argument minus 65. For example, A stands for 0. The words argument
below refers to the value of the argument unless otherwise specified.
In order to work, the command must be a valid part of license plates, for example "粤I" or "晋G" won't work.
The 31 opcodes have these meanings:
- 鲁:Increase accumulator by argument.
- 晋:Decrease accumulator by argument.
- 冀:Multiply accumulator by argument.
- 豫:Divide accumulator by argument.
- 云:Push the accumulator into the stack, argument has no use.
- 苏:Pop the stack and push into accumulator, argument has no use.
- 皖:Input accumulator as Unicode, argument has no use.
- 粤:Output the argument as Unicode, argument has no use.
- 湘:Jump to line argument (0-indexed).
- 浙:Jump to line argument (0-indexed) if accumulator is nonzero.
- 琼:Compare accumulator and stack top, push the result (1 for true, 0 for false) onto stack, argument determines what comparison is to be done: 0 is ==, 1 is !=, 2 is <, 3 is >, 4 is <=, 5 is >=.
- 蒙:Calculate accumulator and stack top, push the result onto stack, argument determines what calculation is to be done: 0 (or 6) is + (or 7), 1 (or 9) is -, 2 (or 10) is *, 3 (or 11) is /(floor divide), 4 (or 12) is %, 5 is ** (power).
- 陕:Output the argument (letter) directly.
- 黑:Terminate the program, argument has no use.
- 吉:Input accumulator as integer, argument has no use.
- 辽:Output accumulator as integer, argument has no use.
- 新:Push a random integer from 0 to 1 onto the stack.
- 甘:Set the accumulator to the length of the stack.
- 桂:Output the program's source code.
- 赣:Clear the stack.
- 闽:Output "Hello, World!".
- 川:Jump to the start of the program.
- 贵:The same as 桂.
- 鄂:Push argument into stack
- 青:access the argument-th value of the stack (from bottom to top, 0-indexed)
- 藏、宁、京、津、沪、渝:NOP
Commands are separated by line feeds.
Examples
Hello, World!
闽A
Quine
桂A
Or:
贵A
Computational class
IDK, but definitely not TC because its jumping ability is very limited, it can only jump to the 1st, 2nd, 3rd, 4th, 5th, 6th, 7th, 8th, 10th, 11th, 12th, 13th, 14th and 21th line of code (for the Zhejiang province has only ABCDEFGHJKLM license plate codes and the Hunan province has only ABCDEFGHJKLMNU license plate codes).