____ ___ ___ ___ ___ ___ ___ ____ ___ ___ ___  / /__//_ /__ / //_ //__ / //_ / / / //_ //__//_   / / //__ ___//__//__/___//__// / /_/_// // \/__  ------------------------------------------------------------------------------ - FOR ABO'S CONTACT US AT: BP:28 1170 WATERMAEL-BOITSFORT 1 BELGIUM!!... ------------------------------------------------------------------------------ - DON'T SEND ANY DISKS - ------------------------------------------------------------------------------  THE LEGENDARY >> SUBSOFTWARE << IN 87/88/89/90/91!!...  ------------------------------------------------------ ============================= SIM - BUG ============================= Short description, 25.06.90 refering to version 0.42 SIM-BUG provides an easy way to use S.I.M. as debugger for different kinds of programs. With SIM-BUG you can debug load modules, bootblocks and programs that are allready in memory. SIM-BUG can only be started from CLI, not from Workbench. When started, a titlepage is printed in the actual CLI-window. Then SIM-BUG looks if a copy of S.I.M. is in memory. This is done with the debugdata vector, which is actually not used by the Amigas system (at least by v1.2). If it points on a S.I.M. then everything's okay. If no S.I.M. is found, SIM-BUG automatically enters the S.I.M.-loadmenu. After that, the helppage is printed in the window. You have now the choice between: - (X) : Quit SIM-BUG Simply quit SIM-BUG - (H) : This help page Prints the helppage again - (S) : Load S.I.M. Loads S.I.M.. First SIM-BUG searches a file named 'SIM' in the actual directory and directories 'SYS:' and 'C:'. If none is found, SIM-BUG tells you so. Then SIM-BUG wants to know the addresses for the S.I.M. code, the display and the backup for the display. Default values are provided and are used by entering no number when one is asked. SIM-BUG looks now if the file 'SIM' is 'S.I.M.'. If not, SIM-BUG tells you so. Then finally 'S.I.M.' is loaded at that address. Version 0.42 of SIM-BUG does not yet allocate that memory or report if it is occupied. When you have loaded 'S.I.M.',SIM-BUG will remember it in the debugdata vector so it can be found there even after quitting SIM-BUG. For reasons of security, SIM-BUG looks if the debugdata vector is neither zero nor pointing to another S.I.M.. If that's the case, SIM-BUG will ask if you want to remember S.I.M. there or not. - (E) : Enter S.I.M. This simply enters S.I.M. by the Debug server entrance. The PC points to somewhere in SIM-BUG. (L) : Debug load module First SIM-BUG asks for the name of the program you want to debug, which is loaded then. If this file does not exist, SIM-BUG simply returns an error. Then it asks for the commandline. This becomes a problem with CLI-commands like 'dir' or 'list'. Normally the commandline is transmitted in the register a0 with the length in d0. But these commands ignore them and find out where the commandline is by use of the internal doslibrary. But there it finds the commandline of SIM-BUGs start. So if you are planning to debug 'dir', please write i.e. 'simbug df0:' when starting SIM-BUG and the 'dir' command will take 'df0:' as command line. The PC points to the start of the program. A0/D0 contain the information about the commandline. The other register contain what SIM-BUG found in them when it was started. That way, i.e. a2 contains the pointer to the internal dosliblary. SIM-BUG changes the pointer to the FinalPC routine that is at the upper end of the stack to an entry in SIM-BUG and the pointer to the segmentlist of SIM-BUGs task to the one of the program. Both values are reset when you finish debugging the program. - (B) : Debug boot block With that command you can debug a bootblock. SIM-BUG asks for the number of the drive in which the disk with the bootblock is. An illegal drivenumber will cause an error. Else, SIM-BUG loads the bootblock. The routine which does this is basically a copy of the one in the rom. Errors are reported at failure of allocmem, opendevice, doio and if the blocks 0 and 1 are not a bootblock. Then S.I.M. is entered. The PC points at the start of the bootblock and the other registers contain what they should, trackdisk address and so on. When you have finished to debug the bootblock, all resources will be freed. - (M) : Debug memory Is used to simply debug a program that is in ram. SIM-BUG asks only for the startaddress that will be pushed into the PC. All other registers contain 0. - (A) : Switch to ------ I have allways a bad feeling when I start a program that freezes the system and the drives have not stoped yet. Therefore SIM-BUG will wait before entering S.I.M.. This is done by two ways: either automatically or manual. The command 'A' is used to switch between these two ways. When manual entry is used, SIM-BUG waits until the user presses the left mouse button. When SIM-BUG uses automatical entry, it looks in the four trackdiskports if the motors have stoped. When this is so, it enters S.I.M.. In case of one drive not stopping because the trackdisk crashed, you can press the left mousebutton to enter anyway. However, some kickstarts do not like it when SIM-BUG uses automatical entry (They crash...). When you use such a kickstart please switch to manual entry. ----------------------------------------------------------------- Special NOTE: When SIM-BUG enters S.I.M., it uses the debug server entry. This enables you to use quit anytime when you are in S.I.M. to end the program you debug and return to SIM-BUG. This version of SIM-BUG does not yet restore the system to an acceptable state (enable interrupts, reset copperlist etc.), you may get into trouble when quitting in the middle of a program that shuts multitasking. Another problem occures when two SIM-BUGs use the same S.I.M. or S.I.M. is entered by another task then the one of SIM-BUG and you do quit. Since S.I.M. was specially designed to work without multitasking, you must be carefull there. I hope I can fix that in the next release of SIM-BUG. Enjoy !!!! Stefan Walter P.S.: If you want to contact me for any reason, here's my address: Stefan Walter Finsterruetistr. 57 CH-8135 Langnau Tel. 0041/(0)1/713 01 46 (18.oo-20.oo)