Class Calculator
- java.lang.Object
-
- net.sourceforge.uiq3.fx602p.Calculator
-
- All Implemented Interfaces:
Runnable,net.sourceforge.uiq3.calculator.ICalculator,IClear,net.sourceforge.uiq3.IPropertyNotifier
- Direct Known Subclasses:
Desktop_Calculator
public abstract class Calculator extends Object implements net.sourceforge.uiq3.calculator.ICalculator, IClear, net.sourceforge.uiq3.IPropertyNotifier
- Author:
- "Martin Krischik" «krischik@users.sourceforge.net»
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCalculator.Token_Plane_TypeAvailable Token Planes-
Nested classes/interfaces inherited from interface net.sourceforge.uiq3.calculator.ICalculator
net.sourceforge.uiq3.calculator.ICalculator.AlphaRegisterType, net.sourceforge.uiq3.calculator.ICalculator.Companion, net.sourceforge.uiq3.calculator.ICalculator.DefaultImpls, net.sourceforge.uiq3.calculator.ICalculator.DisplayType
-
-
Field Summary
Fields Modifier and Type Field Description private @NotNull A_Register @NotNull []AThe A Register contains the Keyboard_Alpha data of the display.private net.sourceforge.uiq3.calculator.ICalculator.AlphaRegisterTypeA_ActiveActive A register.static intA_Sizeprivate booleanCalculator_RunningCalculator is running - needed for power saving.private booleanCalculator_ShutdownCalculator is not running - needed for end program.private shortCurrent_ProgramCurrent Current_Program(package private) static intDisplay_AlphaThe Display currently displays the content of an Alpha register.(package private) booleanDisplay_EnableDisplay enable - used to switch off the display so that intermediate result are not shown to the user.static StringDisplay_ErrorError Message displayed on using the wrong display mode!private net.sourceforge.uiq3.calculator.ICalculator.DisplayTypeDisplay_ModeCurrent display mode Display_Alpha Displays the content of the Alpha register. Display_L Displays the content of the L0 aka X register. Display_Formatted Displays the content of the L0 aka X register inside an alpha(package private) static intExecution_Alpha_PauseCalculator debugging a program.(package private) static intExecution_ClearExecution Mode.(package private) static StringExecution_ErrorError Message displayed on using the wrong execution mode!(package private) static intExecution_HaltCalculator debugging a program.static intExecution_InteractiveCalculator is used interactively.private intExecution_ModeCurrent Execution mode.(package private) static intExecution_One_StepDo a single step and return to Execution_Halt.(package private) static intExecution_Pausefinal Calculator debugging a program.(package private) static intExecution_RunningCalculator running a program.(package private) static intExecution_WriteExecution Mode.(package private) TapeFA2A simulated cassette Printer(package private) net.sourceforge.uiq3.ui.ICalculatorCanvasFormCanvas class where we display our result or get our keycodes(package private) PrinterFP10A simulated Printer Printerprivate intHlt_PositionReturn Position for HLT Mode.(package private) booleanIgnore_ClearThe last operation was one of the operations (+-) which disable the clear key.static intIndicator_AlphaKeyboard Mode Alpha: Inv Keyboard in inverse move Hyp Keyboard in hyperbolic mode - also used for password entry K Constant calculation mode Hlt halted programm - also used for debugger Run Mode1, interactive or program run mode Wrt Mode2, write programms Pcl Mode3, clear, save, load programs. Deg Mode4, Tr Rad Mode5 Gra Mode6 Keyboard_Alpha Alpha entry and display mofe The mode show that the Alpha Keyboard mode is active.static intIndicator_CountIndicator count: Inv Keyboard in inverse move Hyp Keyboard in hyperbolic mode - also used for password entry K Constant calculation mode Hlt halted programm - also used for debugger Run Mode1, interactive or program run mode Wrt Mode 2, write programms Pcl Mode 3, clear, save, load programs. Deg Mode 4, Tr Rad Mode 5 Gra Mode 6 Keyboard_Alpha Alpha entry and display mofestatic intIndicator_DegTrigonometric functions in degrees (360° based) Inv Keyboard in inverse move Hyp Keyboard in hyperbolic mode - also used for password entry K Constant calculation mode Hlt halted programm - also used for debugger Run Mode1, interactive or program run mode Wrt Mode2, write programms Pcl Mode3, clear, save, load programs. Deg Mode4, Tr Rad Mode5 Gra Mode6 Keyboard_Alpha Alpha entry and display mofestatic intIndicator_GraTrigonometric functions in gradians (400 based) Inv Keyboard in inverse move Hyp Keyboard in hyperbolic mode - also used for password entry K Constant calculation mode Hlt halted programm - also used for debugger Run Mode1, interactive or program run mode Wrt Mode2, write programms Pcl Mode3, clear, save, load programs. Deg Mode4, Tr Rad Mode5 Gra Mode6 Keyboard_Alpha Alpha entry and display mofestatic intIndicator_HltProgram halt wait for user response Inv Keyboard in inverse move Hyp Keyboard in hyperbolic mode - also used for password entry K Constant calculation mode Hlt halted programm - also used for debugger Run Mode1, interactive or program run mode Wrt Mode2, write programms Pcl Mode3, clear, save, load programs. Deg Mode4, Tr Rad Mode5 Gra Mode6 Keyboard_Alpha Alpha entry and display mofestatic intIndicator_HypHyperbolic function active.static intIndicator_InvInverse functions active.static intIndicator_KArithmetic with constants.static intIndicator_PclClear program and memory.static intIndicator_RadTrigonometric functions in radians (2π based) Inv Keyboard in inverse move Hyp Keyboard in hyperbolic mode - also used for password entry K Constant calculation mode Hlt halted programm - also used for debugger Run Mode1, interactive or program run mode Wrt Mode2, write programms Pcl Mode3, clear, save, load programs. Deg Mode4, Tr Rad Mode5 Gra Mode6 Keyboard_Alpha Alpha entry and display mofestatic intIndicator_RunRun and calculation mode.static intIndicator_WrtWrite Programs Inv Keyboard in inverse move Hyp Keyboard in hyperbolic mode - also used for password entry K Constant calculation mode Hlt halted programm - also used for debugger Run Mode1, interactive or program run mode Wrt Mode2, write programms Pcl Mode3, clear, save, load programs. Deg Mode4, Tr Rad Mode5 Gra Mode6 Keyboard_Alpha Alpha entry and display mofeprivate boolean @NotNull []IndicatorsIndicators: Inv Keyboard in inverse move Hyp Keyboard in hyperbolic mode - also used for password entry K Constant calculation mode Hlt halted programm - also used for debugger Run Mode1, interactive or program run mode Wrt Mode2, write programms Pcl Mode3, clear, save, load programs. Deg Mode4, Tr Rad Mode5 Gra Mode6 Keyboard_Alpha Alpha entry and display mofeprivate booleanIndirectCurrently indirect addressing is active(package private) static intInternal_Steps_HighThe memory from 1000 .. 1022 is used internally. 1023 is reserved as stop marker.(package private) static intInternal_Steps_LowThe memory from 1000 .. 1023 is used internally.private intIO_CountNumber of virtual CPU cycles until next IO run.private static intIO_Speeddefines how many steps are executed before the display is updated.private intKey_Bufferlast key pressedprivate booleanKey_Flaga key was pressedprivate Keyboard[]Key_OperationsOperations as they come from the keyboard.private longKey_TimeSystem time when last Key was clicked.static intKeyboard_AlphaKeyboard is in alpha mode Keyboard_Normal Keyboard is in normal mode Keyboard_Inv Keyboard is in inverse mode Keyboard_Hyp Keyboard is in hyperbolic mode Keyboard_Inv_Hyp Keyboard is in inverse hyperbolic mode Keyboard_Alpha Keyboard is in alpha mode Keyboard_Inv_Alpha Keyboard is in inverse alpha mode(package private) static StringKeyboard_ErrorError Message displayed on using the wrong keyboard mode!static intKeyboard_HypKeyboard is in hyperbolic mode Keyboard_Normal Keyboard is in normal mode Keyboard_Inv Keyboard is in inverse mode Keyboard_Hyp Keyboard is in hyperbolic mode Keyboard_Inv_Hyp Keyboard is in inverse hyperbolic mode Keyboard_Alpha Keyboard is in alpha mode Keyboard_Inv_Alpha Keyboard is in inverse alpha modestatic intKeyboard_InvKeyboard is in inverse mode Keyboard_Normal Keyboard is in normal mode Keyboard_Inv Keyboard is in inverse mode Keyboard_Hyp Keyboard is in hyperbolic mode Keyboard_Inv_Hyp Keyboard is in inverse hyperbolic mode Keyboard_Alpha Keyboard is in alpha mode Keyboard_Inv_Alpha Keyboard is in inverse alpha modestatic intKeyboard_Inv_AlphaKeyboard is in inverse alpha mode Keyboard_Normal Keyboard is in normal mode Keyboard_Inv Keyboard is in inverse mode Keyboard_Hyp Keyboard is in hyperbolic mode Keyboard_Inv_Hyp Keyboard is in inverse hyperbolic mode Keyboard_Alpha Keyboard is in alpha mode Keyboard_Inv_Alpha Keyboard is in inverse alpha modestatic intKeyboard_Inv_HypKeyboard is in inverse hyperbolic mode Keyboard_Normal Keyboard is in normal mode Keyboard_Inv Keyboard is in inverse mode Keyboard_Hyp Keyboard is in hyperbolic mode Keyboard_Inv_Hyp Keyboard is in inverse hyperbolic mode Keyboard_Alpha Keyboard is in alpha mode Keyboard_Inv_Alpha Keyboard is in inverse alpha modestatic intKeyboard_NormalKeyboard is in normal mode Keyboard_Normal Keyboard is in normal mode Keyboard_Inv Keyboard is in inverse mode Keyboard_Hyp Keyboard is in hyperbolic mode Keyboard_Inv_Hyp Keyboard is in inverse hyperbolic mode Keyboard_Alpha Keyboard is in alpha mode Keyboard_Inv_Alpha Keyboard is in inverse alpha modeprivate L_Register[]LThe L-Register are used for general calculations.static StringL_CHANGEDThe L or A register where changed.static intL_Count(package private) intL_UsedAmount of L Register usedstatic intL_XL [0] is also the X register.static intL_YL [1] is also the Y register.(package private) intLast_OperationLast operation choosen by user - used for the K option.private static LoggerLoggerClass logger instance.private Number[]MThe M-Register are used for general data storage.static StringM_CHANGEDAn M or MF register has changed.(package private) intM_nM [9] is also the statistical register n.(package private) intM_SxM [8] is also the statistical register Σx.(package private) intM_Sx2M [7] is also the statistical register Σx².(package private) @Nullable KeyboardMerge_KeyKey Operations which currently merged to a Calculator operation.private IProgrammable_OperationMerge_TokenMulti Keystroke Operation like Alpha, Degree, Eng, Save, Load in progress@NotNull IProgrammable_Operation @NotNull []Merged_OperationsOperations as they executed by the calculator.private Number[]MFThe MF-Register are used for special data storage.(package private) static intNull_ReturnThe memory from 1000 .. 1022 is used internally. 1023 is reserved as stop marker - which is also used as a null value on the program and hlt stack.private static short[]Off_TextText to display when ( is pressedprivate static short[]Parenthesis_TextText to display when ( is pressed(package private) intPause_Repeatprivate intProgram_CounterCurrent Program counter .(package private) int @NotNull []Program_StackProgram stack used for GSB commands .private intProgram_Stack_PointerProgram stack poiunter used for GSB commands .private intProgram_StoreWhere to store the next merged operations.private PropertyChangeSupportpropertyChangeSupportHandle property changes.(package private) booleanRealistic_SpeedRun calculator with realistic speed - just about as fast as the original.static short[]Running_TextText to display when ( is pressedprivate net.sourceforge.uiq3.calculator.IServiceServiceCanvas class where we display our result or get our keycodesstatic intStack_Countdeeps of the program stack.static StringSTATUS_CHANGEDProgram or program counter where changes where changed.static StringSTEP_CHANGEDProgram or program counter where changes where changed.(package private) short @NotNull []StepsCalculator Program Memorystatic intSteps_CountAmount of Steps.private static StringTAGClass logger tag.private Calculator.Token_Plane_TypeToken_PlaneActive plane: 0: Keyboard_Normal 1: Memory + 20, Fix instead of RND 2; Memory + 40 3: Memory + 60 4: Memory + 80(package private) static intUser_Steps_HighThe memory from 0 .. 998 (999 steps) is available to user programs. 999 is reserved as stop marker(package private) static intUser_Steps_LowThe memory from 0 .. 998 (999 steps) is available for user programs.
-
Constructor Summary
Constructors Constructor Description Calculator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description A_RegisterA(net.sourceforge.uiq3.calculator.ICalculator.AlphaRegisterType Index)net.sourceforge.uiq3.calculator.ICalculator.AlphaRegisterTypeA_Active()Active A register for row.voidA_Active(net.sourceforge.uiq3.calculator.ICalculator.AlphaRegisterType A)Active A register for row.private voidAdd_Debug_Info(int Position, short[] Text)Add debug info.private voidAdd_Steps(int Steps, short[] Text)Add step count to text fieldvoidaddPropertyChangeListener(@NotNull String propertyName, PropertyChangeListener listener)Add a PropertyChangeListener for a specific property.voidaddPropertyChangeListener(PropertyChangeListener listener)Add a PropertyChangeListener to the listener list.private voidARegister_Display_Value_Changed(PropertyChangeEvent event)voidClear(boolean AC)Clean Calculator(package private) voidDecrement_Program_Store()Decrement where to store the next merged operations.voidDisplay_A(net.sourceforge.uiq3.calculator.ICalculator.AlphaRegisterType Register_Number)Display A registervoidDisplay_Error(short @NotNull [] Text)Display an error message until C or AC is pressed.(package private) voidDisplay_Fatal(short @NotNull [] Text)Display an error message until C or AC is pressed.(package private) voidDisplay_Program()Display program overviewvoidDisplay_Program_Overview()Display program overviewvoidDisplay_Steps()Display Program StepsvoiddisplayClear()Clear all alpha register.voiddisplayFormatted(short @NotNull [] text)Display value as formatted textvoiddisplayKey(short @NotNull [] text)* Display Key merge info.voiddisplayL()Reset current value DisplayvoiddisplayMessage(short @NotNull [] text)Display text as messageprivate voidError_Reset()Brings the calculator into a defined state after an error condition.private voidExecute_Mode_Pcl()Handles the program clear, save and load.(package private) voidExecute_Mode_Run()Handles running the calculatorprivate voidExecute_Mode_Wrt()Handles the programm editingTapeFA2()A simulated cassette Printer(package private) voidforceIO(boolean resetKeyTime)Force IO Handling next round.voidForm(net.sourceforge.uiq3.ui.ICalculatorCanvas Form)Set Canvas to display result read keyboardPrinterFP10()A simulated cassette Printer(package private) voidFree_Steps(short[] Text)Add total amount of free steps to text;(package private) booleanGet_Alpha_Mode()Checks if the calculator is in Alpha mode by checking merged operation (when execution programms the alpha indicator is not set).(package private) shortGet_Current_Program()private short @NotNull []Get_Program_Text(boolean For_Debug)Display Program Stepsnet.sourceforge.uiq3.calculator.ICalculator.DisplayTypegetDisplayMode()Current display mode Display_Alpha Displays the content of the Alpha register. Display_L Displays the content of the L0 aka X register. Display_Formatted Displays the content of the L0 aka X register inside an alphaintgetExecutionMode()Execution modeintgetLastStep()locate the last step to display the free steps or for debugging.intgetStackPointer()return current stack pointerNumberHalf_Circle()convert an angle to Deg/Rad/GradvoidHalf_Circle(Number Half_Circle)convert an angle to Deg/Rad/Grad(package private) voidHandle_IO()Display result and read keyboardprivate short[]Handle_IO_HLT(short[] text)Handles I/O for HLT and PAUSE modeprivate voidHandle_IO_Mode_Pcl()Handles the IO in program-clear modeprivate voidHandle_IO_Mode_Wrt()Handles I/O for program-write modeintHlt_Position()Return Position for HLT Mode.(package private) voidHlt_Position(int Hlt_Position)Return Position for HLT Mode.(package private) voidIncrement_Hlt_Position()Increment Current Program counter.(package private) voidIncrement_Program_Counter()Increment Current Program counter.(package private) voidIncrement_Program_Store()Increment where to store the next merged operations.voidInit_A()Clears A-registervoidInit_Keycodes()Clears internal MemoryvoidInit_L()Clears L-registervoidInit_M()Clears M-register.voidInit_MF()Clears MF-register.voidInit_Opcodes()Sets the opcodes.(package private) voidInit_Program_Stack()init the GSB stackvoidInit_Steps()Clears Program StepsbooleanIs_Alpha(int Step_Nr)check if Step "Nr" is an Alpha characterbooleanIs_Alpha_Mode()Alpha Mode?booleanIs_Constant_Mode()Current modeprivate booleanIs_Executing_Program()checks if we are running a program(package private) booleanIs_HLT_Pause(int Step_Nr)check if Step "Nr" is an Alpha character(package private) booleanIs_Program_Stack_Empty()Program stack used for GSB commands .(package private) booleanIs_Program_Stack_Full()Program stack used for GSB commands .booleanIs_Shutdown()Calculator is not running - needed for end program.booleanisIndirect()booleanisRunning()Calculator is running - needed for power saving.booleanisWaiting()is waiting in interactive mode for user input.intKeyboard_Mode()Get current Keyboard mode(package private) voidKeyboard_Mode(int Keyboard_Mode)set input modeL_RegisterL(int Nr)The M-Register are used for general data storage.voidload(@NotNull String filename)Load the current status of the system(package private) voidLoad_Status()Load the current status of the systemNumberM(int Register)The M-Register are used for general data storage.voidM(int Register, Number M)The M-Register are used for general data storage.intM_Length()The M-Register are used for general data storage.@Nullable KeyboardMerge_Key()Key Operations which currently merged to a Calculator operation.(package private) voidMerge_Key(@Nullable Keyboard Merge_Key)Key Operations which currently merged to a Calculator operation.IProgrammable_OperationMerge_Token()Multi Keystroke Operation like Alpha, Degree, Eng, Save, Load in progress(package private) voidMerge_Token(IProgrammable_Operation Merge_Token)Multi Keystroke Operation like Alpha, Degree, Eng, Save, Load in progressNumberMF(int Register)The M-Register are used for general data storage.voidMF(int Register, Number MF)The M-Register are used for general data storage.intMF_Length()The M-Register are used for general data storage.(package private) voidPop_L()Pop values from stack by triggering an calculation run up the the level Operation(package private) voidPop_L(int Operation)Pop values from stack by triggering an calculation run up the the level Operation(package private) intPop_Program_Stack()Program stack used for GSB commands .intProgram_Counter()Get current Program counter.(package private) shortProgram_Position(short Program_Token)Return step-postion of given programintProgram_Store()get where to store the next merged operations.private voidPush_L()Push stack one down.(package private) voidPush_L(int Operation)Push value and given operation to stack. depending on what operation is used this might also trigger a calculation run.(package private) voidPush_Program_Stack(int Program_Counter)Program stack used for GSB commands .(package private) voidRead_Display(boolean Is_X_Register)Read Steps from Simulated Cassette interface.(package private) voidRead_M()Read M register from file(package private) voidRead_Steps()Read Steps from Simulated Cassette interface.voidremovePropertyChangeListener(@NotNull String propertyName, PropertyChangeListener listener)Remove a PropertyChangeListener for a specific property.voidremovePropertyChangeListener(PropertyChangeListener listener)Remove a PropertyChangeListener from the listener list.voidreset()Total Reset calculator.(package private) voidResize_M(int New_Size)Set new size for M-register.(package private) voidResize_MF(int New_Size)Set new size for F-register.voidrun()Start Calculator(package private) voidSave_Status()Save the current status of the systemvoidService(net.sourceforge.uiq3.calculator.IService Service)Set Canvas to display result read keyboard(package private) voidSet_Alpha_Mode(boolean Alpha_Mode)Checks if the calculator is in Alpha mode by checking merged operation (when execution programms the alpha indicator is not set).voidSet_Constant_Mode(boolean Constant_Mode)Current mode(package private) voidSet_Current_Program()Set Current program to program at program counter(package private) voidSet_Current_Program(short Current_Program)(package private) voidSet_Program_Counter(int Program_Counter)Set Current Program counter.(package private) voidSet_Program_Store(int Program_Store)Set where to store the next merged operations.voidsetDisplayMode(net.sourceforge.uiq3.calculator.ICalculator.DisplayType displayMode)Current display mode Display_Alpha Displays the content of the Alpha register. Display_L Displays the content of the L0 aka X register. Display_Formated Displays the content of the L0 aka X register inside an alpha(package private) voidsetExecutionMode(int Execution_Mode)Set new Execution modevoidsetIndirect(boolean indirect)shortSteps(int Step)Calculator Program MemoryvoidSteps(int Step, short Value)Calculator Program Memoryvoidstop()Stop virtual CPU and the thread it runs in(package private) voidStop_Execute()Stop calculator executing an reset interactive mode.(package private) voidStore_Operation(short Operation)Store an operation at into calculator memoryshort @Nullable []Text_To_Display()Text to be displayed.Calculator.Token_Plane_TypeToken_Plane()Active plane: 0: Keyboard_Normal 1: Memory + 20, Fix instead of RND 2; Memory + 40 3: Memory + 60 4: Memory + 80(package private) voidToken_Plane(Calculator.Token_Plane_Type Token_Plane)Active plane: 0: Keyboard_Normal 1: Memory + 20, Fix instead of RND 2; Memory + 40 3: Memory + 60 4: Memory + 80@NotNull StringtoString()(package private) voidWrite_M()Writes memory register to simulated cassette interface.(package private) voidWrite_Steps()Writes program steps to simulated cassette interface.(package private) booleanWrt_Is_Alpha(boolean For_Debug)check if - in wrt mode - we are currently in alpha mode.
-
-
-
Field Detail
-
IO_Speed
private static final int IO_Speed
defines how many steps are executed before the display is updated. Higher values speed up the calculator.
- See Also:
- Constant Field Values
-
STATUS_CHANGED
public static final String STATUS_CHANGED
Program or program counter where changes where changed. This flag is used by the debug calculator to notify debug panels.- See Also:
- Constant Field Values
-
STEP_CHANGED
public static final String STEP_CHANGED
Program or program counter where changes where changed. This flag is used by the debug calculator to notify debug panels.- See Also:
- Constant Field Values
-
M_CHANGED
public static final String M_CHANGED
An M or MF register has changed. This flag is used by the debug calculator to notify debug- See Also:
- Constant Field Values
-
L_CHANGED
public static final String L_CHANGED
The L or A register where changed. This flag is used by the debug calculator to notify debug panels.- See Also:
- Constant Field Values
-
Display_Alpha
static final int Display_Alpha
The Display currently displays the content of an Alpha register.- Display_Alpha
- Displays the content of an Alpha register.
- Display_L
- Displays the content of the L0 aka X register.
- Display_Formated
- Displays the content of the L0 aka X register inside an alpha register.
- See Also:
- Constant Field Values
-
Logger
private static final Logger Logger
Class logger instance.
-
Off_Text
private static final short[] Off_Text
Text to display when ( is pressed
-
Parenthesis_Text
private static final short[] Parenthesis_Text
Text to display when ( is pressed
-
TAG
private static final String TAG
Class logger tag.
-
Execution_Alpha_Pause
static final int Execution_Alpha_Pause
Calculator debugging a program.- Execution_Interactiv
- Calculator is used interactively.
- Execution_Running
- Calculator running a program.
- Execution_Halt
- Calculator debugging a program.
- Execution_Pause
- Calculator pauses for a sec.
- Execution_1_Step
- Do a single step and return to Execution_Halt.
- Execution_Write
- Calcluator is in write programm mode.
- Execution_Clear
- Calcluator is in clear memory mode.
- Execution_Alpha_Pause
- Initial pause when alpha starts scrolling.
- See Also:
- Constant Field Values
-
Execution_Clear
static final int Execution_Clear
Execution Mode.- Execution_Interactiv
- Calculator is used interactively.
- Execution_Running
- Calculator running a program.
- Execution_Halt
- Calculator debugging a program.
- Execution_Pause
- Calculator pauses for a sec.
- Execution_1_Step
- Do a single step and return to Execution_Halt.
- Execution_Write
- Calcluator is in write program mode.
- Execution_Clear
- Calcluator is in clear memory mode.
- Execution_Alpha_Pause
- Initial pause when alpha starts scrolling.
- See Also:
- Constant Field Values
-
Execution_Error
static final String Execution_Error
Error Message displayed on using the wrong execution mode!- See Also:
- Constant Field Values
-
Execution_Halt
static final int Execution_Halt
Calculator debugging a program.- Execution_Interactiv
- Calculator is used interactively.
- Execution_Running
- Calculator running a program.
- Execution_Halt
- Calculator debugging a program.
- Execution_Pause
- Calculator pauses for a sec.
- Execution_1_Step
- Do a single step and return to Execution_Halt.
- Execution_Write
- Calcluator is in write programm mode.
- Execution_Clear
- Calcluator is in clear memory mode.
- Execution_Alpha_Pause
- Initial pause when alpha starts scrolling.
- See Also:
- Constant Field Values
-
Execution_One_Step
static final int Execution_One_Step
Do a single step and return to Execution_Halt.- Execution_Interactiv
- Calculator is used interactively.
- Execution_Running
- Calculator running a program.
- Execution_Halt
- Calculator debugging a program.
- Execution_Pause
- Calculator pauses for a sec.
- Execution_1_Step
- Do a single step and return to Execution_Halt.
- Execution_Write
- Calcluator is in write programm mode.
- Execution_Clear
- Calcluator is in clear memory mode.
- Execution_Alpha_Pause
- Initial pause when alpha starts scrolling.
- See Also:
- Constant Field Values
-
Execution_Pause
static final int Execution_Pause
final Calculator debugging a program.- Execution_Interactiv
- Calculator is used interactively.
- Execution_Running
- Calculator running a program.
- Execution_Halt
- Calculator debugging a program.
- Execution_Pause
- Calculator pauses for a sec.
- Execution_1_Step
- Do a single step and return to Execution_Halt.
- Execution_Write
- Calcluator is in write programm mode.
- Execution_Clear
- Calcluator is in clear memory mode.
- Execution_Alpha_Pause
- Initial pause when alpha starts scrolling.
- See Also:
- Constant Field Values
-
Execution_Running
static final int Execution_Running
Calculator running a program.- Execution_Interactiv
- Calculator is used interactively.
- Execution_Running
- Calculator running a program.
- Execution_Halt
- Calculator debugging a program.
- Execution_Pause
- Calculator pauses for a sec.
- Execution_1_Step
- Do a single step and return to Execution_Halt.
- Execution_Write
- Calcluator is in write programm mode.
- Execution_Clear
- Calcluator is in clear memory mode.
- Execution_Alpha_Pause
- Initial pause when alpha starts scrolling.
- See Also:
- Constant Field Values
-
Execution_Write
static final int Execution_Write
Execution Mode.- Execution_Interactiv
- Calculator is used interactively.
- Execution_Running
- Calculator running a program.
- Execution_Halt
- Calculator debugging a program.
- Execution_Pause
- Calculator pauses for a sec.
- Execution_1_Step
- Do a single step and return to Execution_Halt.
- Execution_Write
- Calcluator is in write programm mode.
- Execution_Clear
- Calcluator is in clear memory mode.
- Execution_Alpha_Pause
- Initial pause when alpha starts scrolling.
- See Also:
- Constant Field Values
-
Internal_Steps_High
static final int Internal_Steps_High
The memory from 1000 .. 1022 is used internally. 1023 is reserved as stop marker.- See Also:
- Constant Field Values
-
Internal_Steps_Low
static final int Internal_Steps_Low
The memory from 1000 .. 1023 is used internally.- See Also:
- Constant Field Values
-
Keyboard_Error
static final String Keyboard_Error
Error Message displayed on using the wrong keyboard mode!- See Also:
- Constant Field Values
-
Null_Return
static final int Null_Return
The memory from 1000 .. 1022 is used internally. 1023 is reserved as stop marker - which is also used as a null value on the program and hlt stack.- See Also:
- Constant Field Values
-
User_Steps_High
static final int User_Steps_High
The memory from 0 .. 998 (999 steps) is available to user programs. 999 is reserved as stop marker
-
User_Steps_Low
static final int User_Steps_Low
The memory from 0 .. 998 (999 steps) is available for user programs.
-
A_Size
public static final int A_Size
- See Also:
- Constant Field Values
-
Display_Error
public static final String Display_Error
Error Message displayed on using the wrong display mode!- See Also:
- Constant Field Values
-
Execution_Interactive
public static final int Execution_Interactive
Calculator is used interactively.- Execution_Interactiv
- Calculator is used interactively.
- Execution_Running
- Calculator running a program.
- Execution_Halt
- Calculator debugging a program.
- Execution_Pause
- Calculator pauses for a sec.
- Execution_1_Step
- Do a single step and return to Execution_Halt.
- Execution_Write
- Calcluator is in write programm mode.
- Execution_Clear
- Calcluator is in clear memory mode.
- Execution_Alpha_Pause
- Initial pause when alpha starts scrolling.
- See Also:
- Constant Field Values
-
Indicator_Alpha
public static final int Indicator_Alpha
Keyboard Mode Alpha:- Inv
- Keyboard in inverse move
- Hyp
- Keyboard in hyperbolic mode - also used for password entry
- K
- Constant calculation mode
- Hlt
- halted programm - also used for debugger
- Run
- Mode1, interactive or program run mode
- Wrt
- Mode2, write programms
- Pcl
- Mode3, clear, save, load programs.
- Deg
- Mode4, Tr
- Rad
- Mode5
- Gra
- Mode6
- Keyboard_Alpha
- Alpha entry and display mofe
-
The mode show that the Alpha Keyboard mode is active. The indicator also blinks twice in
that 2 sec pause when displaying an string > 11 characters.
- See Also:
- Constant Field Values
-
Indicator_Count
public static final int Indicator_Count
Indicator count:- Inv
- Keyboard in inverse move
- Hyp
- Keyboard in hyperbolic mode - also used for password entry
- K
- Constant calculation mode
- Hlt
- halted programm - also used for debugger
- Run
- Mode1, interactive or program run mode
- Wrt
- Mode 2, write programms
- Pcl
- Mode 3, clear, save, load programs.
- Deg
- Mode 4, Tr
- Rad
- Mode 5
- Gra
- Mode 6
- Keyboard_Alpha
- Alpha entry and display mofe
- See Also:
- Constant Field Values
-
Indicator_Deg
public static final int Indicator_Deg
Trigonometric functions in degrees (360° based)- Inv
- Keyboard in inverse move
- Hyp
- Keyboard in hyperbolic mode - also used for password entry
- K
- Constant calculation mode
- Hlt
- halted programm - also used for debugger
- Run
- Mode1, interactive or program run mode
- Wrt
- Mode2, write programms
- Pcl
- Mode3, clear, save, load programs.
- Deg
- Mode4, Tr
- Rad
- Mode5
- Gra
- Mode6
- Keyboard_Alpha
- Alpha entry and display mofe
- See Also:
- Constant Field Values
-
Indicator_Gra
public static final int Indicator_Gra
Trigonometric functions in gradians (400 based)- Inv
- Keyboard in inverse move
- Hyp
- Keyboard in hyperbolic mode - also used for password entry
- K
- Constant calculation mode
- Hlt
- halted programm - also used for debugger
- Run
- Mode1, interactive or program run mode
- Wrt
- Mode2, write programms
- Pcl
- Mode3, clear, save, load programs.
- Deg
- Mode4, Tr
- Rad
- Mode5
- Gra
- Mode6
- Keyboard_Alpha
- Alpha entry and display mofe
- See Also:
- Constant Field Values
-
Indicator_Hlt
public static final int Indicator_Hlt
Program halt wait for user response- Inv
- Keyboard in inverse move
- Hyp
- Keyboard in hyperbolic mode - also used for password entry
- K
- Constant calculation mode
- Hlt
- halted programm - also used for debugger
- Run
- Mode1, interactive or program run mode
- Wrt
- Mode2, write programms
- Pcl
- Mode3, clear, save, load programs.
- Deg
- Mode4, Tr
- Rad
- Mode5
- Gra
- Mode6
- Keyboard_Alpha
- Alpha entry and display mofe
- See Also:
- Constant Field Values
-
Indicator_Hyp
public static final int Indicator_Hyp
Hyperbolic function active. Also used for Password entry.- Inv
- Keyboard in inverse move
- Hyp
- Keyboard in hyperbolic mode - also used for password entry
- K
- Constant calculation mode
- Hlt
- halted programm - also used for debugger
- Run
- Mode1, interactive or program run mode
- Wrt
- Mode2, write programms
- Pcl
- Mode3, clear, save, load programs.
- Deg
- Mode4, Tr
- Rad
- Mode5
- Gra
- Mode6
- Keyboard_Alpha
- Alpha entry and display mofe
- See Also:
- Constant Field Values
-
Indicator_Inv
public static final int Indicator_Inv
Inverse functions active.- Inv
- Keyboard in inverse move
- Hyp
- Keyboard in hyperbolic mode - also used for password entry
- K
- Constant calculation mode
- Hlt
- halted programm - also used for debugger
- Run
- Mode1, interactive or program run mode
- Wrt
- Mode2, write programms
- Pcl
- Mode3, clear, save, load programs.
- Deg
- Mode4, Tr
- Rad
- Mode5
- Gra
- Mode6
- Keyboard_Alpha
- Alpha entry and display mofe
- See Also:
- Constant Field Values
-
Indicator_K
public static final int Indicator_K
Arithmetic with constants.- Inv
- Keyboard in inverse move
- Hyp
- Keyboard in hyperbolic mode - also used for password entry
- K
- Constant calculation mode
- Hlt
- halted programm - also used for debugger
- Run
- Mode1, interactive or program run mode
- Wrt
- Mode2, write programms
- Pcl
- Mode3, clear, save, load programs.
- Deg
- Mode4, Tr
- Rad
- Mode5
- Gra
- Mode6
- Keyboard_Alpha
- Alpha entry and display mofe
- See Also:
- Constant Field Values
-
Indicator_Pcl
public static final int Indicator_Pcl
Clear program and memory. Also used for save and load.- Inv
- Keyboard in inverse move
- Hyp
- Keyboard in hyperbolic mode - also used for password entry
- K
- Constant calculation mode
- Hlt
- halted programm - also used for debugger
- Run
- Mode1, interactive or program run mode
- Wrt
- Mode2, write programms
- Pcl
- Mode3, clear, save, load programs.
- Deg
- Mode4, Tr
- Rad
- Mode5
- Gra
- Mode6
- Keyboard_Alpha
- Alpha entry and display mofe
- See Also:
- Constant Field Values
-
Indicator_Rad
public static final int Indicator_Rad
Trigonometric functions in radians (2π based)- Inv
- Keyboard in inverse move
- Hyp
- Keyboard in hyperbolic mode - also used for password entry
- K
- Constant calculation mode
- Hlt
- halted programm - also used for debugger
- Run
- Mode1, interactive or program run mode
- Wrt
- Mode2, write programms
- Pcl
- Mode3, clear, save, load programs.
- Deg
- Mode4, Tr
- Rad
- Mode5
- Gra
- Mode6
- Keyboard_Alpha
- Alpha entry and display mofe
- See Also:
- Constant Field Values
-
Indicator_Run
public static final int Indicator_Run
Run and calculation mode.- Inv
- Keyboard in inverse move
- Hyp
- Keyboard in hyperbolic mode - also used for password entry
- K
- Constant calculation mode
- Hlt
- halted programm - also used for debugger
- Run
- Mode1, interactive or program run mode
- Wrt
- Mode2, write programms
- Pcl
- Mode3, clear, save, load programs.
- Deg
- Mode4, Tr
- Rad
- Mode5
- Gra
- Mode6
- Keyboard_Alpha
- Alpha entry and display mofe
- See Also:
- Constant Field Values
-
Indicator_Wrt
public static final int Indicator_Wrt
Write Programs- Inv
- Keyboard in inverse move
- Hyp
- Keyboard in hyperbolic mode - also used for password entry
- K
- Constant calculation mode
- Hlt
- halted programm - also used for debugger
- Run
- Mode1, interactive or program run mode
- Wrt
- Mode2, write programms
- Pcl
- Mode3, clear, save, load programs.
- Deg
- Mode4, Tr
- Rad
- Mode5
- Gra
- Mode6
- Keyboard_Alpha
- Alpha entry and display mofe
- See Also:
- Constant Field Values
-
Keyboard_Alpha
public static final int Keyboard_Alpha
Keyboard is in alpha mode- Keyboard_Normal
- Keyboard is in normal mode
- Keyboard_Inv
- Keyboard is in inverse mode
- Keyboard_Hyp
- Keyboard is in hyperbolic mode
- Keyboard_Inv_Hyp
- Keyboard is in inverse hyperbolic mode
- Keyboard_Alpha
- Keyboard is in alpha mode
- Keyboard_Inv_Alpha
- Keyboard is in inverse alpha mode
- See Also:
- Constant Field Values
-
Keyboard_Hyp
public static final int Keyboard_Hyp
Keyboard is in hyperbolic mode- Keyboard_Normal
- Keyboard is in normal mode
- Keyboard_Inv
- Keyboard is in inverse mode
- Keyboard_Hyp
- Keyboard is in hyperbolic mode
- Keyboard_Inv_Hyp
- Keyboard is in inverse hyperbolic mode
- Keyboard_Alpha
- Keyboard is in alpha mode
- Keyboard_Inv_Alpha
- Keyboard is in inverse alpha mode
- See Also:
- Constant Field Values
-
Keyboard_Inv
public static final int Keyboard_Inv
Keyboard is in inverse mode- Keyboard_Normal
- Keyboard is in normal mode
- Keyboard_Inv
- Keyboard is in inverse mode
- Keyboard_Hyp
- Keyboard is in hyperbolic mode
- Keyboard_Inv_Hyp
- Keyboard is in inverse hyperbolic mode
- Keyboard_Alpha
- Keyboard is in alpha mode
- Keyboard_Inv_Alpha
- Keyboard is in inverse alpha mode
- See Also:
- Constant Field Values
-
Keyboard_Inv_Alpha
public static final int Keyboard_Inv_Alpha
Keyboard is in inverse alpha mode- Keyboard_Normal
- Keyboard is in normal mode
- Keyboard_Inv
- Keyboard is in inverse mode
- Keyboard_Hyp
- Keyboard is in hyperbolic mode
- Keyboard_Inv_Hyp
- Keyboard is in inverse hyperbolic mode
- Keyboard_Alpha
- Keyboard is in alpha mode
- Keyboard_Inv_Alpha
- Keyboard is in inverse alpha mode
- See Also:
- Constant Field Values
-
Keyboard_Inv_Hyp
public static final int Keyboard_Inv_Hyp
Keyboard is in inverse hyperbolic mode- Keyboard_Normal
- Keyboard is in normal mode
- Keyboard_Inv
- Keyboard is in inverse mode
- Keyboard_Hyp
- Keyboard is in hyperbolic mode
- Keyboard_Inv_Hyp
- Keyboard is in inverse hyperbolic mode
- Keyboard_Alpha
- Keyboard is in alpha mode
- Keyboard_Inv_Alpha
- Keyboard is in inverse alpha mode
- See Also:
- Constant Field Values
-
Keyboard_Normal
public static final int Keyboard_Normal
Keyboard is in normal mode- Keyboard_Normal
- Keyboard is in normal mode
- Keyboard_Inv
- Keyboard is in inverse mode
- Keyboard_Hyp
- Keyboard is in hyperbolic mode
- Keyboard_Inv_Hyp
- Keyboard is in inverse hyperbolic mode
- Keyboard_Alpha
- Keyboard is in alpha mode
- Keyboard_Inv_Alpha
- Keyboard is in inverse alpha mode
- See Also:
- Constant Field Values
-
L_Count
public static final int L_Count
- See Also:
- Constant Field Values
-
L_X
public static final int L_X
L [0] is also the X register.- See Also:
- Constant Field Values
-
L_Y
public static final int L_Y
L [1] is also the Y register.- See Also:
- Constant Field Values
-
Running_Text
public static final short[] Running_Text
Text to display when ( is pressed
-
Steps_Count
public static final int Steps_Count
Amount of Steps.
-
Indicators
private final boolean @NotNull [] Indicators
Indicators:- Inv
- Keyboard in inverse move
- Hyp
- Keyboard in hyperbolic mode - also used for password entry
- K
- Constant calculation mode
- Hlt
- halted programm - also used for debugger
- Run
- Mode1, interactive or program run mode
- Wrt
- Mode2, write programms
- Pcl
- Mode3, clear, save, load programs.
- Deg
- Mode4, Tr
- Rad
- Mode5
- Gra
- Mode6
- Keyboard_Alpha
- Alpha entry and display mofe
-
M_Sx
final int M_Sx
M [8] is also the statistical register Σx.- See Also:
- Constant Field Values
-
M_Sx2
final int M_Sx2
M [7] is also the statistical register Σx².- See Also:
- Constant Field Values
-
M_n
final int M_n
M [9] is also the statistical register n.- See Also:
- Constant Field Values
-
Realistic_Speed
final boolean Realistic_Speed
Run calculator with realistic speed - just about as fast as the original.
-
Steps
final short @NotNull [] Steps
Calculator Program Memory
-
A
@NotNull private @NotNull A_Register @NotNull [] A
The A Register contains the Keyboard_Alpha data of the display. There are two of them - one for input and one for temporary messages.
-
A_Active
private net.sourceforge.uiq3.calculator.ICalculator.AlphaRegisterType A_Active
Active A register.- A_Numeric
- Alpha register to enter and display numeric results.
- A_Text
- Alpha register to enter and display textual results.
- A_Message
- Alpha register to display messages.
- A_Key
- Alpha register to merge key operations.
-
Calculator_Running
private volatile boolean Calculator_Running
Calculator is running - needed for power saving. If you are wondering why there is a Calculator_Running and and a Calculator_Shutdown - there is that little time between the calculator stop running and being full shutdown.
-
Calculator_Shutdown
private volatile boolean Calculator_Shutdown
Calculator is not running - needed for end program. If you are wondering why there is a Calculator_Running and and a Calculator_Shutdown - there is that little time between the calculator stop running and being full shutdown
-
Current_Program
private short Current_Program
Current Current_Program
-
Display_Mode
private net.sourceforge.uiq3.calculator.ICalculator.DisplayType Display_Mode
Current display mode- Display_Alpha
- Displays the content of the Alpha register.
- Display_L
- Displays the content of the L0 aka X register.
- Display_Formatted
- Displays the content of the L0 aka X register inside an alpha
-
Execution_Mode
private int Execution_Mode
Current Execution mode.- Execution_Interactive
- Calculator is used interactively.
- Execution_Running
- Calculator running a program.
- Execution_Halt
- Calculator debugging a program.
- Execution_Pause
- Calculator pauses for a sec.
- Execution_1_Step
- Do a single step and return to Execution_Halt.
- Calcluator is in write programm mode.
- Execution_Clear
- Calcluator is in clear memory mode.
- Execution_Alpha_Pause
- Initial pause when alpha starts scrolling.
-
Hlt_Position
private int Hlt_Position
Return Position for HLT Mode.
-
IO_Count
private int IO_Count
Number of virtual CPU cycles until next IO run.
-
Key_Buffer
private int Key_Buffer
last key pressed
-
Key_Flag
private boolean Key_Flag
a key was pressed
-
Key_Operations
private Keyboard[] Key_Operations
Operations as they come from the keyboard.
-
Key_Time
private long Key_Time
System time when last Key was clicked.
-
L
private L_Register[] L
The L-Register are used for general calculations. There is a total of 12 register. L0 is also called X L1 is also called Y
-
M
private Number[] M
The M-Register are used for general data storage.
-
MF
private Number[] MF
The MF-Register are used for special data storage.
-
Merge_Token
@Nullable private IProgrammable_Operation Merge_Token
Multi Keystroke Operation like Alpha, Degree, Eng, Save, Load in progress
-
Program_Counter
private int Program_Counter
Current Program counter .
-
Program_Stack_Pointer
private int Program_Stack_Pointer
Program stack poiunter used for GSB commands .
-
Program_Store
private int Program_Store
Where to store the next merged operations.
-
Service
@Nullable private net.sourceforge.uiq3.calculator.IService Service
Canvas class where we display our result or get our keycodes
-
Token_Plane
private Calculator.Token_Plane_Type Token_Plane
Active plane:- 0: Keyboard_Normal
- 1: Memory + 20, Fix instead of RND
- 2; Memory + 40
- 3: Memory + 60
- 4: Memory + 80
-
Display_Enable
boolean Display_Enable
Display enable - used to switch off the display so that intermediate result are not shown to the user.
-
FA2
@Nullable Tape FA2
A simulated cassette Printer
-
FP10
@Nullable Printer FP10
A simulated Printer Printer
-
Form
@Nullable net.sourceforge.uiq3.ui.ICalculatorCanvas Form
Canvas class where we display our result or get our keycodes
-
Ignore_Clear
boolean Ignore_Clear
The last operation was one of the operations (+-) which disable the clear key.
-
Indirect
private boolean Indirect
Currently indirect addressing is active
-
L_Used
int L_Used
Amount of L Register used
-
Last_Operation
int Last_Operation
Last operation choosen by user - used for the K option.
-
Merge_Key
@Nullable @Nullable Keyboard Merge_Key
Key Operations which currently merged to a Calculator operation.
-
Program_Stack
int @NotNull [] Program_Stack
Program stack used for GSB commands .
-
Stack_Count
public static final int Stack_Count
deeps of the program stack.
- See Also:
- Constant Field Values
-
Merged_Operations
@NotNull public @NotNull IProgrammable_Operation @NotNull [] Merged_Operations
Operations as they executed by the calculator.
The field in initialized in Init_Opcodes after which the array and all array elements will not be null.
-
propertyChangeSupport
private final PropertyChangeSupport propertyChangeSupport
Handle property changes. We don't use the full feature with oldValue and new newValue as that would be overkill.
-
Pause_Repeat
int Pause_Repeat
-
-
Method Detail
-
isIndirect
public boolean isIndirect()
-
setIndirect
public void setIndirect(boolean indirect)
-
addPropertyChangeListener
public void addPropertyChangeListener(@NotNull PropertyChangeListener listener)Add a PropertyChangeListener to the listener list. The listener is registered for all properties. The same listener object may be added more than once, and will be called as many times as it is added. Iflisteneris null, no exception is thrown and no action is taken.- Specified by:
addPropertyChangeListenerin interfacenet.sourceforge.uiq3.IPropertyNotifier- Parameters:
listener- The PropertyChangeListener to be added
-
addPropertyChangeListener
public void addPropertyChangeListener(@NotNull @NotNull String propertyName, @NotNull PropertyChangeListener listener)Add a PropertyChangeListener for a specific property. The listener will be invoked only when a call on firePropertyChange names that specific property. The same listener object may be added more than once. For each property, the listener will be invoked the number of times it was added for that property.- Specified by:
addPropertyChangeListenerin interfacenet.sourceforge.uiq3.IPropertyNotifier- Parameters:
propertyName- The name of the property to listen on.listener- The PropertyChangeListener to be added- Since:
- 1.2
-
removePropertyChangeListener
public void removePropertyChangeListener(@NotNull PropertyChangeListener listener)Remove a PropertyChangeListener from the listener list. This removes a PropertyChangeListener that was registered for all properties. Iflistenerwas added more than once to the same event source, it will be notified one less time after being removed. Iflisteneris null, or was never added, no exception is thrown and no action is taken.- Specified by:
removePropertyChangeListenerin interfacenet.sourceforge.uiq3.IPropertyNotifier- Parameters:
listener- The PropertyChangeListener to be removed
-
removePropertyChangeListener
public void removePropertyChangeListener(@NotNull @NotNull String propertyName, @NotNull PropertyChangeListener listener)Remove a PropertyChangeListener for a specific property. If `listener` was added more than once to the same event source for the specified property, it will be notified one less time after being removed.- Specified by:
removePropertyChangeListenerin interfacenet.sourceforge.uiq3.IPropertyNotifier- Parameters:
propertyName- The name of the property that was listened on.listener- The PropertyChangeListener to be removed- Since:
- 1.2
-
ARegister_Display_Value_Changed
private void ARegister_Display_Value_Changed(PropertyChangeEvent event)
-
A
public final A_Register A(net.sourceforge.uiq3.calculator.ICalculator.AlphaRegisterType Index)
-
A_Active
public net.sourceforge.uiq3.calculator.ICalculator.AlphaRegisterType A_Active()
Active A register for row. With Row 0- A_Numeric
- Alpha register to enter and display numeric results.
- A_Text
- Alpha register to enter and display textual results.
- A_Message
- Alpha register to display messages.
- A_Key
- Alpha register to merge key operations.
-
A_Active
public void A_Active(@NotNull net.sourceforge.uiq3.calculator.ICalculator.AlphaRegisterType A)Active A register for row. With Row 0- A_Numeric
- Alpha register to enter and display numeric results.
- A_Text
- Alpha register to enter and display textual results.
- A_Message
- Alpha register to display messages.
- A_Key
- Alpha register to merge key operations.
-
Add_Debug_Info
private void Add_Debug_Info(int Position, short[] Text)Add debug info. Either to an error message or a program listing in single step mode.
- Parameters:
Text- text to add the program info. first to and last three characters must be free
-
Add_Steps
private void Add_Steps(int Steps, short[] Text)Add step count to text field- Parameters:
Steps- Steps to add to exponentText- Text to add steps to
-
Clear
public void Clear(boolean AC)
Clean Calculator
- Specified by:
Clearin interfaceIClear- Parameters:
AC- true when AC (all clear) is requested.- See Also:
IClear.Clear(boolean)
-
Decrement_Program_Store
void Decrement_Program_Store()
Decrement where to store the next merged operations.
-
Display_A
public void Display_A(net.sourceforge.uiq3.calculator.ICalculator.AlphaRegisterType Register_Number)
Display A register- Parameters:
Register_Number- A-register to display
-
displayClear
public void displayClear()
Clear all alpha register. And just calling "Clear" is not enough.- Specified by:
displayClearin interfacenet.sourceforge.uiq3.calculator.ICalculator
-
Display_Error
public void Display_Error(short @NotNull [] Text)
Display an error message until C or AC is pressed.- Parameters:
Text- Test to be displayed
-
Display_Fatal
void Display_Fatal(short @NotNull [] Text)
Display an error message until C or AC is pressed.- Parameters:
Text- Test to be displayed
-
displayFormatted
public void displayFormatted(short @NotNull [] text)
Display value as formatted text- Specified by:
displayFormattedin interfacenet.sourceforge.uiq3.calculator.ICalculator- Parameters:
text- to be displayed
-
displayKey
public void displayKey(short @NotNull [] text)
* Display Key merge info.- Specified by:
displayKeyin interfacenet.sourceforge.uiq3.calculator.ICalculator- Parameters:
text- info to be displayed
-
displayL
public void displayL()
Reset current value Display- Specified by:
displayLin interfacenet.sourceforge.uiq3.calculator.ICalculator
-
displayMessage
public void displayMessage(short @NotNull [] text)
Display text as message- Specified by:
displayMessagein interfacenet.sourceforge.uiq3.calculator.ICalculator- Parameters:
text- to be displayed
-
getDisplayMode
@NotNull public net.sourceforge.uiq3.calculator.ICalculator.DisplayType getDisplayMode()
Current display mode- Display_Alpha
- Displays the content of the Alpha register.
- Display_L
- Displays the content of the L0 aka X register.
- Display_Formatted
- Displays the content of the L0 aka X register inside an alpha
- Specified by:
getDisplayModein interfacenet.sourceforge.uiq3.calculator.ICalculator- Returns:
- current new display mode
-
setDisplayMode
public void setDisplayMode(@NotNull net.sourceforge.uiq3.calculator.ICalculator.DisplayType displayMode)Current display mode- Display_Alpha
- Displays the content of the Alpha register.
- Display_L
- Displays the content of the L0 aka X register.
- Display_Formated
- Displays the content of the L0 aka X register inside an alpha
- Specified by:
setDisplayModein interfacenet.sourceforge.uiq3.calculator.ICalculator- Parameters:
displayMode- new display mode
-
Display_Program
final void Display_Program()
Display program overview
-
Display_Program_Overview
public void Display_Program_Overview()
Display program overview
-
Display_Steps
public void Display_Steps()
Display Program Steps
-
Error_Reset
private void Error_Reset()
Brings the calculator into a defined state after an error condition.
-
Execute_Mode_Pcl
private void Execute_Mode_Pcl() throws ErrorHandles the program clear, save and load.- Throws:
Error- General calculator error
-
Execute_Mode_Run
void Execute_Mode_Run() throws ErrorHandles running the calculator- Throws:
Error- an error occurred while executing
-
Execute_Mode_Wrt
private void Execute_Mode_Wrt()
Handles the programm editing
-
getExecutionMode
public int getExecutionMode()
Execution mode- Returns:
- Execution_Interactiv
- Calculator is used interactively.
- Execution_Running
- Calculator running a program.
- Execution_Halt
- Calculator debugging a program.
- Execution_Pause
- Calculator pauses for a sec.
- Execution_1_Step
- Do a single step and return to Execution_Halt.
- Execution_Write
- Calcluator is in write programm mode.
- Execution_Clear
- Calcluator is in clear memory mode.
- Execution_Alpha_Pause
- Initial pause when alpha starts scrolling.
-
setExecutionMode
void setExecutionMode(int Execution_Mode)
Set new Execution mode
- Execution_Interactiv
- Calculator is used interactively.
- Execution_Running
- Calculator running a program.
- Execution_Halt
- Calculator debugging a program.
- Execution_Pause
- Calculator pauses for a sec.
- Execution_1_Step
- Do a single step and return to Execution_Halt.
- Execution_Write
- Calcluator is in write programm mode.
- Execution_Clear
- Calcluator is in clear memory mode.
- Execution_Alpha_Pause
- Initial pause when alpha starts scrolling.
- Execution_Alpha_Step
- Pause between each character when alpha starts scrolling.
- Parameters:
Execution_Mode- new mode
-
FA2
@Nullable public final Tape FA2()
A simulated cassette Printer- Returns:
- FA-2 interface
-
FP10
@Nullable public final Printer FP10()
A simulated cassette Printer- Returns:
- FP-10 Printer
-
forceIO
void forceIO(boolean resetKeyTime)
Force IO Handling next round.- Parameters:
resetKeyTime- Reset keyboard as well.
-
Form
public void Form(net.sourceforge.uiq3.ui.ICalculatorCanvas Form)
Set Canvas to display result read keyboard- Parameters:
Form- Formular where calculator is displayed in
-
Free_Steps
final void Free_Steps(short[] Text)
Add total amount of free steps to text;- Parameters:
Text- Text to add the free steps to
-
Get_Alpha_Mode
boolean Get_Alpha_Mode()
Checks if the calculator is in Alpha mode by checking merged operation (when execution programms the alpha indicator is not set).- Returns:
- true when in Alpha mode.
-
Get_Current_Program
short Get_Current_Program()
- Returns:
- the current_Program
-
Get_Program_Text
private short @NotNull [] Get_Program_Text(boolean For_Debug)
Display Program Steps- Parameters:
For_Debug- Show active program as well- Returns:
- Debug Text
-
getStackPointer
public int getStackPointer()
return current stack pointer- Returns:
- stack pointer
-
Half_Circle
@NotNull public final Number Half_Circle()
convert an angle to Deg/Rad/Grad- Returns:
- angle in Deg/Rad/Grad.
-
Half_Circle
public final void Half_Circle(@NotNull Number Half_Circle)convert an angle to Deg/Rad/Grad- Parameters:
Half_Circle- new Half circle to use
-
Handle_IO
void Handle_IO()
Display result and read keyboard
-
Handle_IO_HLT
private short[] Handle_IO_HLT(short[] text)
Handles I/O for HLT and PAUSE mode
-
Handle_IO_Mode_Pcl
private void Handle_IO_Mode_Pcl()
Handles the IO in program-clear mode
-
Handle_IO_Mode_Wrt
private void Handle_IO_Mode_Wrt()
Handles I/O for program-write mode
-
Hlt_Position
public int Hlt_Position()
Return Position for HLT Mode.- Returns:
- current halt position
-
Hlt_Position
void Hlt_Position(int Hlt_Position)
Return Position for HLT Mode.- Parameters:
Hlt_Position- new halt position
-
Increment_Hlt_Position
void Increment_Hlt_Position()
Increment Current Program counter.
-
Increment_Program_Counter
void Increment_Program_Counter()
Increment Current Program counter.
-
Increment_Program_Store
void Increment_Program_Store()
Increment where to store the next merged operations.
-
Init_A
public void Init_A()
Clears A-register
-
Init_Keycodes
public void Init_Keycodes()
Clears internal Memory
-
Init_L
public void Init_L()
Clears L-register
-
Init_M
public void Init_M()
Clears M-register. The M-Register are used for general data storage.
-
Init_MF
public void Init_MF()
Clears MF-register. The MF-register are used for special data storage.
-
Init_Opcodes
public void Init_Opcodes()
Sets the opcodes.
Operations temporarily set to null will be set in the for loop at the end of the method. Once this method ends all array elements are not null
-
Init_Program_Stack
void Init_Program_Stack()
init the GSB stack
-
Init_Steps
public void Init_Steps()
Clears Program Steps
-
Is_Alpha
public boolean Is_Alpha(int Step_Nr)
check if Step "Nr" is an Alpha character- Parameters:
Step_Nr- Step to test- Returns:
- true if we are writing alpha characters
-
Is_Alpha_Mode
public boolean Is_Alpha_Mode()
Alpha Mode?- Returns:
- true when Alpha is aktiv
-
Is_Constant_Mode
public final boolean Is_Constant_Mode()
Current mode- Returns:
- current constant calculation mode
-
Is_Executing_Program
private boolean Is_Executing_Program()
checks if we are running a program- Returns:
- true wen a program is running
-
Is_HLT_Pause
boolean Is_HLT_Pause(int Step_Nr)
check if Step "Nr" is an Alpha character- Parameters:
Step_Nr- Step to test- Returns:
- true if we are writing alpha characters
-
Is_Program_Stack_Empty
boolean Is_Program_Stack_Empty()
Program stack used for GSB commands .- Returns:
- true when stack is empty
-
Is_Program_Stack_Full
boolean Is_Program_Stack_Full()
Program stack used for GSB commands .- Returns:
- true when stack us full
-
isRunning
public boolean isRunning()
Calculator is running - needed for power saving. If you are wondering why there is a Calculator_Running and and a Calculator_Shutdown - there is that little time between the calculator stop running and beeing full shutdown.- Specified by:
isRunningin interfacenet.sourceforge.uiq3.calculator.ICalculator- Returns:
- true when calculator is running
- See Also:
ICalculator.isRunning()
-
Is_Shutdown
@TestOnly public boolean Is_Shutdown()
Calculator is not running - needed for end program. If you are wondering why there is a Calculator_Running and and a Calculator_Shutdown - there is that little time between the calculator stop running and being fully shutdown.- Returns:
- when calculators is shut down
-
isWaiting
public boolean isWaiting()
is waiting in interactive mode for user input.- Specified by:
isWaitingin interfacenet.sourceforge.uiq3.calculator.ICalculator- Returns:
- true when in interactive mode.
-
Keyboard_Mode
public int Keyboard_Mode()
Get current Keyboard mode- Returns:
- Keyboard_Normal
- Keyboard is in normal mode
- Keyboard_Inv
- Keyboard is in inverse mode
- Keyboard_Hyp
- Keyboard is in hyperbolic mode
- Keyboard_Inv_Hyp
- Keyboard is in inverse hyperbolic mode
- Keyboard_Alpha
- Keyboard is in alpha mode
- Keyboard_Inv_Alpha
- Keyboard is in inverse alpha mode
-
Keyboard_Mode
void Keyboard_Mode(int Keyboard_Mode)
set input mode- Parameters:
Keyboard_Mode- new input mode
-
L
public final L_Register L(int Nr)
The M-Register are used for general data storage.
-
getLastStep
public int getLastStep()
locate the last step to display the free steps or for debugging.
- Specified by:
getLastStepin interfacenet.sourceforge.uiq3.calculator.ICalculator- Returns:
- last step
-
load
public void load(@NotNull @NotNull String filename)Load the current status of the system- Specified by:
loadin interfacenet.sourceforge.uiq3.calculator.ICalculator- Parameters:
filename- Filename to load data from
-
Load_Status
void Load_Status()
Load the current status of the system
-
M
@NotNull public Number M(int Register)
The M-Register are used for general data storage.
-
M
public final void M(int Register, @NotNull Number M)The M-Register are used for general data storage.- Parameters:
Register- register to getM- a single M register
-
MF
@NotNull public Number MF(int Register)
The M-Register are used for general data storage.
-
MF
public final void MF(int Register, @NotNull Number MF)The M-Register are used for general data storage.- Parameters:
Register- register to getMF- a single M register
-
MF_Length
public int MF_Length()
The M-Register are used for general data storage.
-
M_Length
public int M_Length()
The M-Register are used for general data storage.
-
Merge_Key
@Nullable public @Nullable Keyboard Merge_Key()
Key Operations which currently merged to a Calculator operation.- Returns:
- currend key merged
-
Merge_Key
void Merge_Key(@Nullable @Nullable Keyboard Merge_Key)Key Operations which currently merged to a Calculator operation.- Parameters:
Merge_Key- new key to merge
-
Merge_Token
@Nullable public IProgrammable_Operation Merge_Token()
Multi Keystroke Operation like Alpha, Degree, Eng, Save, Load in progress- Returns:
- current token merged
-
Merge_Token
void Merge_Token(@Nullable IProgrammable_Operation Merge_Token)Multi Keystroke Operation like Alpha, Degree, Eng, Save, Load in progress- Parameters:
Merge_Token- new token to merge
-
Pop_L
void Pop_L()
Pop values from stack by triggering an calculation run up the the level Operation
-
Pop_L
void Pop_L(int Operation) throws ErrorPop values from stack by triggering an calculation run up the the level Operation- Parameters:
Operation- last operation requested by user- Throws:
Error- stack exhausted
-
Pop_Program_Stack
int Pop_Program_Stack()
Program stack used for GSB commands .- Returns:
- current programm stack
-
Program_Counter
public int Program_Counter()
Get current Program counter.- Returns:
- Current Program counter.
-
Program_Position
short Program_Position(short Program_Token)
Return step-postion of given program- Parameters:
Program_Token- program we seatch- Returns:
- program step
-
Program_Store
public int Program_Store()
get where to store the next merged operations.- Returns:
- where the next merged operations is stored.
-
Push_L
void Push_L(int Operation) throws ErrorPush value and given operation to stack. depending on what operation is used this might also trigger a calculation run.
-
Push_Program_Stack
void Push_Program_Stack(int Program_Counter)
Program stack used for GSB commands .- Parameters:
Program_Counter- New programm counter
-
Read_Display
void Read_Display(boolean Is_X_Register) throws Op_ErrorRead Steps from Simulated Cassette interface.- Throws:
Op_Error- I/O Error
-
Read_Steps
void Read_Steps() throws Op_ErrorRead Steps from Simulated Cassette interface.- Throws:
Op_Error- I/O error
-
reset
public void reset()
Total Reset calculator.- Specified by:
resetin interfacenet.sourceforge.uiq3.calculator.ICalculator- See Also:
ICalculator.reset()
-
Resize_M
void Resize_M(int New_Size)
Set new size for M-register. The M-register are used for general data storage.- Parameters:
New_Size- The new size
-
Resize_MF
void Resize_MF(int New_Size)
Set new size for F-register. The MF-register are used for special data storage.- Parameters:
New_Size- The new size
-
Save_Status
void Save_Status()
Save the current status of the system
-
Service
public void Service(@Nullable net.sourceforge.uiq3.calculator.IService Service)Set Canvas to display result read keyboard- Parameters:
Service- Service executing the calculator
-
Set_Alpha_Mode
void Set_Alpha_Mode(boolean Alpha_Mode)
Checks if the calculator is in Alpha mode by checking merged operation (when execution programms the alpha indicator is not set).- Parameters:
Alpha_Mode- new alpha mode
-
Set_Constant_Mode
public final void Set_Constant_Mode(boolean Constant_Mode)
Current mode- Parameters:
Constant_Mode- new constant calculation mode
-
Set_Current_Program
void Set_Current_Program()
Set Current program to program at program counter
-
Set_Current_Program
void Set_Current_Program(short Current_Program)
- Parameters:
Current_Program- the current_Program to set
-
Set_Program_Counter
void Set_Program_Counter(int Program_Counter)
Set Current Program counter.- Parameters:
Program_Counter- new position
-
Set_Program_Store
void Set_Program_Store(int Program_Store)
Set where to store the next merged operations.- Parameters:
Program_Store- new position
-
Steps
public final short Steps(int Step)
Calculator Program Memory- Parameters:
Step- Step to get- Returns:
- a single Step
-
Steps
public final void Steps(int Step, short Value)Calculator Program Memory- Parameters:
Step- Step to setValue- a single Step
-
Stop_Execute
void Stop_Execute()
Stop calculator executing an reset interactive mode.
-
Store_Operation
void Store_Operation(short Operation) throws M_ErrorStore an operation at into calculator memory- Parameters:
Operation- Operation to be stored- Throws:
M_Error- Calculator memory exhausted
-
Text_To_Display
public short @Nullable [] Text_To_Display()
Text to be displayed. Depends on on the active register, curent display and execution modes.- Returns:
- the text to display
-
Token_Plane
public Calculator.Token_Plane_Type Token_Plane()
Active plane:- 0: Keyboard_Normal
- 1: Memory + 20, Fix instead of RND
- 2; Memory + 40
- 3: Memory + 60
- 4: Memory + 80
- Returns:
- current token plane
-
Token_Plane
void Token_Plane(Calculator.Token_Plane_Type Token_Plane)
Active plane:- 0: Keyboard_Normal
- 1: Memory + 20, Fix instead of RND
- 2; Memory + 40
- 3: Memory + 60
- 4: Memory + 80
- Parameters:
Token_Plane- new token plane
-
Write_M
void Write_M() throws Op_ErrorWrites memory register to simulated cassette interface.- Throws:
Op_Error- Could not write data
-
Write_Steps
void Write_Steps() throws Op_ErrorWrites program steps to simulated cassette interface.- Throws:
Op_Error- Could not write data
-
Wrt_Is_Alpha
boolean Wrt_Is_Alpha(boolean For_Debug)
check if - in wrt mode - we are currently in alpha mode.- Parameters:
For_Debug- debug mode- Returns:
- true if we are writing alpha characters
-
run
public final void run()
Start Calculator
-
stop
public void stop()
Stop virtual CPU and the thread it runs in- Specified by:
stopin interfacenet.sourceforge.uiq3.calculator.ICalculator- See Also:
ICalculator.stop()
-
-