page 266-267 1982 RCA Microsystems manual, CDP18S640A1 - documentation Utility Program UT61 The Utility Program UT61 provided with the CDP18S640A1 is designed to examine memory, alter memory, and begin program execution at a specified location. These functions are accomplished through a series of commands initiated by a ?, !, or $. The functions described include memory insert !M, memory display ?M, memory move $M, memory fill $F, memory substitute !S, and run program $P. The move and fill functions can also be called by user programs. The UT61 includes read and type routines that provide communication with the user terminal. Once the system has been RESET, the user can either press RUN P to begin program execution at location 0000H, or press RUN U to begin execution of UT61 at location 8000H After pressing RUN U, the user enters either a CR (carriage return) or LF (line feed). A (CR) will establish full-duplex operation and a (LF) half-duplex operation. The UT61 also includes user-callable routines that help to simplify user programming. These routines provide register initialization, variable delays, text output, and subroutine call and return. Some debugging capability is provided by a register- save operation. After RESET and RUN U are pressed, the contents of the CPU registers are saved in RAM beginning at location 8C00i6. The contents of R0, Rl, and R4.1 are lost, however, by the process. The CPU register contents can be examined by displaying memory (see ?M command below) beginning at 8COOH for 20H bytes. When UT61 is ready to accept commands, it types out an asterisk (*) as a user prompt. The commands described below may then be entered. Where addresses are specified, leading zeroes are assumed; and if more than four digits are entered, only the last four are retained. In all cases, a command is terminated by a carriage return (CR). If a syntactical error is detected during the entry of a command, UT61 will respond with a (?) and reprompt the user with an asterisk (*). UT61 Commands ?M Commands Name: Memory Display Purpose: To allow a specified area of memory to be displayed on the user terminal. Format: ?M(START ADDR)(OPTION)(CR) Action: The contents of memory, beginning at the specified (START ADDR) will be transmitted to the user terminal. (OP- TION) allows the transmission of either a specific number of bytes preceded by a space or an inclusive address range preceded by a hyphen. If the option is not specified, a default value of 1 byte results. Examples: ?M2F8 8(CR) ?M2F8-02FF(CR) Both of these examples produce the same output. !M Commands Name: Memory Insert Purpose: To alter the contents of memory be- ginning at the specified address. Format: !M (START ADDR)(SPACE)(DATA)[(CONT)](CR) Action: A memory location is accessed at the specified (START ADDR). The (DATA) required is one byte specified by two hex digits. The (CONT) option allows data to be continued onto the next line on the terminal with or without changing the current memory address. A (COMMA) will not change the address and after the user inserts (CR)(LF), additional data may be entered. If a (SEMICOLON) is entered and after a user-inserted (CR)(LF), a new address is anticipated. The semi- colon allows non-contiguous memory to be loaded with a single insert command. The command may be terminated at any point by the entry of a (CR) not preceded by a (COMMA) or (SEMICOLON). Examples: !M02F8 7100F840B0F88CB1(CR) !M02F8 7100F840,(CR)(LF) B0F8,(CR)(LF) 8CB1(CR) !M02F8 7100F840B0;(CR)(LF) 03B6 94FB903A0F(CR) The first and second examples give identical results. The second provides improved readability at the data terminal output. The third example enters data into two memory areas, starting at 02F8i6and03B6i6. $M Commands Name: Memory Move Purpose: To move a block of data from one area of memory to another area. Format: $M(SOURCE ADDR)(OPTION) (SPACE)(DEST ADDRXCR) Action: Data is copied from memory location beginning at the (SOURCE ADDR) into locations specified by the (DEST ADDR). (OPTION) allows the transfer of either a specific number of bytes preceded by a space or an inclusive address range preceded by a hyphen. There is no restriction on the direction of the move and the areas may overlap. Examples: $M02F8 8 03F8(CR) $M02F8-02FF03F8(CR) $M03B0-03BF02B0(CR) $M03B0-03BF 03B2(CR) $F Commands Name: Memory Fill Purpose: To load a defined area of memory with a specified constant. Format: $F(START ADDR)(OPTION) (SPACE)(DATA)(CR) Action: The specified (DATA) is loaded into memory beginning at the (START ADDR). (OPTION) allows the loading of either a specific number of bytes preceded by a space or an inclusive address range preceded by a hyphen. Examples: $F02F8 8 OO(CR) SF02F8-02FF OO(CR) These examples fill with zeros the eight bytes beginning at location O2F815. !S Commands Name: Memory Substitute Purpose: To display and, if desired, alter the contents of sequential memory locations beginning at the specified address. Format: !S(START ADDR)(OPTION)(CR) Action: A memory location is accessed at the specified (START ADDR). Its contents will not be displayed, however, until (OPTIONS) is entered. (OPTIONS) allows two methods of display: (SPACE) or (LF). If (SPACE) is entered, the current data will be displayed on the same line followed by a hyphen. New data may be entered at this point. Only the last byte entered will be written. If no data is entered, the current data will remain unchanged. If another space is entered, the data in the next sequential memory location will be displayed followed by a hyphen. If a (LF) is entered, a (CR)(LF) will result and the next memory address will be printed followed by the current data and a hyphen. New data may be entered as described above. The command can be terminated by a (CR) or continued by the entry of any number of (OPTIONS). Examples: !S02F8 63-71 00- 0F-C0(CR) The current data of 63 is changed to 71. The 00 data is retained, and the 0F is changed to C0. !S02F8 71- 00- C0- ll-82(LF) 02FC 52-AE(LF) 02FD 00-F8 11-40 23-A3(CR) In this example, the 71, 00, and C0 are retained and the 11 is changed to 82. Each (LF) causes the next address to be typed followed by its data. $P Commands Name: Program Run Purpose: To allow a user program to be run beginning at the specified address. Format: $P[(START ADDR)](CR) Action: The user program will begin execution at the specified (START ADDR) with P=0 and X=0. If the (START ADDR) is not specified, the default value is 0000H. The interrupt flag is also reset. ------------------------------------------- Marcel van Tongeren later provided these UT62 commands, by disassembly under the EMMA 02 emulator. - Herb A: Assembler B: BASIC C: Load from tape (0 or 1) and then show the loaded data on screen (I think) D: Memory Display E: Tape Editor F: Memory Fill I: Memory Insert J: Rewind M: Memory Move P: Program Run R: Read from tape (0 or 1) S: Memory Substitute W: Write to tape (0 or 1), UT62 will ask from starting address (FROM) and end (TO) and then TAPE# (0 or 1) -------------------------------