checkExtendProgramMemory method Null safety

  1. @override
void checkExtendProgramMemory()
override

Throws CalculatorError(4) if there's no room to add seven bytes of program memory.

Implementation

@override
void checkExtendProgramMemory() {
  if (_memory.availableRegisters < 1) {
    throw CalculatorError(4);
  }
}