/*
 *
 * newsetup  Version 0.0  28NOV83
 *
 * This is the "new setup" subtree under kconfig.  It is generic
 * for *all* microprocessors.  (If allocation is required, the main
 * config script must define the identifier _allocreq).
 *
 */

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

newsetup 
{
			>
			>\k_microname\e - The emulator supported by this script.
			>
			>\knext\e - Processor already selected.
			cmd(^sel ), msg(^Emulator name: %%),
				exec, msg (^), cmd (^), next;
			f1;_microname; par (_microname);
			f6;next; msg (^), cmd(^), next;
			f7;manual; man (sel); 
			f8;done; msg (^), cmd (^), break;
		}, {
			>
			>\kshow mode\e - Shows which emulation mode is active.
			>
			>\kmode 0\e - Selects system clock and program memory.
			>
			>\kmode 1\e - Selects user clock and a mix of program and prototype
			>            memory.
			>
			>\kmode 2\e - Selects user clock and prototype memory.
			>
			>\knext\e - Mode already set.
			msg (^Select one: 0=MDL memory; 1=MDL/Prototype memory; 2=Prototype memory);
			f1;show mode; msg (^Displaying emulation mode... ),
				cmd (^em), exec, msg(^);
			f2;mode 0; cmd (^em 0), exec, msg (^), next;
			f3;mode 1; cmd (^em 1), exec, msg (^), next;
			f4;mode 2; cmd (^em 2), exec, msg (^), next;
			f6;next; msg (^), cmd (^), next;
			f7;manual; man (em); 
			f8;done; cmd (^), msg (^), break;
		}, {
#ifdef _allocreq
			>
			>\kshow aloc\e - Shows what memory is present.
			>
			>\kset aloc\e - Lets you specify what memory is present.
			>
			>\knext\e - Finished allocating memory.
			f1;show aloc; msg (^Displaying memory allocation...),
#ifndef _VMS
				cmd (^al),
#else
				cmd (^icom al),
#endif
					exec, msg (^); 
			f2;set aloc; {
				>
#ifndef _VMS
				cmd (^al ),
#else
				cmd (^icom al ),
#endif
					msg (^Allocate from address: %P), next;
				f7;manual; man (al);
				f8;done; msg (^), cmd (^), break (2);
			}, {
				>
				msg ( through address: %P),
					exec, msg (^), break;
				f1;block end; par ( );
				f7;manual; man (al);
				f8;done; msg (^), cmd (^), break (2);
			};
			f6;next; cmd (^), msg (^), next;
			f7;manual; man (al);
			f8;done; msg (^), cmd (^), break;
		}, {
#endif
			>
			>\kshow map\e - Shows the current memory map.
			>
			>\kMDL mem\e - Assigns a block of addresses to program memory.
			>
			>\kuser mem\e - Assigns a block of addresses to prototype memory.
			>
			>\knext\e - Finished mapping.
			f1;show map; msg (^Displaying memory map...),
				cmd (^map), exec, msg (^);
			f2;MDL mem;
			{
			>
			>\kread/wrt\e - Assigns a block of addresses to read/write memory.
			>
			>\kread only\e - Assigns a block of addresses to read only memory.
				cmd (^map p),
				msg (^Enter protect status of memory: %%), next;
				f1;read/wrt; cmd (rw );
				f2;read only; cmd (ro );
				f7;manual; man (map); 
				f8;done; msg (^), cmd (^), break (2);
		}, {
			>
			>\k0\e - Address 0.
			>
			>\kF2-F6\e - Previously selected parameters.
			>
				msg (^From address: %P), next;
				f1;0; par (0 );
				f2;;hist;
				f3;;hist;
				f4;;hist;
				f5;;hist;
				f6;;hist;
				f7;manual; man (map); 
				f8;done; msg (^), cmd (^), break (2);
		}, {
			>
			>\kblock end\e - End of block.
			>
			>\kF2-F6\e - Previously selected parameters.
			>
				msg ( through address: %P), 
				exec, msg (^), break;
				f1;block end; par ( );
				f2;;hist;
				f3;;hist;
				f4;;hist;
				f5;;hist;
				f6;;hist;
				f7;manual; man (map); 
				f8;done; msg (^), cmd (^), break (2);
		};
			f3;user mem;
			{
			>
			>\kread/wrt\e - Assigns a block of addresses to read/write memory.
			>
			>\kread only\e - Assigns a block of addresses to read only memory.
				cmd (^map u),
				msg (^Enter protect status of memory: %%), next;
				f1;read/wrt; cmd (rw );
				f2;read only; cmd (ro );
				f7;manual; man (map); 
				f8;done; msg (^), cmd (^), break (2);
		}, {
			>
				msg (^From address: %P), next;
				f1;0; par (0 );
				f2;;hist;
				f3;;hist;
				f4;;hist;
				f5;;hist;
				f6;;hist;
				f7;manual; man (map); 
				f8;done; msg (^), cmd (^), break (2);
		}, {
			>
				msg ( through address: %P), 
				exec, msg (^), break;
				f1;block end; par ( );
				f2;;hist;
				f3;;hist;
				f4;;hist;
				f5;;hist;
				f6;;hist;
				f7;manual; man (map); 
				f8;done; msg (^), cmd (^), break (2);
		};
			f6;next; cmd (^), msg (^), next;
			f7;manual; man (map); 
			f8;done; msg (^), cmd (^), break;
		},{
			>
			>\kfill\e - Fills memory with a pattern.
			>
			>\knext\e - Memory initialization not required.
			f1;fill;
			{
				>
				cmd (^f ), msg (^From address: %P), next;
				f1;;hist;
				f2;;hist;
				f3;;hist;
				f4;;hist;
				f5;;hist;
				f6;;hist;
				f7;manual; man (f); 
				f8;done; msg (^), cmd (^), break (2);
			}, {
				>
				msg ( through address: %P), next;
				f1;;hist;
				f2;;hist;
				f3;;hist;
				f4;;hist;
				f5;;hist;
				f6;;hist;
				f7;manual; man (f); 
				f8;done; msg (^), cmd (^), break (2);
			}, {
				>
				msg ( with: %p), exec, cmd (^), msg (^), break;
				f1;;hist;
				f2;;hist;
				f3;;hist;
				f4;;hist;
				f5;;hist;
				f6;;hist;
				f7;manual; man (f); 
				f8;done; msg (^), cmd (^), break (2);
			};
			f6;next; msg (^), cmd (^), next;
			f7;manual; man (f); 
			f8;done; msg (^), cmd (^), break;
		}, {
			>
			>\kload\e - Loads programs and symbols (if desired) into memory.
			msg (^Load an object file, or press 'done' to exit);
			f1;load; {
				>
				>\kyes\e - Loads program with symbols.
				>
				>\kno\e - Loads program only.
				msg (^Do you want symbolic debug?);
				f1;yes; {
					>
					cmd (^symd on; ), cmd ( lo <),
					msg (^File to load: %f),
					cmd (; symlo <$2), exec, msg (^),
						break (2);
					f1;;hist;
					f2;;hist;
					f3;;hist;
					f4;;hist;
					f5;;hist;
#ifdef _UNIX
					f6;listfiles; call, cmd (^ls),
#else
#ifdef _VMS
					f6;listfiles; call, cmd (^dir),
#else
Error!  No operating system specified.
#endif
#endif
						msg (^), exec, return;
					f7;manual; man (symlo); 
					f8;done; msg (^), cmd (^), break (2);
				};
				f2;no; {
					>
#ifndef _VMS
					cmd (^lo <),
#else
					cmd (^icom lo <),
#endif
					msg (^File to load: %f),
					exec, msg (^), break (2);
					f1;;hist;
					f2;;hist;
					f3;;hist;
					f4;;hist;
					f5;;hist;
#ifdef _UNIX
					f6;listfiles; call, cmd (^ls),
#else
#ifdef _VMS
					f6;listfiles; call, cmd (^dir),
#else
Error!  No operating system specified.
#endif
#endif
						msg (^), exec, return;
					f7;manual; man (lo); 
					f8;done; msg (^), cmd (^), break (2);
				};
				f7;manual; man (lo); 
				f8;done; msg (^), cmd (^), break;
			};
			f7;manual; man (lo);
			f8;done; msg (^), cmd (^), break;
}
