From 88c8b5b0c7657eaa7f3cce726c441221af02211b Mon Sep 17 00:00:00 2001 From: Firehawke <34792592+Firehawke@users.noreply.github.com> Date: Sun, 14 Jan 2018 21:25:23 -0700 Subject: Add additional memory operators per request (NW) (#3067) * Add additional memory operators per request and further cleanups to expressions (NW) * Requested adjustments to expressions. (NW) --- docs/source/debugger/expressions.rst | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/docs/source/debugger/expressions.rst b/docs/source/debugger/expressions.rst index 5862c3d7ff2..5bc448ba105 100644 --- a/docs/source/debugger/expressions.rst +++ b/docs/source/debugger/expressions.rst @@ -30,15 +30,19 @@ 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. +- 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. +- 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@ refers to the byte read from . + - **b!** refers to the byte at but does *NOT* suppress side effects such as reading a mailbox clearing the pending flag, or reading a FIFO removing an item. - - Similarly, w@ refers to a word in memory, d@ refers to a dword in memory, and q@ refers 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'. So dw\@300 refers to data memory word at address 300 and id\@400 refers to an I/O memory dword at address 400. + - **b@** refers to the byte at 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. -- cgit v1.2.3