Register

From Esolang
Jump to navigation Jump to search

Register is a language designed to be as close to the programming language of basic computers. Created by User:WhyNot? Work In Progress!

Memory and Registers

Register has 4 registers, 0-3. It also has infinite memory. But the thing is, the program is saved in the memory! Example:

* this line is a byte in the memory with the address 0
* same thing, except address 1
* etc.

(btw, * are comments) Each instruction/variable takes up 1 byte in the memory. You set the memory when you run the program. Then, the computer runs the code starting from memory address 0. Important! Each byte must take up it's own line.

Commands

Each command is in binary, which is then converted into hex.

00000000 * End program
001; memory location(5 bits) * Jump
010; 0 for output, 1 for input; register (2 bits);00 * Input/Output