/*
 *
 * memcmds  Version 0.0  28NOV83
 *
 * These are various subtrees that fit under the memory key.
 * The ones included in this file are processor independent.
 *
 */

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

/*
 * This is the dump subtree.
 */

dump 
{
				>
				cmd (^d ), msg (^From  address: %P), next;
				f1;; hist;
				f2;; hist;
				f3;; hist;
				f4;; hist;
				f5;; hist;
				f6;; hist;
				f7;manual; man (d);
				f8;done; msg (^), cmd (^), break;
			}, {
				>
				msg ( through address? %p), exec,
					cmd (^), msg (^), break;
				f1;; hist;
				f2;; hist;
				f3;; hist;
				f4;; hist;
				f5;; hist;
				f6;; hist;
				f7;manual; man (d);
				f8;done; msg (^), cmd (^), break;
}

/*
 * This is the patch subtree.
 */

patch
{
				>
				cmd (^p ), msg (^At address: %P), next;
				f1;; hist;
				f2;; hist;
				f3;; hist;
				f4;; hist;
				f5;; hist;
				f6;; hist;
				f7;manual; man (p);
				f8;done; msg (^), cmd (^), break;
			}, {
				>
				msg ( with %%);
				f1;hex; {
					> 
					msg (hex value: %p), exec,
						cmd (^), msg (^), break (2);
					f1;; hist;
					f2;; hist;
					f3;; hist;
					f4;; hist;
					f5;; hist;
					f6;; hist;
					f7;manual; man (p);
					f8;done; msg (^), cmd (^), break (2);
				};
				f2;ascii; {
					>
#ifndef _VMS
					cmd (-ab ),
#else
					cmd ("-ab" ),
#endif
						msg (ascii string: %p),
						exec, cmd (^), msg (^),
						break (2);
					f1;; hist;
					f2;; hist;
					f3;; hist;
					f4;; hist;
					f5;; hist;
					f6;; hist;
					f7;manual; man (p);
					f8;done; msg (^), cmd (^), break (2);
				};
				f7;manual; man (p);
				f8;done; msg (^), cmd (^), break;
}

/*
 * This is the disassemble subtree
 */

disassemble
{
				>
				cmd (^di ), msg (^From address: %P), next;
				f1;; hist;
				f2;; hist;
				f3;; hist;
				f4;; hist;
				f5;; hist;
				f6;; hist;
				f7;manual; man (di);
				f8;done; msg (^), cmd (^), break;
			}, {
				>
				msg ( to address: %p), exec,
					msg (^), cmd (^), break;
				f1;; hist;
				f2;; hist;
				f3;; hist;
				f4;; hist;
				f5;; hist;
				f6;; hist;
				f7;manual; man (di);
				f8;done; msg (^), cmd (^), break;
}
/*
 * This is the map command subtree.  It is generic and emulator
 * independent.
 */

mapmem
{
				>
				>\kshow map\e - Shows how memory is assigned.
				>
				>\kset map\e - Allows you to assign memory.
				f1;show map; msg (^Displaying current memory map...),
					cmd (^map), exec, cmd (^), msg (^);
				f2;set map; {
					>
					>\kMDL mem\e - Assigns a block of addresses to program memory.
					>
					>\kuser mem\e - Assigns a block of addresses to prototype memory.
					msg (^Source of memory: %%);
					f1;MDL mem, cmd (^map p), next;
					f2;user mem, cmd (^map u), next;
					f7;manual; man (map); 
					f8;done; msg (^), cmd (^), break (2);
					},{
					>
					>\kread/wrt\e - Assigns a block of addresses to read/write memory.
					>
					>\kread only\e - Assigns a block of addresses to read only memory.
					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);
				};
				f7;manual; man (map); 
				f8;done; msg (^), cmd (^), break;
}
/*
 * This is the fillmem include file.  It is generic and microprocessor
 * independent.
 */

fillmem {
				>
				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;
			}, {
				>
				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;
			}, {
				>
				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;
}
