38
Example:
10
; X contains 10
16 ms ; X contains 16 ms, Y contains 10
Enter ; X contains 16 ms, Y contains 16 ms
DropX
Usage:
DropX
The instruction DropX removes the number from the top of the stack.
Example:
10 mA ; X contains 10 mA
16 ms ; X contains 16 ms, Y contains 10 mA
59 V ; X contains 59 V, Y contain 16 ms
DropX ; X contains 16 ms, Y contains 10 mA
SwapXY
Usage:
SwapXY
The instruction Swap exchanges the values of the numbers in the X and Y registers, leaving the rest of the stack unchanged.
Example:
10 s ; X contains 10 s
16 uA ; X contains 16 uA, Y contains 10 s
SwapXY
; X contains 10 s, Y contains 16 uA
ClearX
Usage:
ClearX
ClearX sets the X register to 0 without changing the other values in the stack.
Example:
10
; X contains 10
16
; X contains 16, Y contains 10
ClearX
; X contains 0, Y contains 10
+
Usage:
+
The instr removes the top two numbers on the stack (X and Y) and places the sum of these numbers at the top of the
stack (X).
Example:
10
; X contains 10
16
; X contains 16, Y contains 10
12
; X contains 12, Y contains 16
+
; X contains 28, Y contains 10
-
Usage:
-
The instruction - removes the top two numbers on the stack (X and Y) and places the difference of these numbers, Y – X, at the
top of the stack (X).
Example:
10
; X contains 10
16
; X contains 16, Y contains 10