4 bits, unlimited bytes

From Esolang
Jump to navigation Jump to search

4 bits, unlimited bytes is an assembly language invented by User:TheBigH. It is inspired by 4 bits, 8 bytes.

Changes

4 bits, unlimited bytes is identical to 4 bits, 8 bytes, except for the following:

  • 4 bits, unlimited bytes has infinite memory. It can still wrap around if the memory pointer somehow reaches infinity. Programs are still a finite number of characters, however after all of the characters, the memory is filled with ○. Example: ExampleProgram becomes ExampleProgram○○○○○○○○○○○○○○○○○ with ○ repeating forever.
  • Instruction 1101 (OUT) no longer takes the modulo 8.
  • Instruction 1110 (OUB) only outputs the first 8 bytes.
  • Addresses are now represented with the system below.

Addresses

If the address is 3 bits long or fewer, it is represented by 0(address). Example: 0101 refers to byte 5.

If the address is 6 bits long or fewer, it is represented by 1(first 3 bits)0(last 3 bits). Example: 11010010 refers to byte 42.

If the address if 9 bits long or fewer, it is represented by 1(first 3 bits)1(next 3 bits)0(last three bits). Example: 111010100000 refers to byte 400.

This system continues forever.