/*
 *
 * runmost  Version 0.0  28NOV83
 *
 * This is the run prgm subtree.  It is generic for *most* microprocessors.
 * (A known exception is the 8086/8087).
 *
 */

/*
 * TNIX/Unix/VMS Version
 * Keyshell Version Number 1
 */

/*
 * Include files used by this script
 */

#include <breakpoint>

runmost
{
			>
			>\kgo @ pc\e - Runs your program starting at the current pc.
			>
			>\kgo @ addr\e - Runs your program starting at the specified address.
			>
			>\kstep\e - Single steps through your program.
			>
			>\ktrace\e - Turns program trace on or off.
			>
			>\kbreaks\e - Sets or clears program breakpoints.
			>
			>\kreset\e - Resets the emulator.
			f1;go @ pc;
				msg (^Hit Control-C to stop!),
				cmd (^g), exec,
				msg (^), cmd(^);
			f2;go @ addr; {
				>
				cmd (^g ),
					msg (^Go at what address? %p),
					msg (^Hit Control-C to stop!), exec,
					msg (^), break;
				f1;; hist;
				f2;; hist;
				f3;; hist;
				f4;; hist;
				f5;; hist;
				f6;; hist;
				f7;manual; man (g);
				f8;done; msg (^), cmd (^), break;
			};
			f3;step; msg (^Executing program line...),
#ifndef _VMS
				cmd (^tra all -s; g), exec,
				cmd (^tra off -s),
#else
				cmd (^tra "all -s"), exec,
				cmd (^g), exec,
				cmd (^tra "off -s"),
#endif
					exec, msg (^);
			f4;trace; {
				>
				>\kshow tra\e - Show trace status.
				>
				>\kon\e - Turns on program tracing.
				>
				>\koff\e - Disables program tracing.
			 	f1;show tra; msg (^Displaying trace status...),						cmd (^tra), exec, msg (^), cmd (^);
				f2;on; cmd (^tra all), exec,
					msg (^), cmd (^), break;
				f3;off; cmd (^tra off), exec,
					msg (^), cmd (^), break;
				f7;manual; man (tra);
				f8;done; msg (^), cmd (^), break;
			};
			f5;breaks; [breakpoint];
			f6;reset; cmd (^reset), exec, msg (^);
			f8;done; msg (^), cmd (^), break;
}
