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: 
    /// Read [memory] at address as the specified number type.
    num readMemoryValue(int address, NumberType numberType) {
      return memory.getValue(address, numberType);
    }
  
    /// Read [memory] at the current stack pointer as the specified number type,
  
negative.code: /// This library implements the target architecture of the minic compiler,
  /// consisting of the [instruction set architecture][1] and a [virtual machine]
  /// [2] that implements these instructions.
  ///
  /// The [VM] provides a 16-bit address space; code segment and runtime data
  /// share 2^16B ≈ 65kB. All opcodes have a size of 4 bytes, where the two lower
  /// bytes are reserved for one immediate argument. Because the VM has no
  /// general-purpose registers, the instruction set is implemented as a stack
  /// machine.
  ///
  /// [1]: https://en.wikipedia.org/wiki/Instruction_set
  /// [2]: https://en.wikipedia.org/wiki/Virtual_machine
  library minic.src.cmachine;
  
  import 'dart:math' show pow;
  import '../ast.dart' show AstNode;
  import '../memory.dart';
  import '../scanner.dart' show Token;
  
  /// This library works with a static size of 4 bytes for all opcodes.
  const NumberType instructionSize = NumberType.uint32;
  
  /// If an immediate argument is encoded in an opcode, its size is 2 bytes.
  const NumberType addressSize = NumberType.uint16;
  
  /// This class serves as the context to a program execution by providing the
  /// memory to store runtime data. This includes the organizational registers and
  /// random access memory.
  ///
  /// The following diagram describes the structure of the memory block:
  ///
  ///          stack          -- address: stackPointer..max
  ///            ⋮
  ///     <unused segment>
  ///            ⋮
  ///          heap           -- address: codeSegmentSize..<property not implemented>
  ///            ⋮
  ///          code           -- address: 0..codeSegmentSize - 1
  class VM {
    /// Combined stack and heap in a continuous block of memory.
    ///
  