summaryrefslogtreecommitdiffstatshomepage
path: root/docs/source/debugger/expressions.rst
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2021-10-13 10:59:38 +1100
committer Vas Crabb <vas@vastheman.com>2021-10-13 10:59:38 +1100
commitca338f73720ec7dedfcf8430d9dc9e481ada6378 (patch)
treeaa0a8a6e25d898db6c129a4134a129b2e400551f /docs/source/debugger/expressions.rst
parent9bcd5a2b95c9164199f5d890630113d6bb1fb6c2 (diff)
Various improvements to the user experience:
Extended the memory access prefixes in debugger expressions to support address space names. Made the debugger history command aware of how much history it has collected, and added a help topic for it to the built-in debugger help. Started updating the documentation for the web site, and corrected some of the more misleading built-in debugger help. Made some corrections to Chinese localisation after discussion with YuiFAN. Darkened the UI red colour a little. cpu/m6502/st2205u.h: Marked sound imperfect.
Diffstat (limited to 'docs/source/debugger/expressions.rst')
-rw-r--r--docs/source/debugger/expressions.rst77
1 files changed, 0 insertions, 77 deletions
diff --git a/docs/source/debugger/expressions.rst b/docs/source/debugger/expressions.rst
deleted file mode 100644
index cc6ad27377a..00000000000
--- a/docs/source/debugger/expressions.rst
+++ /dev/null
@@ -1,77 +0,0 @@
-.. _debugger-expressions-list:
-
-Debugger Expressions Guide
-==========================
-
-
-Expressions can be used anywhere a numeric parameter is expected. The syntax for expressions is very close to standard C-style syntax with full operator ordering and parentheses. There are a few operators missing (notably the trinary ? : operator), and a few new ones (memory accessors). The table below lists all the operators in their order, highest precedence operators first.
-
-|
-| ( ) : standard parentheses
-| ++ -- : postfix increment/decrement
-| ++ -- ~ ! - + b@ w@ d@ q@ : prefix inc/dec, binary NOT, logical NOT, unary +/-, memory access
-| * / % : multiply, divide, modulus
-| + - : add, subtract
-| << >> : shift left/right
-| < <= > >= : less than, less than or equal, greater than, greater than or equal
-| == != : equal, not equal
-| & : binary AND
-| ^ : binary XOR
-| | : binary OR
-| && : logical AND
-| || : logical OR
-| = \*= /= %= += -= <<= >>= &= \|= ^= : assignment
-| , : separate terms, function parameters
-|
-|
-
-Numbers
--------
-
-Numbers are prefixed according to their bases:
-
-- Hexadecimal (base-16) numbers are prefixed with :code:`$` or :code:`0x`.
-
-- Decimal (base-10) numbers are prefixed with :code:`#`.
-
-- Octal (base-8) numbers are prefixed with :code:`0o`.
-
-- Binary (base-2) numbers are prefixed with :code:`0b`.
-
-- Unprefixed numbers are hexadecimal (base-16).
-
-Examples:
-
-- :code:`123` is 123 hexadecimal (291 decimal).
-
-- :code:`$123` is 123 hexadecimal (291 decimal).
-
-- :code:`0x123` is 123 hexadecimal (291 decimal).
-
-- :code:`#123` is 123 decimal.
-
-- :code:`0o123` is 123 octal (83 decimal).
-
-- :code:`0b1001` is 9 decimal.
-
-- :code:`0b123` is invalid.
-
-Differences from C Behaviors
-----------------------------
-
-
-- First, all math is performed on full 64-bit unsigned values, so things like **a < 0** won't work as expected.
-
-- Second, the logical operators **&&** and **||** do not have short-circuit properties -- both halves are always evaluated.
-
-- Finally, the new memory operators work like this:
-
- - **b!<addr>** refers to the byte at <addr> but does *NOT* suppress side effects such as reading a mailbox clearing the pending flag, or reading a FIFO removing an item.
-
- - **b@<addr>** refers to the byte at <addr> while suppressing side effects.
-
- - Similarly, **w@** and **w!** refer to a *word* in memory, **d@** and **d!** refer to a *dword* in memory, and **q@** and **q!** refer to a *qword* in memory.
-
- The memory operators can be used as both lvalues and rvalues, so you can write **b\@100 = ff** to store a byte in memory. By default these operators read from the program memory space, but you can override that by prefixing them with a 'd' or an 'i'.
-
- As such, **dw\@300** refers to data memory word at address 300 and **id\@400** refers to an I/O memory dword at address 400.