diff --git a/manual.lyx b/manual.lyx index fdf91c6a..7631bcce 100644 --- a/manual.lyx +++ b/manual.lyx @@ -3083,6 +3083,189 @@ Sent when key that has keyhook events requested changes state. table values in input.raw). \end_layout +\begin_layout Section +Memory watch expression syntax +\end_layout + +\begin_layout Standard +Memory watch expressions are in RPN (Reverse Polish Notation). + At the end of expression, the top entry on stack is taken as the final + result. +\end_layout + +\begin_layout Standard +Notations: +\end_layout + +\begin_layout Itemize +Evaluation order is strictly left to right. +\end_layout + +\begin_layout Itemize +a is the entry on top of stack +\end_layout + +\begin_layout Itemize +b is the entry immediately below top of stack +\end_layout + +\begin_layout Itemize +; separates values to be pushed (no intermediate pop). +\end_layout + +\begin_layout Itemize +After end of element, all used stack slots are popped and all results are + pushed. +\end_layout + +\begin_layout Itemize +When pushing multiple values, the pushes occur in order shown. +\end_layout + +\begin_layout Standard +The following operators are available: +\end_layout + +\begin_layout Itemize ++ : a + b +\end_layout + +\begin_layout Itemize +- : a - b +\end_layout + +\begin_layout Itemize +* : a * b +\end_layout + +\begin_layout Itemize +/ : a / b +\end_layout + +\begin_layout Itemize +% : a % b +\end_layout + +\begin_layout Itemize +a : atan(a) +\end_layout + +\begin_layout Itemize +b : read_signed_byte(a) +\end_layout + +\begin_layout Itemize +c : cos(a) +\end_layout + +\begin_layout Itemize +d : read_signed_dword(a) +\end_layout + +\begin_layout Itemize +i : quotent(a / b) +\end_layout + +\begin_layout Itemize +p : +\begin_inset Formula $\pi$ +\end_inset + + +\end_layout + +\begin_layout Itemize +q : read_signed_qword(a) +\end_layout + +\begin_layout Itemize +r : sqrt(a) +\end_layout + +\begin_layout Itemize +s : sin(a) +\end_layout + +\begin_layout Itemize +t : tan(a) +\end_layout + +\begin_layout Itemize +u : a; a +\end_layout + +\begin_layout Itemize +w : read_signed_word(a) +\end_layout + +\begin_layout Itemize +A : atan2(a, b) +\end_layout + +\begin_layout Itemize +B : read_unsigned_byte(a) +\end_layout + +\begin_layout Itemize +Cz : Push number to stack. +\end_layout + +\begin_layout Itemize +D : read_unsigned_dword(a) +\end_layout + +\begin_layout Itemize +C0xz : Push number (hexadecimal) to stack. +\end_layout + +\begin_layout Itemize +Q : read_unsigned_qword(a) +\end_layout + +\begin_layout Itemize +R : round a to digits. +\end_layout + +\begin_layout Itemize +W : read_unsigned_word(a) +\end_layout + +\begin_layout Subsection +Example: +\end_layout + +\begin_layout Standard +C0x007e0878zWC0x007e002czW- +\end_layout + +\begin_layout Enumerate +Push value 0x7e0878 on top of stack (C0x007e0878z). +\end_layout + +\begin_layout Enumerate +Pop the value on top of stack (0x7e0878), read word value at that address + and push the result,call it x1 (W). +\end_layout + +\begin_layout Enumerate +Push value 0x7e002c on top of stack (C0x007e002cz). +\end_layout + +\begin_layout Enumerate +Pop the value on top of stack (0x7e002c), read word value at that address + and push the result,call it x2 (W). +\end_layout + +\begin_layout Enumerate +Pop the two top numbers on stack, x1 and x2, substract x1 from x2 and push + x2 - x1 (-). +\end_layout + +\begin_layout Enumerate +Since the expression ends, the final memory watch result is the top one + on stack, which is x2 - x1. +\end_layout + \begin_layout Section Modifier and key names: \end_layout diff --git a/manual.txt b/manual.txt index 3d4c36fd..ccd2dc59 100644 --- a/manual.txt +++ b/manual.txt @@ -1553,11 +1553,105 @@ Sent when key that has keyhook events requested changes state. Keyname is name of the key (group) and state is the state (same kind as table values in input.raw). -9 Modifier and key names: +9 Memory watch expression syntax -9.1 SDL Platform +Memory watch expressions are in RPN (Reverse Polish Notation). At +the end of expression, the top entry on stack is taken as the +final result. -9.1.1 Modifier names +Notations: + +• Evaluation order is strictly left to right. + +• a is the entry on top of stack + +• b is the entry immediately below top of stack + +• ; separates values to be pushed (no intermediate pop). + +• After end of element, all used stack slots are popped and all + results are pushed. + +• When pushing multiple values, the pushes occur in order shown. + +The following operators are available: + +• + : a + b + +• - : a - b + +• * : a * b + +• / : a / b + +• % : a % b + +• a : atan(a) + +• b : read_signed_byte(a) + +• c : cos(a) + +• d : read_signed_dword(a) + +• i : quotent(a / b) + +• p :\pi + + +• q : read_signed_qword(a) + +• r : sqrt(a) + +• s : sin(a) + +• t : tan(a) + +• u : a; a + +• w : read_signed_word(a) + +• A : atan2(a, b) + +• B : read_unsigned_byte(a) + +• Cz : Push number to stack. + +• D : read_unsigned_dword(a) + +• C0xz : Push number (hexadecimal) to stack. + +• Q : read_unsigned_qword(a) + +• R : round a to digits. + +• W : read_unsigned_word(a) + +9.1 Example: + +C0x007e0878zWC0x007e002czW- + +1. Push value 0x7e0878 on top of stack (C0x007e0878z). + +2. Pop the value on top of stack (0x7e0878), read word value at + that address and push the result,call it x1 (W). + +3. Push value 0x7e002c on top of stack (C0x007e002cz). + +4. Pop the value on top of stack (0x7e002c), read word value at + that address and push the result,call it x2 (W). + +5. Pop the two top numbers on stack, x1 and x2, substract x1 from + x2 and push x2 - x1 (-). + +6. Since the expression ends, the final memory watch result is + the top one on stack, which is x2 - x1. + +10 Modifier and key names: + +10.1 SDL Platform + +10.1.1 Modifier names Following modifier names are known: @@ -1573,7 +1667,7 @@ Following modifier names are known: • mode: Mode select. -9.1.2 Key names +10.1.2 Key names Following key names are known: @@ -1612,7 +1706,7 @@ Following key names are known: key having hardware-dependent scan code of (useful to bind those keys that don't have symbolic names). -9.1.3 Joystick pseudo-keys: +10.1.3 Joystick pseudo-keys: • joystickbutton