anchor.diff:    /// Insert value into [memory] at the specified address, encoded as the
     /// specified number type.
     void setMemoryValue(int address, NumberType numberType, num value) {
  -    memory.setValue(address, numberType, value);
  +    if (address < codeSegmentSize)
  +      throw new SegfaultSignal(address, 'The code segment is read-only');
  +    try {
  +      memory.setValue(address, numberType, value);
  +    } on RangeError {
  +      throw new SegfaultSignal(address, 'Out of range');
  +    }
     }
   
     /// Encode value as the specified number type, increase the stack pointer by
  
positive.code:   ///   * `null` if the implementation takes no argument
    ///   * `int` if the value can be directly resolved
    ///   * An [AstNode] if the value can't be determined at the time when this
    ///     object is created. This happens when a control flow instruction jumps
    ///     "forward", targeting an instruction with a higher address that itself.
    var immediateValue;
  
  
negative.code:   /// the heap begins at zero and grows towards infinity.
    MemoryBlock memory;
  
    /// The program that is executed when calling [run].
    List<Instruction> program;
  
    /// Number of bytes in the VMs memory that is reserved for the [program].
    int get codeSegmentSize => program.length * instructionSize.size;
  
    /// Points to the lowest currently used byte of the stack (in [memory]).
    int stackPointer;
  
    /// Points to the last byte in the stack that is not owned by the current
    /// function invocation. This register is used to determine the memory address
    /// of local variables. Look at [LoadRelativeAddressInstruction] for details.
    int framePointer;
  
    /// Points to the highest stack index the current function might allocate.
    ///
    /// TODO: Will be used to detect stack overflows, once heap memory allocation
    /// is implemented.
    int extremePointer;
  
    /// Stores the index into the program code of the next instruction.
    ///
    /// Note: this index references the _nth instruction_, not the instruction
    /// at _address n_! The address of the referenced instruction in bytes is
    /// `programCounter * instructionSize.size`.
    int programCounter = 0;
  
    /// The instruction that should be executed next, according to the flow
    /// control of the program.
    Instruction get nextInstruction => program[programCounter];
  
    /// Initialize the VM with `memorySize` bytes available memory, of which the
    /// bytes `[0..codeSegmentSize)` are read-only.
    VM(this.program, [int memorySize]) {
      memorySize ??= pow(2, 16);
      if (memorySize > pow(2, 16))
        throw new ArgumentError.value(
            memorySize, 'memorySize', 'Exceeding maximum valid value of 2^16');
      memory = new MemoryBlock(memorySize - codeSegmentSize);
      stackPointer = framePointer = extremePointer = memorySize;
    }
  
    /// Run [program] until it terminates. Return the value returned from the
    /// programs `main` function.
    int run() {
      try {
        while (true) {
          execute(nextInstruction);
        }
      } on HaltSignal catch (signal) {
        return signal.statusCode;
      }
    }
  
    /// Execute a single `instruction` in the context of this VM.
    void execute(Instruction instruction) {
      programCounter++;
      instruction.implementation.execute(this, instruction.argument);
    }
  
    /// Take back the last executed instruction.
  