The following applies to SDT 2.11 and SDT 2.50/2.51 only (broken in SDT 2.11a) . Description By default, when you specify a write to memory, a word value is used. Thus when you write:
let 0x8000 = 0x01
armsd/ADW will transfer a word (4 bytes) to memory starting at the address 0x8000. The bytes at 0x8001, 0x8002 and 0x8003 will be zeroed. Solution To write only a single byte, you must tell armsd/ADW that a byte transfer is required. You can do this with:
let *(char *)0x8000 = value
Similarly, to read a byte from an address use:
print /%x *(char *)0x8000
where '/%x' means 'display in hexadecimal'. You can also read and write half-word 'short' values in a similar way, i.e.
let *(short *)0x8000 = value print /%x *(short *)0x8000
You can also use ADW's View->Variables->Expression window to display memory in bytes or shorts. For example, for bytes, enter '*(char *)0x8000' in the 'View Expression' box. For example, for shorts, enter '*(short *)0x8000' in the 'View Expression' box. To display in hex, right-mouse click on the window, select 'Change Window Format' and enter '%x'. ADW 2.50/2.51 allows an area of memory to be read/viewed in word/halfword/byte format in the Memory Window (right-mouse-click in the memory window), however, in-place editing of the contents of memory in this window always results in a word write (STR).
|