Class Op_M

    • Field Detail

      • Logger

        private static final Logger Logger

        Class logger instance.

      • TAG

        private static final String TAG

        Class logger tag.

      • Is_M_Register

        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

        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.
        Specified by:
        Clear in interface IClear
        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

        Specified by:
        Execute in interface IOperation
        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

        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)
        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.