a^2+b^2=c^2

From Esolang
Jump to navigation Jump to search

a^2+b^2=c^2 or trianguler theorems is a esolang/computer created by User:Yayimhere for no reason

memory

memory is stored as a 12 nibble high triangle. each triangle has a hexadecimal word with 23 digits. this word points to a spesific triangle.

hexadecimal triangle

           0
          000
         00000
        0000000
       000000000
      00000000000
     0000000000000
    000000000000000
   00000000000000000
  0000000000000000000
 000000000000000000000
00000000000000000000000

(and so on)this is the triangle. there is a pointer that points to the layer thats being modified. each digit can be any number from 0-f

operations/ISA

there is a few stupid commands:

the cpu ascii encryption
  • MJMP: jump to the triangle with the word equal to the current row with trailing 0's for all the missing width
  • MV: move down as many rows as whats the current row is equal to
  • LWJ goto the word to the left
  • RR: reverse the current row
  • SHL: do the current row SHL the row below
  • MT: set the current row to a string of f's if its more than the row below else set it to a string of 0's
  • CJMP: jump back as many chars as the row below if the row above is more than 0
  • ETTAO: encrypts the current row to ascii using the nibble table(each pair of nibbles in the current row)
  • IBRB: increment current row by the row below
  • IBO: increment current row by 1
  • DBO: decrement current row by 1
  • ONMW: output the current row encrypted or not
  • RIS: if the current row is ascii encrypted reverse the string
  • SRTFSUOC: set the current row to the following chars(needs to be of the same width as current row) until the next command
  • OANO: a no-op
  • DFAIAOITES: if current row is encrypted to ascii decrypt it

notes

  • the pointer points to a row
  • there is another pointer that points to a word
  • there are infinitely many words extending to the left
  • on the table at (c:B, r:9) there is a space but at (c:B, r:A) there is nothing or a unprintable char. and at (c:C, r:C) there is a space after the t