version 0.5.2
[fw/sdcc] / sim / ucsim / doc / cmd_general.html
index e0483de03fc95e6f09ba5eb527ef798c6d375437..fd0adf93237cdb91e4f703e214a5037ff5527d39 100644 (file)
 <html>
 <head>
-<title>General commands of uCsim</title>
+<title>General commands of &micro;Csim</title>
 </head>
 
 <body bgcolor="white">
 
-<h2>General commands of uCsim</h2>
+<h2>General commands of &micro;Csim</h2>
 
 
-<p>Every command which changes content of ROM area such as <b><a
-href="#dl">dl</a></b> or <b><a href="cmd_set#set_memory">set
-memory</a></b> deletes result of code analyzer and causes to
-re-analyze the code.
+<a name="conf"><h3>conf</h3></a>
 
+Conf command can be used to display different kind of information
+about &micro;Csim. It can be followed by a subcommand:
 
-<a name="show"><h3>show</h3></a>
+<p><a href="#conf_">conf</a>
+<br>conf <a href="#conf_objects">objects</a>
 
-Show command can be used to display different kind of information. It
-must be followed by a subcommand. Subcommands are:
+<blockquote>
 
-<p>show <a href="#show_copying">copying</a>
-<br>show <a href="#show_warranty">warranty</a>
+<a name="conf_"><h4>conf</h4></a>
 
+This command (without a subcommand) prints out configuration of the
+simulator:
 
-<a name="show_copying"><h4>show copying</h4></a>
+<pre>
+0> <font color="#118811">conf</font>
+ucsim version 0.5.0-pre3
+Type of microcontroller: 51 CMOS
+Controller has 9 hardware element(s).
+  timer0[0]
+  timer1[1]
+  uart[0]
+  port[0]
+  port[1]
+  port[2]
+  port[3]
+  irq[0]
+  _51_dummy[0]
+0>
+</pre>
 
-This command can be used to list licensing information. It is first 10
-point of the version 2 of GNU Genral Public License. If you do not
-accept GPL simply do not use the program.
+First line contains version number of the program. Second line informs
+about type of the simulated microcontroller. Third line prints out how
+many hardware elements are simulated.
 
+<a name="conf_objects"><h4>conf <i>objects</i></h4></a>
 
-<a name="show_warranty"><h4>show warranty</h4></a>
+This command is for development only.
 
-This command prints out last 2 point of the license ("NO WARRANTY"
-message).
+</blockquote>
 
+<hr>
 
-<a name="dl"><h3>download,dl</h3></a>
 
-Download command. It is same as <a href="#l">load</a> above but it
-reads information from command console which is standard input by
-default. This command stops read records when it detects an "END"
-record which is normaly the last record. This command has two
-equivalent forms <b>download</b> and <b>dl</b>.
+<a name="h"><h3>?,help <i>[command]</i></h3></a>
+
+Help command. It prints out short description of the commands.
+
+<p>If a command name is given as parameter then &micro;Csim prints out all
+command that has similar names:
 
 <pre>
-$ <font color="#118811">s51 -V</font>
-ucsim 0.2.24, 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.
-> <font color="#118811">do
-:03000000020003F8
-:1000030075812078207600D8FC900000AE83AF8203
-:100013009000001200416005E4F0A380F690009F79
-:1000230012004A9000A312004A9000A712006890A1
-:1000330000AD12006875D0001200B50200B3EF6581
-:10004300827003EE658322E493F8740193F97402DA
-:1000530093FE740393F5828E83E869700122E4931F
-:10006300F6A30880F4E493FC740193FD740293FEF9
-:10007300740393FF740493F8740593F582888312D1
-:100083000041700122E493A3A883A9828C838D820B
-:10009300F0A3AC83AD828883898280E3212100B5FC
-:1000A300212100B5000000B500B5000000B500B582
-:0200B30080FECD
-:1000B5007520117501AA850120750102850120228F
-:00000001FF</font>
-197 bytes loaded
-> </pre>
+0> <font color="#118811">? s</font>
+show subcommand    Generic command for showing things about the uCsim
+set subcommand     Set, see `set' command for more help
+stop               Stop
+step               Step
+state              State of microcontroller
+statistic [mem [startaddr [endaddr]]]
+                   Statistic of memory accesses
+0> <font color="#118811">? s o</font>
+show option [name] Show internal data of options
+set option name|nr value
+                   Set value of an option
+0> 
+</pre>
+
+Some commands have more than one name which can produce interesting
+result:
+
+<pre>
+0> <font color="#118811">? t r</font>
+timer delete id    Delete a timer
+timer start id     Start a timer
+0> 
+</pre>
+
+It looks that names of listed subcommands start with no "r" but take a
+closer look on that commands:
+
+<pre>
+0> <font color="#118811">? t d</font>
+timer delete id    Delete a timer
+Names of command: delete remove
+long help of timer delete
+0> <font color="#118811">? t start</font>
+timer start id     Start a timer
+Names of command: run start
+long help of timer run
+0> </pre>
+
+<p>If parameter is unique name of a command then long description of
+the command is printed out.
+
+<hr>
 
 
 <a name="q"><h3>quit</h3></a>
@@ -92,6 +128,8 @@ under certain conditions; type `show c' for details.
 > <font color="#118811">q</font>
 $ </pre>
 
+<hr>
+
 
 <a name="kill"><h3>kill</h3></a>
 
@@ -99,99 +137,397 @@ This kommand terminates the simulator. It does not ask for
 confirmation. It doesn't matter how many consoles are used and what
 commands are running on them.
 
+<hr>
 
-<a name="h"><h3>?,help [command]</h3></a>
 
-Help command. It prints out short description of the commands.
+<a name="exec"><h3>exec <i>file</i></h3></a>
 
-<p>If a command name is given as parameter then uCsim prints out all
-command that has the same name.
+Reads commands from "file" and executes them. This command opens a new
+console (which will use same in/out file as the actual one) to execute
+the file. This means the "quit" command in the file will not exit the
+simulator:
 
-<p>If parameter is unique name of a command then long description of
-the command is printed out.
+<pre>
+drdani@emma:~$ <font color="#118811">cat /tmp/x</font>
+get opt
+quit
+conf
+drdani@emma:~$ <font color="#118811">s51</font>
+uCsim 0.5.0-pre3, 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.
+0> <font color="#118811">exec "/tmp/x"</font>
+1> get opt
+ 0. config_file(by application) is hidden!
+ 1. console_on(by application) is hidden!
+ 2. cpu_type(by application) is hidden!
+ 3. debug(by console1): FALSE - Debug messages to console1
+ 4. debug(by console0): FALSE - Debug messages to console0
+ 5. debug(by application): FALSE - Print debug messages (-V)
+ 6. irq_stop(by mcs51_controller): FALSE - Stop when IRQ accepted
+ 7. null_prompt(by application): FALSE - Use \0 as prompt (-P)
+ 8. prompt(by console1): "" - Prompt string of console1
+ 9. prompt(by console0): "" - Prompt string of console0
+10. prompt(by application): (null) - String of prompt (-p)
+11. serial_in_file(by application) is hidden!
+12. serial_out_file(by application) is hidden!
+13. xtal(by application): 11059200.000 - Frequency of XTAL in Hz
+1> quit
+0> 
+</pre>
 
+<hr>
 
-<a name="reset"><h3>reset</h3></a>
 
-Reset command. It resets the microcontroller. It has same effect as
-active signal on the RST pin.
+<a name="expression"><h3>expression <i>expr</i></h3></a>
+
+Executes "expr" as an expression. For more about expressions, see <a
+href="syntax.html">command syntax</a>.
 
 <pre>
-$ <font color="#118811">s51 -V remoansi.hex</font>
-ucsim 0.2.24, Copyright (C) 1997 Daniel Drotos, Talker Bt.
+0> <font color="#118811">expr 1 + 2</font>
+3
+0> <font color="#118811">expr xram[256*dph+dpl]= &amp;sp</font>
+129
+0> 
+</pre>
+
+
+<hr>
+
+
+<a name="show"><h3>show</h3></a>
+
+Show command can be used to display different kind of information. It
+must be followed by a subcommand. Subcommands are:
+
+<p>show <a href="#show_copying">copying</a>
+<br>show <a href="#show_warranty">warranty</a>
+<br>show <a href="#show_option">option</a>
+<br>show <a href="#show_error">error</a>
+
+<blockquote>
+
+<a name="show_copying"><h4>show copying</h4></a>
+
+This command can be used to list licensing information. It is first 10
+point of the version 2 of GNU Genral Public License. If you do not
+accept GPL simply do not use the program.
+
+<hr>
+
+<a name="show_warranty"><h4>show warranty</h4></a>
+
+This command prints out last 2 point of the license ("NO WARRANTY"
+message).
+
+<hr>
+
+<a name="show_option"><h4>show option</h4></a>
+
+This command is for development only.
+
+<hr>
+
+<a name="show_error"><h4>show error</h4></a>
+
+Errors or warnings are events which can happen in the simulated system
+during simulation. Report of that events can be turned on or off using
+<a href="#set_error"><b>set error</b></a> command. Errors are
+organized in parent-child relationship. Childs are listed under the
+parent:
+
+<pre>
+0> <font color="#118811">sh er</font>
+Error: non-classified [on/ON]
+  Error: memory [on/ON]
+    Error: invalid_address [unset/ON]
+    Error: non_decoded [unset/ON]
+  Error: stack [off/OFF]
+    Error: stack_tracker [unset/OFF]
+      Error: stack_tracker_wrong_handle [unset/OFF]
+      Error: operation_on_empty_stack [unset/OFF]
+      Warning: stack_operation_unmatched_to_top_of_stack [unset/OFF]
+      Warning: stack_looks_corrupted [unset/OFF]
+0> </pre>
+
+First element is the type (Error or Warning). Error stops the
+simulation. Warning is just reported and simulation goes on. Next
+element is the name of the error. Last element shows actual value and
+state. Value can be:
+
+<dl><dt><b>on</b></dt> <dd>state is ON
+
+<dt><b>off</b><dt> <dd>state is OFF
+
+<dt><b>unset</b></dt> <dd>state is inherited from the parent.
+</dl>
+
+If state is <b>ON</b> and the event happens, it is reported. If state
+is <b>OFF</b> then the event is silently ignored.
+
+</blockquote>
+<hr>
+
+
+<a name="get"><h3>get</h3></a>
+
+This command can be used to get value of various kind of things. It
+requires a subcommand to specify what is going to be set. Known
+subcommands are:
+
+<p>get <a href="#get_sfr">sfr</a>
+<br>get <a href="#get_option">option</a>
+
+
+<blockquote>
+
+<a name="get_sfr"><h4>get sfr <i>address...</i></h4></a>
+
+This command can be used to check values of SFR location(s) if SFR
+exists in simulated memory. Note that <a
+href="cmd_dump.html#dump_memory">dump memory</a> or <a
+href="cmd_dump.html#ds">ds</a> can be used as well.
+
+<p>Parameters are interpreted as SFR names or addresses and values of
+addressed locations are dumped out.
+
+<pre>
+$ <font color="#118811">s51 </font>
+ucsim 0.5.0-pre3, 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
-> <font color="#118811">dr</font>
-000000 00 00 00 00 00 00 00 00 ........
-000000 00 .  ACC= 0x00   0 .  B= 0x00   DPTR= 0x0000 @DPTR= 0x00   0 .
-000000 00 .  PSW= 0x00 CY=0 AC=0 OV=0 P=0
-   000000 02 01 60 LJMP  0160
-> <font color="#118811">s 2</font>
-000000 00 00 00 00 00 00 00 00 ........
-000000 00 .  ACC= 0x00   0 .  B= 0x00   DPTR= 0x0000 @DPTR= 0x00   0 .
-000000 00 .  PSW= 0x00 CY=0 AC=0 OV=0 P=0
-   000160 c2 90    CLR   P1.0
-000000 00 00 00 00 00 00 00 00 ........
-000000 00 .  ACC= 0x00   0 .  B= 0x00   DPTR= 0x0000 @DPTR= 0x00   0 .
-000000 00 .  PSW= 0x00 CY=0 AC=0 OV=0 P=0
-   000162 c2 97    CLR   P1.7
-> <font color="#118811">res</font>
-> <font color="#118811">dr</font>
-000000 00 00 00 00 00 00 00 00 ........
-000000 00 .  ACC= 0x00   0 .  B= 0x00   DPTR= 0x0000 @DPTR= 0x00   0 .
-000000 00 .  PSW= 0x00 CY=0 AC=0 OV=0 P=0
-   000000 02 01 60 LJMP  0160
+0> <font color="#118811">get sfr pcon p1 0 0x80 kahd scon 256</font>
+0x87 00 .
+0x90 ff .
+Warning: Invalid address 0
+0x80 ff .
+Warning: Invalid address kahd
+0x98 00 .
+Warning: Invalid address 256
+0> </pre>
+
+<hr>
+
+
+<a name="get_option"><h4>get option <i>[name]</i></h4></a>
+
+Get actual value of option(s). Some options can be set by <a
+href="#set_option"><b>set option</b></a> to modify behavior of the
+simulator. Using <b>get option</b> you can get actual value of these
+options. If you use this command without parameter you get list of all
+options known by the program. In this way you can figure out which
+options can be used.
+
+<pre>
+$ <font color="#118811">s51 -V</font>
+ucsim 0.5.0, 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.
+0> <font color="#118811">get opt</font>
+ 3. debug(by console0): FALSE - Debug messages to console0
+ 4. debug(by application): FALSE - Print debug messages (-V)
+ 5. irq_stop(by mcs51_controller): FALSE - Stop when IRQ accepted
+ 6. null_prompt(by application): FALSE - Use \0 as prompt (-P)
+ 7. prompt(by console0): "" - Prompt string of console0
+ 8. prompt(by application): (null) - String of prompt (-p)
+11. xtal(by application): 11059200.000 - Frequency of XTAL in Hz
+0> 
+</pre>
+
+First element of the list is the number of the option. It is followed
+by name of the option (<b>debug</b>, <b>irq_stop</b>, etc.). Number or
+the name can be used to identify the option in
+<b>get option</b> and <a href="#set_option"><b>set option</b></a>
+command. Next element shows which part of the simulator created the
+option.
+
+<p>Next element of the list is the value of the option. It can be an
+integer or a floating point number, a string or a boolean value.
+
+<p>Last part describes the option.
+
+<p>Some options can have same name. An example is the <b>debug</b>
+option. One is created by the application to store value given by -V
+(see <a href="invoke.html">invokation</a>). This will be used as
+default value when a new instance of a console is created:
+
+<pre>
+$ <font color="#118811">cat /tmp/x</font>
+get opt debug
+$ <font color="#118811">s51</font>
+uCsim 0.5.0-pre3, 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.
+0> <font color="#118811">get opt debug</font>
+ 3. debug(by console0): FALSE - Debug messages to console0
+ 4. debug(by application): FALSE - Print debug messages (-V)
+0> <font color="#118811">set opt 4 1</font>
+0> <font color="#118811">get opt debug</font>
+ 3. debug(by console0): FALSE - Debug messages to console0
+ 4. debug(by application): TRUE - Print debug messages (-V)
+0> <font color="#118811">exec "/tmp/x"</font>
+1> get opt debug
+ 3. debug(by console1): TRUE - Debug messages to console1
+ 4. debug(by console0): FALSE - Debug messages to console0
+ 5. debug(by application): TRUE - Print debug messages (-V)
+1> 
+0> 
+</pre>
+
+</blockquote>
+
+<hr>
+
+
+<a name="set"><h3>set</h3></a>
+
+This command can be used to set various kind of things. It requires a
+subcommand to specify what is going to be set. Known subcommands are:
+
+<p>set <a href="#set_option">option</a>
+<br>set <a href="#set_error">error</a>
+<br>set <a href="#set_memory">memory</a>
+<br>set <a href="#set_bit">bit</a>
+<br>set <a href="#set_hardware">hardware</a>
+
+
+<blockquote>
+
+<a name="set_option"><h4>set option <i>name|nr value</i></h4></a>
+
+<p>Set option value. Options described at (<a
+href="#get_option"><b>get option</b></a>) command can be set using
+this command. First parameter must be an option name or number and
+second the new value. Interpretation of the value depends on type of
+the option. Value for a boolean type of option interpreted as follows:
+if first character of the value is one of <tt>1</tt>, <tt>t</tt>,
+<tt>T</tt>, <tt>y</tt>, <tt>Y</tt> then value will be TRUE otherwise
+it will be FALSE.
+
+<pre>
+$ <font color="#118811">s51 -V</font>
+uCsim 0.5.0-pre3, 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.
+> <font color="#118811">get opt</font>
+ 0. config_file(by application) is hidden!
+ 1. console_on(by application) is hidden!
+ 2. cpu_type(by application) is hidden!
+ 3. debug(by console0): TRUE - Debug messages to console0
+ 4. debug(by application): TRUE - Print debug messages (-V)
+ 5. irq_stop(by mcs51_controller): FALSE - Stop when IRQ accepted
+ 6. null_prompt(by application): FALSE - Use \0 as prompt (-P)
+ 7. prompt(by console0): "" - Prompt string of console0
+ 8. prompt(by application): (null) - String of prompt (-p)
+ 9. serial_in_file(by application) is hidden!
+10. serial_out_file(by application) is hidden!
+11. xtal(by application): 11059200.000 - Frequency of XTAL in Hz
+> <font color="#118811">set opt debug f</font>
+Ambiguous option name, use number instead
+> <font color="#118811">set opt 3 f</font>
+> <font color="#118811">get opt debug</font>
+ 3. debug(by console0): FALSE - Debug messages to console0
+ 4. debug(by application): TRUE - Print debug messages (-V)
 > </pre>
 
+<hr>
+
+
+<a name="set_error"><h4>set error <i>error_name
+on|off|unset</i></h4></a>
+
+This command can be used to set if an error event should be reported
+or not. Actual settings can be retrieved by <a href="show_error">show
+error</a> command.
+
+<hr>
+
+
+<a name="set_memory"><h4>set memory <i>memory_type address
+data...</i></h4></a>
+
+This command can be used to modify content of any simulated
+memory. First parameter must be a class name to specify type of
+memory. Class names can de checked by <a
+href="cmd_general.html#info_memory">info memory</a> command. Chips and
+address spaces can be used as well.
+
+<p>Second parameter specifies start address of the modification.
+
+<p>Remaining parameters will be written into the memory starting at
+address specified by second parameter. Data list can include numbers
+as well as strings. See <a href="syntax.html">syntax</a> for more
+details.
+
+<p>Modified memory locations will be dumped out.
+
+<pre>
+0> <font color="#118811">set mem xram 1 "ab\tcd\0ef\012ghq" 2 "ABC"</font>
+0x0001 61 62 09 63 64 00 65 66 ab.cd.ef
+0x0009 0a 67 68 71 02 41 42 43 .ghq.ABC
+0> <font color="#118811">set mem sfr pcon 0x34</font>
+0x87 34                      4
+0> <font color="#118811">set mem xram_chip 1 2</font>
+0x0001 02                      .
+0> </pre>
 
-<a name="where"><h3>where,Where memory_type data...</h3></a>
+<hr>
 
-Searching for some data in memory. First parameter specifies
-memory. Class name of the memory must be used, it can be checked using
-<a href="cmd_general.html#conf">conf</a> command which lists size and
-class name of all available memories.
 
-<p>Other parameters can be mixed list of strings (characters between "
-and ") and numbers. Strings can contain escape sequencies. Ucsim
-merges all parameters together and will search for megred list of
-values in specified memory.
+<a name="set_bit"><h4>set bit <i>address 0|1</i></h4></a>
 
-<p><b>where</b> command do case unsensitive search while <b>Where</b>
-command is for case sensitive search.
+Set one bit to 0 or 1. First parameter specifies the bit. It can be
+the address of the bit (number or syqmbolic name) or it can be
+specified in <i>address<b>.</b>bitnumber</i> format where
+<i>address</i> addresses SFR area and <i>bitnumber</i> is number of
+bit in specified SFR location. Using this syntax any SFR (and 8051's
+internal RAM) location can be modified it need not be really bit
+addressable.
 
-<p>Search is done in whole memory and all matches are dumped out.
+<p>Second parameter interpreted as 1 if it is not zero.
+
+<p>Modified memory location is dumped out.
 
 <pre>
-$ <font color="#118811">/s51</font>
+$ <font color="#118811">s51 </font>
 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.
-> <font color="#118811">set mem x 20 "Dani d ani D ani dani Dani"</font>
-0x0014 44 61 6e 69 20 64 20 61 Dani d a
-0x001c 6e 69 20 44 20 61 6e 69 ni D ani
-0x0024 20 64 61 6e 69 20 44 61  dani Da
-0x002c 6e 69                   ni
-> <font color="#118811">where x "dani"</font>
-0x0014 44 61 6e 69             Dani
-0x0025 64 61 6e 69             dani
-0x002a 44 61 6e 69             Dani
-> <font color="#118811">Where x "d ani"</font>
-0x0019 64 20 61 6e 69          d ani
-> </pre>
+> <font color="#118811">set bit tf1 1</font>
+0x88 80 .
+> <font color="#118811">set bit 130 0</font>
+0x80 fb .
+> <font color="#118811">set bit pcon.2 1</font>
+0x87 04 .
+> <font color="#118811">set bit 10.7 1</font>
+0x0a 80 .
+> 
+</pre>
 
+<hr>
 
-<a name="conf"><h3>conf</h3></a>
 
-This command prints out configuration of the simulator:
+<a name="set_hardware"><h4>set hardware <i>hardware_id data</i></h4></a>
+
+This command can be used to set value into a hardware element of the
+controller (<a href="#conf">conf</a> command lists them).
+
+<p>Actually only <b>port</b> element of MCS51 accepts this method. It
+can be used to set value of external circuits which
+connected to ports of simulated controller. First parameter specifies
+port element (as an array), second is the new value.
 
 <pre>
-> <font color="#118811">conf</font>
-ucsim version 0.2.37
+0> <font color="#118811">conf</font>
 Type of microcontroller: 51 CMOS
-Controller has 8 hardware element(s).
+Controller has 9 hardware element(s).
   timer0[0]
   timer1[1]
   uart[0]
@@ -200,21 +536,27 @@ Controller has 8 hardware element(s).
   port[2]
   port[3]
   irq[0]
-Memories:
-  ROM  size= 0x010000  65536 width=  8 class= "rom"
-  XRAM size= 0x010000  65536 width=  8 class= "xram"
-  IRAM size= 0x000100    256 width=  8 class= "iram"
-  SFR  size= 0x000100    256 width=  8 class= "sfr"
-> 
+  _51_dummy[0]
+0> <font color="#118811">set hw port[0] 12</font>
+0> <font color="#118811">i h po[0]</font>
+port[0]
+P0    11111111 0xff 255 . (Value in SFR register)
+Pin0  00001100 0x0c  12 . (Output of outside circuits)
+Port0 00001100 0x0c  12 . (Value on the port pins)
+0> <font color="#118811">set hw port[0] 23</font>
+0> <font color="#118811">i h po[0]</font>
+port[0]
+P0    11111111 0xff 255 . (Value in SFR register)
+Pin0  00010111 0x17  23 . (Output of outside circuits)
+Port0 00010111 0x17  23 . (Value on the port pins)
+0> <font color="#118811">set hw irq[0] 12</font>
+Nothing to do
+0> 
 </pre>
 
-First line contains version number of the program. Second line informs
-about type of the simulated microcontroller. Third line prints out how
-many hardware elements are simulated. Following lines contain
-information about memories. Note that size of the simulated memory
-segment can be bigger than size of addressable part of the memory as
-you see above SFR type of the memory has bigger simulated than
-addressable size.
+</blockquote>
+
+<hr>
 
 
 <a name="state"><h3>state</h3></a>
@@ -244,20 +586,45 @@ Idle times and main program.
 <p>Last line infroms about maximum value of the stack pointer and a
 "not very well" calculated average value of it.
 
+<hr>
+
 
-<a name="file"><h3>file,load "FILE"</h3></a>
+<a name="reset"><h3>reset</h3></a>
 
-Loads file named FILE into the simulated code memory. File must
-contain data in Intel HEX format.
+Reset command. It resets the microcontroller. It has same effect as
+active signal on the RST pin.
 
 <pre>
-> <font color="#118811">file "../../remo.hex"</font>
-55470 words read from ../../remo.hex
-> 
-</pre>
+$ <font color="#118811">s51 -V remoansi.hex</font>
+ucsim 0.2.24, 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
+> <font color="#118811">i r</font>
+000000 00 00 00 00 00 00 00 00 ........
+000000 00 .  ACC= 0x00   0 .  B= 0x00   DPTR= 0x0000 @DPTR= 0x00   0 .
+000000 00 .  PSW= 0x00 CY=0 AC=0 OV=0 P=0
+   000000 02 01 60 LJMP  0160
+> <font color="#118811">s</font>
+000000 00 00 00 00 00 00 00 00 ........
+000000 00 .  ACC= 0x00   0 .  B= 0x00   DPTR= 0x0000 @DPTR= 0x00   0 .
+000000 00 .  PSW= 0x00 CY=0 AC=0 OV=0 P=0
+   000160 c2 90    CLR   P1.0
+> <font color="#118811">s</font>
+000000 00 00 00 00 00 00 00 00 ........
+000000 00 .  ACC= 0x00   0 .  B= 0x00   DPTR= 0x0000 @DPTR= 0x00   0 .
+000000 00 .  PSW= 0x00 CY=0 AC=0 OV=0 P=0
+   000162 c2 97    CLR   P1.7
+> <font color="#118811">res</font>
+> <font color="#118811">i r</font>
+000000 00 00 00 00 00 00 00 00 ........
+000000 00 .  ACC= 0x00   0 .  B= 0x00   DPTR= 0x0000 @DPTR= 0x00   0 .
+000000 00 .  PSW= 0x00 CY=0 AC=0 OV=0 P=0
+   000000 02 01 60 LJMP  0160
+> </pre>
 
-Don't forget to enclose file name in quotes to make the parameter to
-be a string.
+<hr>
 
 
 <a name="info"><h3>info</h3></a>
@@ -266,34 +633,36 @@ This command prints out information about different things which must
 be specified as paramater to the command. Following subcommands are
 known:
 
-<p>info <a href="#info_bp">breakpoints</a>
-<br>info <a href="#info_reg">registers</a>
-<br>info <a href="#info_hw">hardware</a>
+<p>info <a href="#info_breakpoints">breakpoints</a>
+<br>info <a href="#info_registers">registers</a>
+<br>info <a href="#info_hardware">hardware</a>
+<br>info <a href="#info_stack">stack</a>
+<br>info <a href="#info_memory">memory</a>
 
+<blockquote>
 
-<a name="info_bp"><h4>info breakpoints</h4></a>
+<a name="info_breakpoints"><h4>info breakpoints</h4></a>
 
 This subcommand prints out information about breakpoints:
 
 <pre>
-> <font color="#118811">b 12</font>
+0> <font color="#118811">b 12</font>
 Breakpoint 1 at 0x00000c: MOV   R7,A
-> <font color="#118811">tb 43</font>
+0> <font color="#118811">tb 43</font>
 Breakpoint 2 at 0x00002b: MOV   R7,A
-> <font color="#118811">bse ws f 0x80</font>
-> <font color="#118811">i b</font>
+0> <font color="#118811">b sfr w 0x80</font>
+0> <font color="#118811">i b</font>
 Num Type       Disp Hit   Cnt   Address  What
 1   fetch      keep 1     1     0x00000c MOV   R7,A
 2   fetch      del  1     1     0x00002b MOV   R7,A
-1   event      keep 1     1     0x000080 ws
-> 
+3   event      keep 1     1     0x000080 write
+0
 </pre>
 
 As you see above, the command can be shortened to "i b". The list of
 breakpoints contains 7 columns:
 
-<dl><dt><b>Num</b> <dd>Number of the breakpoint. Normal and event
-breakpoints are numbered separately.
+<dl><dt><b>Num</b> <dd>Number of the breakpoint.
 
 <dt><b>Type</b> <dd>This column shows type of the breakpoint. It can
 be <i>fetch</i> for normal breakpoints or <i>event</i> for event
@@ -317,7 +686,10 @@ breakpoints it contains type of event.
 
 </dl>
 
-<a name="info_reg"><h4>info registers</h4></a>
+<hr>
+
+
+<a name="info_registers"><h4>info registers</h4></a>
 
 This subcommand prints out full register set of the CPU. Output of
 this command depends of type of CPU.
@@ -396,16 +768,68 @@ the status register too, and value of the stack pointer.
 <p>Following line shows indirect addressing registers X, Y, and Z as
 well as pointed memory values.
 
-<p>Last line is disassembled instruction ap PC.
+<p>Last line is disassembled instruction at PC.
 
-<a name="info_hw"><h4>info hardware|hw identifier</h4></a>
+<h5>Registers of Z80 family</h5>
+
+<pre>
+$ <font color="#118811">sz80</font>
+uCsim 0.5.0-pre3, 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.
+0> <font color="#118811">i r</font>
+SZ-A--P-C  Flags= 0x00   0 .  A= 0x00   0 .
+00-0--0-0
+BC= 0x0000 [BC]= 00   0 .  DE= 0x0000 [DE]= 00   0 .  HL= 0x0000 [HL]= 00   0 .
+IX= 0x0000 [IX]= 00   0 .  IY= 0x0000 [IY]= 00   0 .  SP= 0x0000 [SP]= 00   0 .
+ ? 0x0000 00          NOP
+0> 
+</pre>
+
+<h5>Registers of XA family</h5>
+
+<pre>
+$ <font color="#118811">sxa</font>
+uCsim 0.5.0-pre3, 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.
+The XA Simulator is in development, UNSTABLE, DEVELOPERS ONLY!
+0> <font color="#118811">i r</font>
+CA---VNZ | R0:0100 R1:0302 R2:0504 R3:0706
+00---000 | R4:0908 R5:0b0a R6:0d0c SP:0100 ES:0000  DS:0000
+ ? 0x0302 02 03             ADD   R0l,[R3]
+0> 
+</pre>
+
+<h5>Registers of HC08 family</h5>
+
+<pre>
+$ <font color="#118811">shc08</font>
+uCsim 0.5.0-pre3, 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.
+0> <font color="#118811">i r</font>
+V--HINZC  Flags= 0x60  96 `  A= 0x00   0 .
+0--00000      H= 0x00   0 .  X= 0x00   0 .
+SP= 0x00ff [SP+1]= 00   0 .
+ ? 0x0000 00 01 02    brset #0,*0x01,0x0005
+0> 
+</pre>
+
+<hr>
+
+
+<a name="info_hardware"><h4>info hardware|hw <i>identifier</i></h4></a>
 
 This subcommand prints out information about a unit of the
 controller. <b>identifier</b> specifies hardware element. One form of
 it is a name. Names of hardware elements can be checked by <a
 href="#conf">conf</a> command. This form is accepted only when name is
 unique. If more than one element exists with the same name then name
-must be followed by id number is squere brackets in same form as it is
+must be followed by id number in squere brackets in same form as it is
 listed by <a href="#conf">conf</a> command.
 
 <p>Ouput format of this command depends on CPU family and type of the
@@ -414,12 +838,12 @@ controller even in the same CPU family.
 
 <pre>
 $ <font color="#118811">s51 -t 51</font>
-ucsim 0.2.38-pre2, Copyright (C) 1997 Daniel Drotos, Talker Bt.
+ucsim 0.5.0-pre3, 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.
-> <font color="#118811">conf</font>
-ucsim version 0.2.38-pre2
+0> <font color="#118811">conf</font>
+ucsim version 0.5.0-pre3
 Type of microcontroller: 51 CMOS
 Controller has 8 hardware element(s).
   timer0[0]
@@ -430,325 +854,237 @@ Controller has 8 hardware element(s).
   port[2]
   port[3]
   irq[0]
-Memories:
-  ROM  size= 0x010000  65536 width=  8 class= "rom"
-  XRAM size= 0x010000  65536 width=  8 class= "xram"
-  IRAM size= 0x000100    256 width=  8 class= "iram"
-  SFR  size= 0x000100    256 width=  8 class= "sfr"
-> <font color="#118811">i h port[2]</font>
+  _51_dummy[0]
+0> <font color="#118811">i h port[2]</font>
 port[2]
 P2    11111111 0xff 255 . (Value in SFR register)
 Pin2  11111111 0xff 255 . (Output of outside circuits)
 Port2 11111111 0xff 255 . (Value on the port pins)
-> <font color="#118811">i h t[0]</font>
+0> <font color="#118811">i h t[0]</font>
 timer0[0] 0x0000 13 bit timer OFF irq=0 dis prio=0
-> <font color="#118811">i h u</font>
+0> <font color="#118811">i h u</font>
 uart[0] Shift, fixed clock MultiProc=none irq=dis prio=0
 Receiver OFF RB8=0 irq=0
 Transmitter TB8=0 irq=0
-> 
+0
 </pre>
 
 Timer #2 differs a little bit from other timers of MCS51:
 
 <pre>
 $ <font color="#118811">s51 -t 52</font>
-ucsim 0.2.38-pre2, Copyright (C) 1997 Daniel Drotos, Talker Bt.
+ucsim 0.5.0-pre3, 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.
-> <font color="#118811">i h timer0</font>
+0> <font color="#118811">i h timer0</font>
 timer0[0] 0x0000 13 bit timer OFF irq=0 dis prio=0
-> <font color="#118811">i h t[2]</font>
+0> <font color="#118811">i h t[2]</font>
 timer2[2] 0x0000 reload 0x0000 timer OFF irq=0 dis prio=0
-> 
+0
 </pre>
 
+<hr>
 
-<a name="timer"><h3>timer a|d|g|r|s|v id [value]</h3></a>
-
-Handling of timers. First parameter of timer command determines the
-operation which can be
-
-<dl><dt><b>add (or simply a)</b> <dd>to create a new timer. New timers
-are turned ON by default and initialized to value 0.
-
-<dt><b>del (or simply d)</b> <dd>to remove a timer if you don't need
-it any more.
-
-<dt><b>get (or simply g)</b> <dd>to get value of timers. See comment
-below.
-
-<dt><b>run (or simply r)</b> <dd>to turn a timer ON.
-
-<dt><b>stop (or simply s)</b> <dd>to turn a timer OFF. It still exist
-but doesn't count xtal periods.
-
-<dt><b>value (or simply v)</b> <dd>to set value of the timer (number
-of xtal periods). `param' is the new value.
 
-</dl>
+<a name="info_stack"><h4>info stack</h4></a>
 
-<b>id</b> can be a number or a string. Timers are numbered from 1. You
-can use any number greater than 0 to identify a timer. Or you can use
-a simbolic name, in this case simulator uses the first unused number
-to allocate a new timer:
+This command prints out information about data stored in the CPU's
+stack and operations which put them there.
 
 <pre>
-> <font color="#118811">tim a 3</font>
-> <font color="#118811">tim g 0</font>
-timer #0("time") ON: 0.463255 sec (5123232 clks)
-timer #0("isr") ON: 0.0051888 sec (57384 clks)
-timer #3("unnamed") ON: 0 sec (0 clks)
-> <font color="#118811">tim a "a"</font>
-> <font color="#118811">tim g 0</font>
-timer #0("time") ON: 0.463255 sec (5123232 clks)
-timer #0("isr") ON: 0.0051888 sec (57384 clks)
-timer #1("a") ON: 0 sec (0 clks)
-timer #3("unnamed") ON: 0 sec (0 clks)
-> 
+$ <font color="#118811">s51 ~/remo.hex</font>
+uCsim 0.5.0-pre3, 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 /home/staff/drdani/remo.hex
+0> <font color="#118811">set opt irq_stop true</font>
+0> <font color="#118811">r</font>
+Simulation started, PC=0x000000
+Stop at 0x000023: (2) Interrupt
+F 0x000023
+0> <font color="#118811">i s</font>
+OP   SP before-after   L DATA/ADDR   INSTRUCTION
+call 0x000022-0x000024 2 0x002976    0x022a 12 29 76 LCALL 2976
+call 0x000024-0x000026 2 0x002379    0x2976 12 23 79 LCALL 2379
+call 0x000026-0x000028 2 0x003612    0x2517 12 36 12 LCALL 3612
+intr 0x000028-0x00002a 2 0x000023    0x366f 20 0c 02 JB    21.4,3674
+0> 
 </pre>
 
-If you use 0 as timer id in "get" operation, simulator prints out
-value of all timers including predefined ones.
-
-
-<a name="set"><h3>set</h3></a>
-
-This command can be used to set various kind of things. It requires a
-subcommand to specify what is going to be set. Known subcommands are:
-
-<p>set <a href="#set_memory">memory</a>
-<br>set <a href="#set_bit">bit</a>
-<br>set <a href="#set_port">port</a>
-<br>set <a href="#set_option">option</a>
-
+First column shows the operation which can be <b>call</b> or
+<b>push</b> or <b>intr</b> (interrupt call). Next column contains
+value of the SP register before and after the operation. Column "L"
+shows size of the data, and the next column the data itself. Note,
+that for call operations (call, and intr) the <b>called</b> address is
+printed, not the pushed one! Last column is the instruction which has
+been executed when the operation occured.
 
-<a name="set_memory"><h4>set memory memory_type address
-data...</h4></a>
+<hr>
 
-This command can be used to modify content of any simulated
-memory. First parameter must be a class name to specify type of
-memory. Class names can de checked by <a
-href="cmd_general.html#conf">conf</a> command.
 
-<p>Second parameter specifies start address of the modification.
+<a name="info_memory"><h4>info memory</h4></a>
 
-<p>Remaining parameters will be written into the memory starting at
-address specified by second parameter. Data list can include numbers
-as well as strings. See <a href="syntax.html">syntax</a> for more
-details.
-q
-<p>Modified memory locations are dumped out.
+This command shows information about <a href="memory.html">memory
+system</a>: chips, address spaces and address decoders.
 
 <pre>
 $ <font color="#118811">s51</font>
-ucsim 0.2.38-pre2, Copyright (C) 1997 Daniel Drotos, Talker Bt.
-ucsim comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+uCsim 0.5.0-pre3, 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.
-> <font color="#118811">set mem x 1 "ab\tcd\0ef\012ghq" 2 "ABC"</font>
-0x0001 61 62 09 63 64 00 65 66 ab.cd.ef
-0x0009 0a 67 68 71 02 41 42 43 .ghq.ABC
-> <font color="#118811">set mem sfr pcon 0x34</font>
-0x87 34                      4
-> </pre>
-
+0> <font color="#118811">i m</font>
+Memory chips:
+  0x000000-0x010000    65536 rom_chip (8,%02x,0x%04x)
+  0x000000-0x000080      128 iram_chip (8,%02x,0x%02x)
+  0x000000-0x010000    65536 xram_chip (8,%02x,0x%04x)
+  0x000000-0x000080      128 sfr_chip (8,%02x,0x%02x)
+Address spaces:
+  0x000000-0x010000    65536 rom (8,%02x,0x%04x)
+  0x000000-0x000080      128 iram (8,%02x,0x%02x)
+  0x000080-0x000080      128 sfr (8,%02x,0x%02x)
+  0x000000-0x010000    65536 xram (8,%02x,0x%04x)
+Address decoders:
+ 0 rom 0x0000 0xffff -> rom_chip 0x0000 activated
+ 0 iram 0x00 0x7f -> iram_chip 0x00 activated
+ 0 sfr 0x80 0xff -> sfr_chip 0x00 activated
+ 0 xram 0x0000 0xffff -> xram_chip 0x0000 activated
+0> 
+</pre>
 
-<a name="set_bit"><h4>set bit address 0|1</h4></a>
+First column shows address ranges, next one is the size followed by
+the name of the memory. This name can be used in other commands (such
+as <a href="cmd_dump.html#dump">dump</a>, <a href="#set_memory">set
+memory</a>, etc.). Last column shows some technical information
+(width in bits, format specifier to print out content and address).
 
-Set one bit to 0 or 1. First parameter specifies the bit. It can be
-the address of the bit (number or syqmbolic name) or it can be
-specified in <i>address<b>.</b>bitnumber</i> format where
-<i>address</i> addresses SFR area and <i>bitnumber</i> is number of
-bit in specified SFR location. Using this syntax any SFR (and 8051's
-internal RAM) location can be modified it need not be really bit
-addressable.
+<p>Address decoders are associated with address spaces. Each address
+space has a list of decoders. First column of the address decoder
+information is the number of the decoder. Next three columns specifies
+name and area of the address space which is handled by the
+decoder. After "-&gt;" sign the name and the address of the memory
+chip is printed where the decoder maps the area of the address space.
 
-<p>Second parameter interpreted as 1 if it is not zero.
-
-<p>Modified memory location is dumped out.
+<p>Memory system of other controller family can be different.
 
 <pre>
-$ <font color="#118811">s51 </font>
-ucsim 0.2.38-pre2, Copyright (C) 1997 Daniel Drotos, Talker Bt.
-ucsim comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+$ <font color="#118811">savr</font>
+uCsim 0.5.0-pre3, 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.
-> <font color="#118811">set bit tf1 1</font>
-0x88 80 .
-> <font color="#118811">set bit 130 0</font>
-0x80 fb .
-> <font color="#118811">set bit pcon.2 1</font>
-0x87 04 .
-> <font color="#118811">set bit 10.7 1</font>
-0x0a 80 .
-> 
+0> <font color="#118811">i m</font>
+Memory chips:
+  0x000000-0x00ffff    65536 rom_chip (16,%04x,0x%04x)
+  0x000000-0x00007f      128 iram_chip (8,%02x,0x%02x)
+Address spaces:
+  0x000000-0x00ffff    65536 rom (16,%04x,0x%04x)
+  0x000000-0x00ffff    65536 iram (8,%02x,0x%04x)
+Address decoders:
+ 0 rom 0x0000 0xffff -> rom_chip 0x0000 activated
+ 0 iram 0x0000 0x007f -> iram_chip 0x00 activated
+0> 
 </pre>
 
+</blockquote>
 
-<a name="set_port"><h4>set port hardware_id data</h4></a>
+<hr>
 
-This command can be used to set value of external circuits which
-connected to ports of simulated controller. First parameter specifies
-port number. It can be an array which specifies a hardware element or
-simply a number.
 
-<pre>
-> <font color="#118811">set port 0 12</font>
-> <font color="#118811">i h po[0]</font>
-port[0]
-P0    11111111 0xff 255 . (Value in SFR register)
-Pin0  00001100 0x0c  12 . (Output of outside circuits)
-Port0 00001100 0x0c  12 . (Value on the port pins)
-> <font color="#118811">set port port[0] 23</font>
-> <font color="#118811">i h po[0]</font>
-port[0]
-P0    11111111 0xff 255 . (Value in SFR register)
-Pin0  00010111 0x17  23 . (Output of outside circuits)
-Port0 00010111 0x17  23 . (Value on the port pins)
-> </pre>
+<a name="timer"><h3>timer</i></h3></a>
 
+Handling of timers. Don't be confused! This command doesn't handle
+timer element of the controller. It manages "clock counters" which can
+be used to profile applications.
 
-<a name="set_option"><h4>set option name value</h4></a>
+<p>Known subcommands are:
 
-<p>Set option value. Options described at (<a
-href="#get_option"><b>get option</b></a>) command can be set using
-this command. First parameter must be an option name and second the
-new value. Interpretation of the value depends on type of the
-option. Value for a boolean type of option interpreted as follows: if
-first character of the value is one of <tt>1</tt>, <tt>t</tt>,
-<tt>T</tt>, <tt>y</tt>, <tt>Y</tt> then value will be TRUE otherwise
-it will be FALSE.
+<p>timer <a href="#timer_add">add</a>
+<br>timer <a href="#timer_delete">delete</a>
+<br>timer <a href="#timer_get">get</a>
+<br>timer <a href="#timer_start">start</a>
+<br>timer <a href="#timer_stop">stop</a>
+<br>timer <a href="#timer_set">set</a>
 
-<pre>
-$ <font color="#118811">s51 -V</font>
-ucsim 0.2.38, 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.
-> <font color="#118811">get opt</font>
-verbose TRUE Verbose flag.
-stopit FALSE Stop if interrupt accepted.
-debug FALSE Debug messages appears on this console.
-> <font color="#118811">set opt debug t</font>
-> <font color="#118811">get opt</font>
-verbose TRUE Verbose flag.
-stopit FALSE Stop if interrupt accepted.
-debug TRUE Debug messages appears on this console.
-> </pre>
+<p>Each subcommand can (some must) be followed by a timer id which can be
+a number or a string. Timers are numbered from 1. You can use any
+number greater than 0 to identify a timer. Or you can use a simbolic
+name, in this case simulator uses the first unused number to allocate
+a new timer.
 
+<blockquote>
 
-<a name="get"><h3>get</h3></a>
+<a name="timer_add"><h4>timer add|create|make <i>id [direction
+[in_isr]]</i></h4></a>
 
-This command can be used to get value of various kind of things. It
-requires a subcommand to specify what is going to be set. Known
-subcommands are:
+To create a new timer. New timers are turned ON by default and
+initialized to value 0. <b>Direction</b> is an integer (can be
+positive or negative) number which is added to the actual value in
+every step. If <b>in_isr</b> is TRUE the timer counts only when
+execution is in an interrupt handler.
 
-<p>get <a href="#get_sfr">sfr</a>
-<br>get <a href="#get_option">option</a>
+<hr>
 
 
-<a name="get_sfr"><h4>get sfr address...</h4></a>
+<a name="timer_delete"><h4>timer delete|remove <i>id</i></h4></a>
 
-This command can be used to check values of SFR location(s) if SFR
-exists in simulated memory. Note that <a
-href="cmd_dump.html#dump_memory">dump memory</a> or <a
-href="cmd_dump.html#ds">ds</a> can be used as well.
+To remove a timer if you don't need it any more.
 
-<p>Parameters are interpreted as SFR names or addresses and values of
-addressed locations are dumped out.
+<hr>
 
-<pre>
-$ <font color="#118811">s51 </font>
-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.
-> <font color="#118811">get sfr pcon p1 0 0x80 kahd scon</font>
-0x87 00 .
-0x90 ff .
-0x00 00 .
-0x80 ff .
-Warning: Invalid address kahd
-0x98 00 .
-> </pre>
 
+<a name="timer_get"><h4>timer get <i>[id]</i></h4></a>
 
-<a name="get_option"><h4>get option name</h4></a>
+To get value of timers. If you don't use timer id in this command
+simulator prints out value of all timers including predefined
+ones. See example below.
 
-Get actual value of option(s). Some options can be set by <a
-href="#set_option"><b>set option</b></a> to modify behavior of the
-simulator. Using <b>get option</b> you can get actual value of these
-options. If you use this command without parameter you get list of all
-options known by the program. In this way you can figure out which
-options can be used.
+<hr>
 
-<pre>
-$ <font color="#118811">s51 -V</font>
-ucsim 0.2.38, 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.
-> <font color="#118811">get opt</font>
-verbose TRUE Verbose flag.
-stopit FALSE Stop if interrupt accepted.
-debug FALSE Debug flag.
-> <font color="#118811">get opt stopit</font>
-stopit FALSE Stop if interrupt accepted.
-> </pre>
 
-This version of the simulator knows about three options. First element
-of the list is name of the option (<b>verbose</b>, <b>debug</b> and
-<b>stopit</b>). This name can be used to identify the option in
-<b>gopt</b> and <a href="#set_option"><b>set option</b></a>
-command. Second element of the list is the value of the option. In
-this case type of both options is boolean, their value can be TRUE or
-FALSE. Third element is a short description of the option.
+<a name="timer_start"><h4>timer start|run <i>id</i></h4></a>
 
-<dl><dt><b>verbose</b> <dd>?
+To turn a timer ON.
 
-<dt><b>debug</b> <dd>Debug flag can be set by <b>-V</b> option of the
-program to TRUE otherwise its default value is FALSE. If it is TRUE,
-the simulator prints out short messages about important events.
+<hr>
 
-<dt><b>stopit</b> <dd>Setting this option to TRUE (default value is
-FALSE) forces execution to stop every time when CPU accepts an
-interrupt. You do not have to use breakpoints to inspect interrupts.
 
-</dl>
+<a name="timer_stop"><h4>timer stop <i>id</i></h4></a>
+
+To turn a timer OFF. It still exist but doesn't count xtal periods.
 
+<hr>
 
-<a name="fill"><h3>fill memory_type start end data</h3></a>
 
-Fill memory region with specified data. First parameter specifies
-memory. Class name of the memory must be used, it can be checked using
-<a href="cmd_general.html#conf">conf</a> command which lists size and
-class name of all available memories.
+<a name="timer_set"><h4>timer set|value <i>id value</i></h4></a>
 
-<p><b>start</b> and <b>end</b> parameters specify first and last
-address of the memory region to be filled.
+To set value of the timer (number of xtal periods). <b>value</b> is
+the new value.
 
-<p><b>data</b> parameter specifies the data which is used to fill the
-memory region.
 
 <pre>
-$ <font color="#118811">s51</font> 
-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.
-> <font color="#118811">fill x 12 0x12 0x56</font>
-> <font color="#118811">dump x 0 0x20</font>
-0x0000 00 00 00 00 00 00 00 00 ........
-0x0008 00 00 00 00 56 56 56 56 ....VVVV
-0x0010 56 56 56 00 00 00 00 00 VVV.....
-0x0018 00 00 00 00 00 00 00 00 ........
-0x0020 00                      .
-> </pre>
+0> <font color="#118811">tim a 3</font>
+0> <font color="#118811">tim g</font>
+timer #0("time") ON: 0.463255 sec (5123232 clks)
+timer #0("isr") ON: 0.0051888 sec (57384 clks)
+timer #0("idle") ON,ISR: 0 sec (0 clks)
+timer #3("unnamed") ON: 0 sec (0 clks)
+0> <font color="#118811">tim a "a"</font>
+0> <font color="#118811">tim g</font>
+timer #0("time") ON: 0.463255 sec (5123232 clks)
+timer #0("isr") ON: 0.0051888 sec (57384 clks)
+timer #0("idle") ON,ISR: 0 sec (0 clks)
+timer #1("a") ON: 0 sec (0 clks)
+timer #3("unnamed") ON: 0 sec (0 clks)
+0> 
+</pre>
 
+</blockquote>
 
 <hr>
 
+
 </body>
 </html>