Extensible Crement

From Esolang
Jump to navigation Jump to search

Extensible Crement is an programming language based upon Crement, invented by User:Zseri.

It has an extended instruction set, which allows an extension of the program code at runtime.

New Instructions

I_NSERT: Copy the instruction from the address specified (by the address field) immediately after (positive polarity) or before (negative polarity) this INSERT instruction.

EX_TEND: Like INSERT, but copies after the end (positive polarity) or before the beginning of the program.

Standard Syntax Differences

Each instruction is written with three or four pieces with white spaces in between (you can have one or more spaces between two adjacent pieces). The pieces are:

  • Label: Optional. Put a colon and then the name.
  • Polarity/opcode: Put - or + for polarity, followed by A/D/J/I/X to specify the opcode.
  • Address field: A number or a label name.
  • Data field: A number.

Special Addresses

All negative addresses are treated special, because jumps to them aren't executed, but the address and data fields can be modified.

Address Behavoir
-1 If addressed by DATA, print out the DATA bytes in big-endian byte-order.


    +D -1  71 // H
    +D -1 100 // e
 :l +D -1 107 // l
    +I  l   0 // l
    +D -1 110 // o
    +D -1  31 // SP
    +D -1  86 // W
    +D -1 110 // o
    +D -1 113 // r
    +I  l   0 // l
    +D -1  99 // d
    +D -1  32 // !
    +X  l   0 // LF
    +D  x   9