3 <title>General commands of uCsim</title>
8 <h2>General commands of uCsim</h2>
11 <p>Every command which changes content of ROM area such as <b><a
12 href="#dl">dl</a></b> or <b><a href="cmd_set#set_memory">set
13 memory</a></b> deletes result of code analyzer and causes to
17 <a name="show"><h3>show</h3></a>
19 Show command can be used to display different kind of information. It
20 must be followed by a subcommand. Subcommands are:
22 <p>show <a href="#show_copying">copying</a>
23 <br>show <a href="#show_warranty">warranty</a>
26 <a name="show_copying"><h4>show copying</h4></a>
28 This command can be used to list licensing information. It is first 10
29 point of the version 2 of GNU Genral Public License. If you do not
30 accept GPL simply do not use the program.
33 <a name="show_warranty"><h4>show warranty</h4></a>
35 This command prints out last 2 point of the license ("NO WARRANTY"
39 <a name="dl"><h3>download,dl</h3></a>
41 Download command. It is same as <a href="#l">load</a> above but it
42 reads information from command console which is standard input by
43 default. This command stops read records when it detects an "END"
44 record which is normaly the last record. This command has two
45 equivalent forms <b>download</b> and <b>dl</b>.
48 $ <font color="#118811">s51 -V</font>
49 ucsim 0.2.24, Copyright (C) 1997 Daniel Drotos, Talker Bt.
50 ucsim comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
51 This is free software, and you are welcome to redistribute it
52 under certain conditions; type `show c' for details.
53 > <font color="#118811">do
55 :1000030075812078207600D8FC900000AE83AF8203
56 :100013009000001200416005E4F0A380F690009F79
57 :1000230012004A9000A312004A9000A712006890A1
58 :1000330000AD12006875D0001200B50200B3EF6581
59 :10004300827003EE658322E493F8740193F97402DA
60 :1000530093FE740393F5828E83E869700122E4931F
61 :10006300F6A30880F4E493FC740193FD740293FEF9
62 :10007300740393FF740493F8740593F582888312D1
63 :100083000041700122E493A3A883A9828C838D820B
64 :10009300F0A3AC83AD828883898280E3212100B5FC
65 :1000A300212100B5000000B500B5000000B500B582
67 :1000B5007520117501AA850120750102850120228F
73 <a name="q"><h3>quit</h3></a>
75 Quit. This command terminates actual console, it does not ask you to
76 confirm your intention. Simulator always reads commands from a file so
77 end of file condition finishes too. If command console is on standard
78 input/output, pressing the CTRL-D will quit just like the quit
81 <p>Note that if <a href="invoke.html#Zoption">-Z option</a> was used at
82 invokation then the quit command does not terminate the simulator
83 program. In this case <a href="#kill">kill</a> command can be used to
84 terminate the simulator. See for more information about <a
85 href="mulcons.html">using multiple consoles</a>.
87 <pre>$ <font color="#118811">s51</font>
88 ucsim 0.2.24, Copyright (C) 1997 Daniel Drotos, Talker Bt.
89 ucsim comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
90 This is free software, and you are welcome to redistribute it
91 under certain conditions; type `show c' for details.
92 > <font color="#118811">q</font>
96 <a name="kill"><h3>kill</h3></a>
98 This kommand terminates the simulator. It does not ask for
99 confirmation. It doesn't matter how many consoles are used and what
100 commands are running on them.
103 <a name="h"><h3>?,help [command]</h3></a>
105 Help command. It prints out short description of the commands.
107 <p>If a command name is given as parameter then uCsim prints out all
108 command that has the same name.
110 <p>If parameter is unique name of a command then long description of
111 the command is printed out.
114 <a name="reset"><h3>reset</h3></a>
116 Reset command. It resets the microcontroller. It has same effect as
117 active signal on the RST pin.
120 $ <font color="#118811">s51 -V remoansi.hex</font>
121 ucsim 0.2.24, Copyright (C) 1997 Daniel Drotos, Talker Bt.
122 ucsim comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
123 This is free software, and you are welcome to redistribute it
124 under certain conditions; type `show c' for details.
125 58659 bytes read from remoansi.hex
126 > <font color="#118811">dr</font>
127 000000 00 00 00 00 00 00 00 00 ........
128 000000 00 . ACC= 0x00 0 . B= 0x00 DPTR= 0x0000 @DPTR= 0x00 0 .
129 000000 00 . PSW= 0x00 CY=0 AC=0 OV=0 P=0
130 000000 02 01 60 LJMP 0160
131 > <font color="#118811">s 2</font>
132 000000 00 00 00 00 00 00 00 00 ........
133 000000 00 . ACC= 0x00 0 . B= 0x00 DPTR= 0x0000 @DPTR= 0x00 0 .
134 000000 00 . PSW= 0x00 CY=0 AC=0 OV=0 P=0
135 000160 c2 90 CLR P1.0
136 000000 00 00 00 00 00 00 00 00 ........
137 000000 00 . ACC= 0x00 0 . B= 0x00 DPTR= 0x0000 @DPTR= 0x00 0 .
138 000000 00 . PSW= 0x00 CY=0 AC=0 OV=0 P=0
139 000162 c2 97 CLR P1.7
140 > <font color="#118811">res</font>
141 > <font color="#118811">dr</font>
142 000000 00 00 00 00 00 00 00 00 ........
143 000000 00 . ACC= 0x00 0 . B= 0x00 DPTR= 0x0000 @DPTR= 0x00 0 .
144 000000 00 . PSW= 0x00 CY=0 AC=0 OV=0 P=0
145 000000 02 01 60 LJMP 0160
149 <a name="where"><h3>where,Where memory_type data...</h3></a>
151 Searching for some data in memory. First parameter specifies
152 memory. Class name of the memory must be used, it can be checked using
153 <a href="cmd_general.html#conf">conf</a> command which lists size and
154 class name of all available memories.
156 <p>Other parameters can be mixed list of strings (characters between "
157 and ") and numbers. Strings can contain escape sequencies. Ucsim
158 merges all parameters together and will search for megred list of
159 values in specified memory.
161 <p><b>where</b> command do case unsensitive search while <b>Where</b>
162 command is for case sensitive search.
164 <p>Search is done in whole memory and all matches are dumped out.
167 $ <font color="#118811">/s51</font>
168 ucsim 0.2.38-pre2, Copyright (C) 1997 Daniel Drotos, Talker Bt.
169 ucsim comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
170 This is free software, and you are welcome to redistribute it
171 under certain conditions; type `show c' for details.
172 > <font color="#118811">set mem x 20 "Dani d ani D ani dani Dani"</font>
173 0x0014 44 61 6e 69 20 64 20 61 Dani d a
174 0x001c 6e 69 20 44 20 61 6e 69 ni D ani
175 0x0024 20 64 61 6e 69 20 44 61 dani Da
177 > <font color="#118811">where x "dani"</font>
178 0x0014 44 61 6e 69 Dani
179 0x0025 64 61 6e 69 dani
180 0x002a 44 61 6e 69 Dani
181 > <font color="#118811">Where x "d ani"</font>
182 0x0019 64 20 61 6e 69 d ani
186 <a name="conf"><h3>conf</h3></a>
188 This command prints out configuration of the simulator:
191 > <font color="#118811">conf</font>
193 Type of microcontroller: 51 CMOS
194 Controller has 8 hardware element(s).
204 ROM size= 0x010000 65536 width= 8 class= "rom"
205 XRAM size= 0x010000 65536 width= 8 class= "xram"
206 IRAM size= 0x000100 256 width= 8 class= "iram"
207 SFR size= 0x000100 256 width= 8 class= "sfr"
211 First line contains version number of the program. Second line informs
212 about type of the simulated microcontroller. Third line prints out how
213 many hardware elements are simulated. Following lines contain
214 information about memories. Note that size of the simulated memory
215 segment can be bigger than size of addressable part of the memory as
216 you see above SFR type of the memory has bigger simulated than
220 <a name="state"><h3>state</h3></a>
222 State of the simulator and the simulated microcontroller:
225 > <font color="#118811">state</font>
226 CPU state= OK PC= 0x004349 XTAL= 1.10592e+07
227 Total time since last reset= 0.614873 sec (6800004 clks)
228 Time in isr = 0.0144227 sec (159504 clks) 2.3%
229 Time in idle= 0 sec (0 clks) 0%
230 Max value of stack pointer= 0x000049, avg= 0x000026
234 The "CPU state" in the first line is an internal information. PC is
235 value of the program counter. First line shows XTAL frequency too.
237 <p>Following lines contain information about simulated time. First,
238 full simulated time (elapsed from last reset) is printed out in
239 seconds and number of clock periods then same data is printed out
240 about time spent in interrupt service routines as well as in idle
241 mode. Last data in lines of ISR and IDLE time shows ratio of ISRs,
242 Idle times and main program.
244 <p>Last line infroms about maximum value of the stack pointer and a
245 "not very well" calculated average value of it.
248 <a name="file"><h3>file,load "FILE"</h3></a>
250 Loads file named FILE into the simulated code memory. File must
251 contain data in Intel HEX format.
254 > <font color="#118811">file "../../remo.hex"</font>
255 55470 words read from ../../remo.hex
259 Don't forget to enclose file name in quotes to make the parameter to
263 <a name="info"><h3>info</h3></a>
265 This command prints out information about different things which must
266 be specified as paramater to the command. Following subcommands are
269 <p>info <a href="#info_bp">breakpoints</a>
270 <br>info <a href="#info_reg">registers</a>
271 <br>info <a href="#info_hw">hardware</a>
274 <a name="info_bp"><h4>info breakpoints</h4></a>
276 This subcommand prints out information about breakpoints:
279 > <font color="#118811">b 12</font>
280 Breakpoint 1 at 0x00000c: MOV R7,A
281 > <font color="#118811">tb 43</font>
282 Breakpoint 2 at 0x00002b: MOV R7,A
283 > <font color="#118811">bse ws f 0x80</font>
284 > <font color="#118811">i b</font>
285 Num Type Disp Hit Cnt Address What
286 1 fetch keep 1 1 0x00000c MOV R7,A
287 2 fetch del 1 1 0x00002b MOV R7,A
288 1 event keep 1 1 0x000080 ws
292 As you see above, the command can be shortened to "i b". The list of
293 breakpoints contains 7 columns:
295 <dl><dt><b>Num</b> <dd>Number of the breakpoint. Normal and event
296 breakpoints are numbered separately.
298 <dt><b>Type</b> <dd>This column shows type of the breakpoint. It can
299 be <i>fetch</i> for normal breakpoints or <i>event</i> for event
300 breakpoints. First the normal breakpoints are listed and then the
303 <dt><b>Disp</b> <dd>This shows if the breakpoint is temporary
304 (<i>del</i>) or not (<i>keep</i>).
306 <dt><b>Hit</b> <dd>How many times the breakpoint must be hit before it
307 really stops the program.
309 <dt><b>Cnt</b> <dd>Counter of breakpint hits. This counter decrements
310 and the breakpoint is activated if it reaches zero.
312 <dt><b>Address</b> <dd>Address where the breakpoint is set.
314 <dt><b>What</b> <dd>For normal breakpoints this field contains
315 disassembled instruction where the breakpoint is set. For event
316 breakpoints it contains type of event.
320 <a name="info_reg"><h4>info registers</h4></a>
322 This subcommand prints out full register set of the CPU. Output of
323 this command depends of type of CPU.
325 <h5>Registers of MCS51 family</h5>
328 $ <font color="#118811">s51 remoansi.hex</font>
329 ucsim 0.2.12, Copyright (C) 1997 Daniel Drotos, Talker Bt.
330 ucsim comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
331 This is free software, and you are welcome to redistribute it
332 under certain conditions; type `show c' for details.
333 58659 bytes read from remoansi.hex
334 > <font color="#118811">sopt stopit 1</font>
335 > <font color="#118811">g</font>
337 * 000023 02 01 1c LJMP 011c
338 > <font color="#118811">i r</font>
339 000000 18 02 16 ba 00 02 00 0a ........
340 000018 4a J ACC= 0x0a 10 . B= 0x00 DPTR= 0x16ba @DPTR= 0x00 0 .
341 000002 16 . PSW= 0x00 CY=0 AC=0 OV=0 P=0
342 * 000023 02 01 1c LJMP 011c
345 In first line the actual register bank is dumped out. Register banks
346 reside in internal RAM, address at the begining of the line shows
347 start address of actual register bank selected by RS0 and RS1 bits of
350 <p>Next two lines begin with value of indirectly addressed internal
351 RAM cells. Second line shows IRAM cell pointed by R0 while third line
352 shows IRAM addressed by R1.
354 <p>Second line displays some important registers. First one is the
355 accumulator. Its value dumped out in hexadecimal, decimal form and
356 then the ASCII character of its value. It is followed by value of the
357 B register which is dumped out in hexadecimal form only. Next is DPTR
358 register in hexadecimal and then external RAM cell which is addressed
359 by DPTR. This is dumped out in hexadecimal, decimal and ASCII too.
361 <p>In third line you find program status word in hexadecimal and then
362 some flag bits of PSW register. Last line is disassembled instruction
365 <h5>Registers of AVR family</h5>
368 $ <font color="#118811">savr test_arith.hex</font>
369 ucsim 0.2.37, Copyright (C) 1997 Daniel Drotos, Talker Bt.
370 ucsim comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
371 This is free software, and you are welcome to redistribute it
372 under certain conditions; type `show c' for details.
373 > 83 words read from test_arith.hex
374 83 words read from test_arith.hex
375 > <font color="#118811">run</font>
377 Stop at 0x000047: (105) User stopped
379 > <font color="#118811">i r</font>
380 000000 00 2c 21 23 20 35 19 14 03 00 00 00 00 00 00 00 .,!# 5..........
381 000010 00 01 1e 89 01 00 10 e2 14 00 01 10 00 00 00 00 ................
382 ITHSVNZC SREG= 0x03 3 .
383 00000011 SP = 0x000000
384 X= 0x1001 [X]= 0x00 0 . Y= 0x0000 [Y]= 0x00 0 . Z= 0x0000 [Z]= 0x00 0 .
385 * 000047 940c 0047 jmp 0x000047
389 First two lines show first 32 bytes of internal RAM which is the
390 register set of AVR controllers.
392 <p>At the beginning of next two lines bits of status register are
393 printed. These lines present hexadecimal, decimal and ASCII values of
394 the status register too, and value of the stack pointer.
396 <p>Following line shows indirect addressing registers X, Y, and Z as
397 well as pointed memory values.
399 <p>Last line is disassembled instruction ap PC.
401 <a name="info_hw"><h4>info hardware|hw identifier</h4></a>
403 This subcommand prints out information about a unit of the
404 controller. <b>identifier</b> specifies hardware element. One form of
405 it is a name. Names of hardware elements can be checked by <a
406 href="#conf">conf</a> command. This form is accepted only when name is
407 unique. If more than one element exists with the same name then name
408 must be followed by id number is squere brackets in same form as it is
409 listed by <a href="#conf">conf</a> command.
411 <p>Ouput format of this command depends on CPU family and type of the
412 CPU too because requested unit can be different in different type of
413 controller even in the same CPU family.
416 $ <font color="#118811">s51 -t 51</font>
417 ucsim 0.2.38-pre2, Copyright (C) 1997 Daniel Drotos, Talker Bt.
418 ucsim comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
419 This is free software, and you are welcome to redistribute it
420 under certain conditions; type `show c' for details.
421 > <font color="#118811">conf</font>
422 ucsim version 0.2.38-pre2
423 Type of microcontroller: 51 CMOS
424 Controller has 8 hardware element(s).
434 ROM size= 0x010000 65536 width= 8 class= "rom"
435 XRAM size= 0x010000 65536 width= 8 class= "xram"
436 IRAM size= 0x000100 256 width= 8 class= "iram"
437 SFR size= 0x000100 256 width= 8 class= "sfr"
438 > <font color="#118811">i h port[2]</font>
440 P2 11111111 0xff 255 . (Value in SFR register)
441 Pin2 11111111 0xff 255 . (Output of outside circuits)
442 Port2 11111111 0xff 255 . (Value on the port pins)
443 > <font color="#118811">i h t[0]</font>
444 timer0[0] 0x0000 13 bit timer OFF irq=0 dis prio=0
445 > <font color="#118811">i h u</font>
446 uart[0] Shift, fixed clock MultiProc=none irq=dis prio=0
447 Receiver OFF RB8=0 irq=0
448 Transmitter TB8=0 irq=0
452 Timer #2 differs a little bit from other timers of MCS51:
455 $ <font color="#118811">s51 -t 52</font>
456 ucsim 0.2.38-pre2, Copyright (C) 1997 Daniel Drotos, Talker Bt.
457 ucsim comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
458 This is free software, and you are welcome to redistribute it
459 under certain conditions; type `show c' for details.
460 > <font color="#118811">i h timer0</font>
461 timer0[0] 0x0000 13 bit timer OFF irq=0 dis prio=0
462 > <font color="#118811">i h t[2]</font>
463 timer2[2] 0x0000 reload 0x0000 timer OFF irq=0 dis prio=0
468 <a name="timer"><h3>timer a|d|g|r|s|v id [value]</h3></a>
470 Handling of timers. First parameter of timer command determines the
471 operation which can be
473 <dl><dt><b>add (or simply a)</b> <dd>to create a new timer. New timers
474 are turned ON by default and initialized to value 0.
476 <dt><b>del (or simply d)</b> <dd>to remove a timer if you don't need
479 <dt><b>get (or simply g)</b> <dd>to get value of timers. See comment
482 <dt><b>run (or simply r)</b> <dd>to turn a timer ON.
484 <dt><b>stop (or simply s)</b> <dd>to turn a timer OFF. It still exist
485 but doesn't count xtal periods.
487 <dt><b>value (or simply v)</b> <dd>to set value of the timer (number
488 of xtal periods). `param' is the new value.
492 <b>id</b> can be a number or a string. Timers are numbered from 1. You
493 can use any number greater than 0 to identify a timer. Or you can use
494 a simbolic name, in this case simulator uses the first unused number
495 to allocate a new timer:
498 > <font color="#118811">tim a 3</font>
499 > <font color="#118811">tim g 0</font>
500 timer #0("time") ON: 0.463255 sec (5123232 clks)
501 timer #0("isr") ON: 0.0051888 sec (57384 clks)
502 timer #3("unnamed") ON: 0 sec (0 clks)
503 > <font color="#118811">tim a "a"</font>
504 > <font color="#118811">tim g 0</font>
505 timer #0("time") ON: 0.463255 sec (5123232 clks)
506 timer #0("isr") ON: 0.0051888 sec (57384 clks)
507 timer #1("a") ON: 0 sec (0 clks)
508 timer #3("unnamed") ON: 0 sec (0 clks)
512 If you use 0 as timer id in "get" operation, simulator prints out
513 value of all timers including predefined ones.
516 <a name="set"><h3>set</h3></a>
518 This command can be used to set various kind of things. It requires a
519 subcommand to specify what is going to be set. Known subcommands are:
521 <p>set <a href="#set_memory">memory</a>
522 <br>set <a href="#set_bit">bit</a>
523 <br>set <a href="#set_port">port</a>
524 <br>set <a href="#set_option">option</a>
527 <a name="set_memory"><h4>set memory memory_type address
530 This command can be used to modify content of any simulated
531 memory. First parameter must be a class name to specify type of
532 memory. Class names can de checked by <a
533 href="cmd_general.html#conf">conf</a> command.
535 <p>Second parameter specifies start address of the modification.
537 <p>Remaining parameters will be written into the memory starting at
538 address specified by second parameter. Data list can include numbers
539 as well as strings. See <a href="syntax.html">syntax</a> for more
542 <p>Modified memory locations are dumped out.
545 $ <font color="#118811">s51</font>
546 ucsim 0.2.38-pre2, Copyright (C) 1997 Daniel Drotos, Talker Bt.
547 ucsim comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
548 This is free software, and you are welcome to redistribute it
549 under certain conditions; type `show c' for details.
550 > <font color="#118811">set mem x 1 "ab\tcd\0ef\012ghq" 2 "ABC"</font>
551 0x0001 61 62 09 63 64 00 65 66 ab.cd.ef
552 0x0009 0a 67 68 71 02 41 42 43 .ghq.ABC
553 > <font color="#118811">set mem sfr pcon 0x34</font>
558 <a name="set_bit"><h4>set bit address 0|1</h4></a>
560 Set one bit to 0 or 1. First parameter specifies the bit. It can be
561 the address of the bit (number or syqmbolic name) or it can be
562 specified in <i>address<b>.</b>bitnumber</i> format where
563 <i>address</i> addresses SFR area and <i>bitnumber</i> is number of
564 bit in specified SFR location. Using this syntax any SFR (and 8051's
565 internal RAM) location can be modified it need not be really bit
568 <p>Second parameter interpreted as 1 if it is not zero.
570 <p>Modified memory location is dumped out.
573 $ <font color="#118811">s51 </font>
574 ucsim 0.2.38-pre2, Copyright (C) 1997 Daniel Drotos, Talker Bt.
575 ucsim comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
576 This is free software, and you are welcome to redistribute it
577 under certain conditions; type `show c' for details.
578 > <font color="#118811">set bit tf1 1</font>
580 > <font color="#118811">set bit 130 0</font>
582 > <font color="#118811">set bit pcon.2 1</font>
584 > <font color="#118811">set bit 10.7 1</font>
590 <a name="set_port"><h4>set port hardware_id data</h4></a>
592 This command can be used to set value of external circuits which
593 connected to ports of simulated controller. First parameter specifies
594 port number. It can be an array which specifies a hardware element or
598 > <font color="#118811">set port 0 12</font>
599 > <font color="#118811">i h po[0]</font>
601 P0 11111111 0xff 255 . (Value in SFR register)
602 Pin0 00001100 0x0c 12 . (Output of outside circuits)
603 Port0 00001100 0x0c 12 . (Value on the port pins)
604 > <font color="#118811">set port port[0] 23</font>
605 > <font color="#118811">i h po[0]</font>
607 P0 11111111 0xff 255 . (Value in SFR register)
608 Pin0 00010111 0x17 23 . (Output of outside circuits)
609 Port0 00010111 0x17 23 . (Value on the port pins)
613 <a name="set_option"><h4>set option name value</h4></a>
615 <p>Set option value. Options described at (<a
616 href="#get_option"><b>get option</b></a>) command can be set using
617 this command. First parameter must be an option name and second the
618 new value. Interpretation of the value depends on type of the
619 option. Value for a boolean type of option interpreted as follows: if
620 first character of the value is one of <tt>1</tt>, <tt>t</tt>,
621 <tt>T</tt>, <tt>y</tt>, <tt>Y</tt> then value will be TRUE otherwise
625 $ <font color="#118811">s51 -V</font>
626 ucsim 0.2.38, Copyright (C) 1997 Daniel Drotos, Talker Bt.
627 ucsim comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
628 This is free software, and you are welcome to redistribute it
629 under certain conditions; type `show c' for details.
630 > <font color="#118811">get opt</font>
631 verbose TRUE Verbose flag.
632 stopit FALSE Stop if interrupt accepted.
633 debug FALSE Debug messages appears on this console.
634 > <font color="#118811">set opt debug t</font>
635 > <font color="#118811">get opt</font>
636 verbose TRUE Verbose flag.
637 stopit FALSE Stop if interrupt accepted.
638 debug TRUE Debug messages appears on this console.
642 <a name="get"><h3>get</h3></a>
644 This command can be used to get value of various kind of things. It
645 requires a subcommand to specify what is going to be set. Known
648 <p>get <a href="#get_sfr">sfr</a>
649 <br>get <a href="#get_option">option</a>
652 <a name="get_sfr"><h4>get sfr address...</h4></a>
654 This command can be used to check values of SFR location(s) if SFR
655 exists in simulated memory. Note that <a
656 href="cmd_dump.html#dump_memory">dump memory</a> or <a
657 href="cmd_dump.html#ds">ds</a> can be used as well.
659 <p>Parameters are interpreted as SFR names or addresses and values of
660 addressed locations are dumped out.
663 $ <font color="#118811">s51 </font>
664 ucsim 0.2.38-pre2, Copyright (C) 1997 Daniel Drotos, Talker Bt.
665 ucsim comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
666 This is free software, and you are welcome to redistribute it
667 under certain conditions; type `show c' for details.
668 > <font color="#118811">get sfr pcon p1 0 0x80 kahd scon</font>
673 Warning: Invalid address kahd
678 <a name="get_option"><h4>get option name</h4></a>
680 Get actual value of option(s). Some options can be set by <a
681 href="#set_option"><b>set option</b></a> to modify behavior of the
682 simulator. Using <b>get option</b> you can get actual value of these
683 options. If you use this command without parameter you get list of all
684 options known by the program. In this way you can figure out which
688 $ <font color="#118811">s51 -V</font>
689 ucsim 0.2.38, Copyright (C) 1997 Daniel Drotos, Talker Bt.
690 ucsim comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
691 This is free software, and you are welcome to redistribute it
692 under certain conditions; type `show c' for details.
693 > <font color="#118811">get opt</font>
694 verbose TRUE Verbose flag.
695 stopit FALSE Stop if interrupt accepted.
696 debug FALSE Debug flag.
697 > <font color="#118811">get opt stopit</font>
698 stopit FALSE Stop if interrupt accepted.
701 This version of the simulator knows about three options. First element
702 of the list is name of the option (<b>verbose</b>, <b>debug</b> and
703 <b>stopit</b>). This name can be used to identify the option in
704 <b>gopt</b> and <a href="#set_option"><b>set option</b></a>
705 command. Second element of the list is the value of the option. In
706 this case type of both options is boolean, their value can be TRUE or
707 FALSE. Third element is a short description of the option.
709 <dl><dt><b>verbose</b> <dd>?
711 <dt><b>debug</b> <dd>Debug flag can be set by <b>-V</b> option of the
712 program to TRUE otherwise its default value is FALSE. If it is TRUE,
713 the simulator prints out short messages about important events.
715 <dt><b>stopit</b> <dd>Setting this option to TRUE (default value is
716 FALSE) forces execution to stop every time when CPU accepts an
717 interrupt. You do not have to use breakpoints to inspect interrupts.
722 <a name="fill"><h3>fill memory_type start end data</h3></a>
724 Fill memory region with specified data. First parameter specifies
725 memory. Class name of the memory must be used, it can be checked using
726 <a href="cmd_general.html#conf">conf</a> command which lists size and
727 class name of all available memories.
729 <p><b>start</b> and <b>end</b> parameters specify first and last
730 address of the memory region to be filled.
732 <p><b>data</b> parameter specifies the data which is used to fill the
736 $ <font color="#118811">s51</font>
737 ucsim 0.2.38-pre2, Copyright (C) 1997 Daniel Drotos, Talker Bt.
738 ucsim comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
739 This is free software, and you are welcome to redistribute it
740 under certain conditions; type `show c' for details.
741 > <font color="#118811">fill x 12 0x12 0x56</font>
742 > <font color="#118811">dump x 0 0x20</font>
743 0x0000 00 00 00 00 00 00 00 00 ........
744 0x0008 00 00 00 00 56 56 56 56 ....VVVV
745 0x0010 56 56 56 00 00 00 00 00 VVV.....
746 0x0018 00 00 00 00 00 00 00 00 ........