User:Aadenboy/Draft

From Esolang
Jump to navigation Jump to search

cmd space:
+-0!
=gij
><^v
,._#
commands:
+ - add one
- - subtract one
0 - set to 0
! - negate
= - set to 1 if == 0, otherwise set to 0
g - set to 1 if > 0, otherwise set to 0
i - set to 1 if there is more input, otherwise set to 0
j - jump to the label matching the following label target in memory if == 0
> - copy right
< - copy left
^ - copy up
v - copy down
, - set to input
. - output as unicode char
_ - output as number
# - terminate

singles:
<    - left in cmd/mmr
 ^   - up in cmd/mmr
  v  - down in cmd/mmr
   > - right in cmd/mmr
*    - initiate pattern
 *   - initiate label code
 **  - initiate label target
  *  - end label code
   * - end pattern
<  > - run command in cmd space
< v  - switch to cmd space
 ^ > - switch to mmr space
 v^  - reset position in current space

example:
 *
**
  *
 ^v
  v
   >
   >
<  >
   >
<  >
 **
* *
  *
 ^v
  v
  v
  v
<  >
   >
<  >
 ^v
   >
   >
<  >
  v
   >
<  >
 **
**
  *
 *
* *
  *