Embedded Systems Firmware Demystified

Almost any boot monitor you use with an embedded system provides some type of memory display command. The memory display command can be a very useful tool, even for the high-level software developer. If the memory display command supports the hexadecimal and decimal display of address space and provides for 1-, 2-, and 4-byte data units, the CLI s fundamental ability to deal with symbols allows the monitor to display variables in their basic symbolic form. For example, assume I have a short variable called varB and I want to display it in decimal. I could use the following command:
dm 2d %varB 1
where dm is the display memory command, -2d is an option string indicating that the data is to be displayed in two-byte decimal units, %varB is the name of the variable to be displayed, and 1 indicates that only one unit is to be displayed. The result is that you have the ability to display variables just as you would with a high-level debugger, and all you need to do is make sure that your on-board symtbl file is synchronized with the application you re debugging.
You could go one step further and build a few simple scripts that save on the typing. For example, the following scripts display different integer formats
file int2:
dm 2d $ARG1 1 #Decimal 16-bit integer
file uint4:
dm 4 $ARG1 #Hex 32-bit...