|
40000010: 3520284d 61722032 31203230 3032202d 5 (Mar 21 2002 -
40000020: 2031393a 35353a30 34290000 00000000 19:55:04)......
=>
跟很多的存储类命令一样,cmp可以采用不同的长度访问存储器:可以是32bit(长字),16bit(字)或者8bit(字节)数据。默认使用32bit,或者使用cmp.l代替,结果是一样的。如果你想以16bit或者字数据访问存储器,你可以用cmp.w代替;如果是8bit或者字节数据,请用cmp.b。
必须注意到计数参数确定了需要被处理的数据的总长度,也就是有多少长字、字或者字节需要被比较。
=> cmp.l 100000 40000000 400
word at 0x00100004 (0x50ff4342) != word at 0x40000004 (0x50504342)
Total of 1 word were the same
=> cmp.w 100000 40000000 800
halfword at 0x00100004 (0x50ff) != halfword at 0x40000004 (0x5050)
Total of 2 halfwords were the same
=> cmp.b 100000 40000000 1000
byte at 0x00100005 (0xff) != byte at 0x40000005 (0x50)
Total of 5 bytes were the same
=>
5.9.2.4 cp – 存储器拷贝
=> help cp
cp [.b, .w, .l] source target count
- copy memory
=>
cp用来复制存储单元。
=> cp 40000000 100000 10000
=>
cp 可以使用类型标识符 .l , .w和.b。
5.9.2.5 md – 显示存储单元内容
=> help md
md [.b, .w, .l] address [# of objects]
- memory display
=>
上一篇:完全控制桌面的实现
下一篇:The DENX U-Boot and Linux Guide (DULG) for TQM8xxL
|