Class Op_M

    • Field Detail

      • Logger

        private static final Logger Logger

        class Logger instance

      • Mask_M_Register_Number

        private static final int Mask_M_Register_Number
        See Also:
        Constant Field Values
      • TAG

        private static final String TAG

        class Logger tag.

      • Is_M_Register

        protected boolean Is_M_Register
        True when operating on an M-Register
      • Register

        protected int Register
        Register number worked on
    • Constructor Detail

      • Op_M

        Op_M​(@NotNull
             @NotNull Calculator Owner)
        Create operation and attach to owning calculator.
        Parameters:
        Owner - Calculator which will call this Opcode
    • Method Detail

      • Check_M

        protected void Check_M​(int Memory,
                               boolean Is_M)
                        throws M_Error
        Check im M Register is valid
        Parameters:
        Memory - Memory register to test
        Is_M - true when M register is handled
        Throws:
        M_Error - exeption of memory is not valid
      • Clear

        public void Clear​(boolean AC)
        Reset state - for state full operations.
        Parameters:
        AC - All Clear reset
        See Also:
        IClear.Clear(boolean)
      • Execute

        public void Execute​(short Opcode)
                     throws Error
        Description copied from interface: IOperation

        Execute virtual CPU command or key stroke

        Parameters:
        Opcode - Virtual CPU Operation to be executed
        Throws:
        Error - something went wrong
        M_Error - Memory accessed does not exist
        Error
        See Also:
        IOperation.Execute(short)
      • Get_M

        protected int Get_M​(int Opcode)
        Parameters:
        Opcode - Opcode for which the memory register should be determined
        Returns:
        number of the register
      • Is_M

        @Contract(pure=true)
        protected boolean Is_M​(int Opcode)
        Parameters:
        Opcode - Opcode for which the F or M register use need to be determined
        Returns:
        true if normal memory is used.