PlusOrMinus

From Esolang
Jump to navigation Jump to search

PlusOrMinus (POM) is a language by User:PythonshellDebugwindow.

Memory

POM uses a wrapping unsigned integer 8-bit accumulator.

Commands

Commands Meaning
+ Increment the accumulator
- Print out the (extended) ASCII character of the accumulator, then decrement it

All other instructions are treated as comments.

PlusIntMinus

PlusIntMinus (PIM) is a variation of POM that slightly changes its syntax. It uses the same memory model as POM. All POM programs are valid, and work the same, in PIM, but while all PIM programs are valid in POM, most work differently in each language.

Commands

Commands Meaning
+ When followed by a non-negative integer (regex: [0-9]+), adds that integer modulo 256 to the accumulator; when followed by anything else, adds 1 to the accumulator
- Prints out the (extended) ASCII character of the accumulator, then decrements it

All other instructions are still treated as comments.

Resources

  • An interpreter for both languages written in JavaScript