6-5

From Esolang
Jump to navigation Jump to search

6-5 is a programming language created by User:The Esolanger.

Instructions

  • 1 - moves the PC right twice.
  • 3 - moves the PC left.
  • 6 - adds 6 to the cell the PC is pointing to.
  • 5 - adds 5 to the cell the PC is pointing to.
  • 9 - adds -6 to the cell the PC is pointing to.
  • 2 - adds -5 to the cell the PC is pointing to.
  • 8n - jumps to the nth 4 in the code. Numbers beyond 9 denoted using letters. (A=10, B=11 etc.)
  • 4 - jump pointer for 8.
  • 7n - skips the next instruction if the cell is equal to n. Numbers beyond 9 denoted using letters.
  • 0 - terminates the program.
  • A - output the cell as ASCII.
  • B - puts 1 byte of ASCII character input into the cell.
  • C - follows the comments.

Sample Programs

Hello, World!

666666666666A C initialize the first cell to 72 and print H
66665A C change the cell to 101 and print e
662AA C change the cell to 108 and print l twice
626262A C change the cell to 111 and print o
9999999999995A C change the cell to 44 and print the comma
99A C change the cell to 32 and print the space
55555555555A C change the cell to 87 and print W
6666A C change the cell to 111 and print o
626262A C change the cell to 114 and print r
9A C change the cell to 108 and print l
95959A C change the cell to 100 and print d

Implementations