ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/mon/README
(Generate patch)

Comparing mon/README (file contents):
Revision 1.8 by cebix, 2000-10-15T15:07:09Z vs.
Revision 1.9 by cebix, 2000-10-18T00:50:00Z

# Line 391 | Line 391 | Load a BeBox boot ROM image and start di
391    d 100
392  
393  
394 + Using cxmon in your own programs
395 + --------------------------------
396 +
397 + cxmon provides a simple interface for integration in other programs. It can,
398 + for example, be used as a monitor/debugger for an emulator (it is used in
399 + Basilisk II in this way).
400 +
401 + Here's how to do it (all functions are defined in the mon.h header file):
402 +
403 + 1. Link all the cxmon object files, except main.o, to your program.
404 + 2. In your program, call mon_init() before using any other cxmon functions.
405 + 3. After calling mon_init(), set the mon_read_byte and mon_write_byte
406 +    function pointers to the routines used for accessing memory.
407 + 4. You can use mon_add_command() to add new commands to cxmon by specifying
408 +    the command name, function and help text. From within your command
409 +    function, you can use mon_get_token() and mon_expression() to parse the
410 +    arguments and the mon_read/write_*() functions to access memory.
411 + 5. To enter cxmon, call the mon() function like this:
412 +
413 +      char *args[3] = {"mon", "-r", NULL};
414 +      mon(2, args);
415 +
416 + 6. If you're done with cxmon, call mon_exit().
417 +
418 +
419   History
420   -------
421  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines