X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=sim%2Fucsim%2Fdoc%2Fcmd_dump.html;h=2c36cbcc8d62665bc4c394e7ec4c9bae0c474981;hb=f27cbdc6513b26748661452e50ed3af99fac16a2;hp=3859e1e2e564c29ce7c3bdb2622e0385fa9a601a;hpb=4c3872ef27c1263faae7d9b85c1821381646ece8;p=fw%2Fsdcc diff --git a/sim/ucsim/doc/cmd_dump.html b/sim/ucsim/doc/cmd_dump.html index 3859e1e2..2c36cbcc 100644 --- a/sim/ucsim/doc/cmd_dump.html +++ b/sim/ucsim/doc/cmd_dump.html @@ -5,12 +5,82 @@ -

Dump commands of uCsim

-

[Repeatable] dis -[start [offset [lines]]]

+

dump memory_type [start [end +[bytes_per_line]]] +
dump bit_name...

+ +First form can be used get content of memory while second form can be +used to check value of bit or bits. + + +

dump memory_type [start [end +[bytes_per_line]]]

+ +Hexadecimal dump of a memory region. First parameter specifies +memory. Class name of the memory must be used, it can be checked using +conf command which lists size and +class name of all available memories. + +

start and end parameters can be used to specify the +first and last address of the region. If end is omitted then 64 +memory location is dumped. If both start and end are +omitted then next 64 memory location will be dumped out. Every time +when dump command is used the address of last dumped memory location +is stored and next dump command automatically continues at next +address. + +

Last parameter can be used to specify how many memory locations +should be dumped out in one line. It is 8 by default. + +

+$ s51 remo.hex
+ucsim 0.2.38-pre2, Copyright (C) 1997 Daniel Drotos, Talker Bt.
+ucsim comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+This is free software, and you are welcome to redistribute it
+under certain conditions; type `show c' for details.
+> 55470 words read from remo.hex
+55470 words read from remo.hex
+> run
+Simulation started, PC=0x000000
+
+Stop at 0x000515: (105) User stopped
+F 0x000515
+> du rom 20
+0x0014 00 ac ff ff ff ff ff ff ........
+0x001c ff ff ff ff ff ff ff 02 ........
+0x0024 01 1c ff ff ff ff ff 32 .......2
+0x002c ff ff ff ff 02 0f a7 02 ........
+0x0034 0e 9c 02 0d d2 02 08 41 .......A
+0x003c c0 82 c0 83 c0 d0 c0 e0 ........
+0x0044 c0 00 a2 90 c0 d0 c2 90 ........
+0x004c 78 18 06 30 03 4b 20 92 x..0.K .
+0x0054 48 30 07 05 c2 07 02 00 H0......
+0x005c 9d 30 08 05 20 93 3a c2 .0.. .:.
+> du x 10 20 10
+0x000a ff 01 00 fa 01 01 40 01 01 44 ......@..D
+0x0014 01                            .
+> du x
+0x0015 00 00 00 00 00 00 00 00 ........
+0x001d 00 10 01 00 ae 01 00 ae ........
+0x0025 02 12 e1 00 5a 85 00 01 ....Z...
+0x002d 00 3b 00 00 5a 85 00 ab .;..Z...
+0x0035 1f 80 00 00 01 00 01 00 ........
+0x003d fa 0c 02 01 00 fa 00 02 ........
+0x0045 00 01 00 ab 00 00 00 00 ........
+0x004d 00 00 5a 85 ff 00 01 00 ..Z.....
+0x0055 00 00 00 94 a7 01 0c a6 ........
+0x005d 00 6f ff 00 00 00 00 00 .o......
+> 
+ + +

dump bit_name...

+ + +

disassemble [start [offset +[lines]]]

Disassemble code. This command can be used to list disassembled instructions which discovered by the code analyzer. First two @@ -82,8 +152,7 @@ of instruction's code. Last element of the list is disassembled instruction. Every number appeared on the list is hexadecimal number. -

[Repeatable] dc -[start [stop]]

+

dc [start [stop]]

Disassembled dump of code memory area. This command simply produces disassambled list of memory area specified by the parameters. Default @@ -123,8 +192,7 @@ under certain conditions; type `show c' for details. > -

[Repeatable] dch -[start [stop]]

+

dch [start [stop]]

Hexadecimal dump of code memory area from address start to address stop. Default value of start address is address of @@ -160,8 +228,7 @@ ASCII charactes of bytes dumped out in the line. If value of the memory cell is not printable than a dot is dumped out. -

[Repeatable] di -[start [stop]]

+

di [start [stop]]

Hexadecimal dump of internal RAM area from address start to address stop. Default value of start address is address of @@ -195,8 +262,7 @@ F 000023 > -

[Repeatable] dx -[start [stop]]

+

dx [start [stop]]

Hexadecimal dump of external RAM area from address start to address stop. Default value of start address is address of @@ -230,160 +296,6 @@ F 000023 > -

dp

- -Dump out ports. This command shows actual value of ports. - -
-$ s51 remoansi.hex 
-ucsim 0.2.12, Copyright (C) 1997 Daniel Drotos, Talker Bt.
-ucsim comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
-This is free software, and you are welcome to redistribute it
-under certain conditions; type `show c' for details.
-58659 bytes read from remoansi.hex
-> sopt stopit 1
-> g
-5
- * 000023 02 01 1c LJMP  011c
-> dp
-P0    11111111 0xff 255 .    P1    11111110 0xfe 254 .
-Pin0  11111111 0xff 255 .    Pin1  11111111 0xff 255 .
-Port0 11111111 0xff 255 .    Port1 11111110 0xfe 254 .
-
-P2    11111111 0xff 255 .    P3    11111111 0xff 255 .
-Pin2  11111111 0xff 255 .    Pin3  11111111 0xff 255 .
-Port2 11111111 0xff 255 .    Port3 11111111 0xff 255 .
-> 
- -First lines on the list (labeled with Px) are value of SFRs which are -internal latch registers. Second lines (labeled with Pinx) are outputs -of external devices connected to port pins of the -microcontroller. These values can be set by you using sp command. Third lines (labeled with Portx) -show actual values can be measured on pins of the device. These values -are calculated with following pseudo formula: - -

Portx= Px AND Pinx - -

All three values are displayed in binary, hexadecimal, decimal form -and then the ASCII character of the value is shown. - - -

ds [addr...]

- -Print out SFR. This command can be used to get value of all or some -SFRs. If you do not specify any parameter the ds command simply -dumps out full SFR area 16 bytes per line. - -
-$ s51 remoansi.hex 
-ucsim 0.2.12, Copyright (C) 1997 Daniel Drotos, Talker Bt.
-ucsim comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
-This is free software, and you are welcome to redistribute it
-under certain conditions; type `show c' for details.
-58659 bytes read from remoansi.hex
-> sopt stopit 1
-> g
-5
- * 000023 02 01 1c LJMP  011c
-> ds
-000080 ff 2a ba 16 00 00 00 00 55 a1 d7 fe 50 fd 00 00 .*......U...P...
-000090 fe 00 00 00 00 00 00 00 7e 00 00 00 00 00 00 00 ........~.......
-0000a0 ff 00 00 00 00 00 00 00 97 00 00 00 00 00 00 00 ................
-0000b0 ff 00 00 00 00 00 00 00 15 00 00 00 00 00 00 00 ................
-0000c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
-0000d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
-0000e0 0a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
-0000f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
-> ds p1 0x87
-    P1 fe 254 .
-000087 00   0 .
-> ds p2 ip scon
-    P2 ff 255 .
-    IP 15  21 .
-  SCON 7e 126 ~
-> 
- -If you specify one or more parameter the ds command prints out -value of registers specified by parameters. Parameter can be an -address or a symbolic name of the register. Note that the simulator -implements a register at all address in the address space which is not -true in real microcontroller where reading of an unimplemented -register gets undefined value. Value of the registers printed out in -hexadecimal, decimal, and ASCII form. - -

Note that different type of controllers can implement different -registers: - -

-$ s51
-ucsim 0.2.12, Copyright (C) 1997 Daniel Drotos, Talker Bt.
-ucsim comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
-This is free software, and you are welcome to redistribute it
-under certain conditions; type `show c' for details.
-> ds rcap2l
-> q
-$ s51 -t 52
-ucsim 0.2.12, Copyright (C) 1997 Daniel Drotos, Talker Bt.
-ucsim comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
-This is free software, and you are welcome to redistribute it
-under certain conditions; type `show c' for details.
-> ds rcap2l
-RCAP2L 00   0 .
-> 
- - -

[Repeatable] db -addr...

- -Dump bits. This command can be used to get value of bits. At least one -parameter must be given. Bit address can be specified in three -forms. First of all name of the bit can be used if it has any. Direct -bit address is accepted too and it can be specified by address of IRAM -or SFR which contains the bit and bit number within the byte separated -by a dot. If the requested bit is in an SFR the address of the -register can be specified by its name. - -
-$ s51
-ucsim 0.2.12, Copyright (C) 1997 Daniel Drotos, Talker Bt.
-ucsim comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
-This is free software, and you are welcome to redistribute it
-under certain conditions; type `show c' for details.
-> db it1 0x20.3 0x43 p2.5
-000088    IT1 0
-000020   20.3 0
-000028   28.3 0
-0000a0   P2.5 1
-> 
- -Value of bits are printed out one per line. The list starts direct -address of the bit followed by bit name or address of the memory cell -or SFR which contains the displayed bit and bit number within the byte -separated by a dot. At last the value of the bit is shown. Displaying -a port bit you get value of SFR latch: - -
-> sp 1 0x0f
-> ss p1 0x55
-000090 55                                              U
-> dp
-P0    11111111 0xff 255 .    P1    01010101 0x55  85 U
-Pin0  11111111 0xff 255 .    Pin1  00001111 0x0f  15 .
-Port0 11111111 0xff 255 .    Port1 00000101 0x05   5 .
-
-P2    11111111 0xff 255 .    P3    11111111 0xff 255 .
-Pin2  11111111 0xff 255 .    Pin3  11111111 0xff 255 .
-Port2 11111111 0xff 255 .    Port3 11111111 0xff 255 .
-> db p1.2 p1.3 p1.4 p1.5 p1.6
-000090   P1.2 1
-000090   P1.3 0
-000090   P1.4 1
-000090   P1.5 0
-000090   P1.6 1
-> 
- -