Command Syntax Portions of a command are separated by a delimiter in most cases. The delimiter is represented in the command descriptions by '%', which implies either comma or space. Numeric values (addresses or symbol values, for example) are expected to be in hexadecimal notation. When entering the hex number, as many hex characters as desired may be entered; only the last four will be used by REVAS. If you type the wrong number, simply retype it without intervening keyboard entries. If a non-hex character is entered then REVAS simply returns to the command mode and you may re-enter the command or change to another command. It's a good way to escape a command sequence when you change your mind.. Spaces in the formal command descriptions are present for clarity of presentation only; they are not a part of the keyboard input. REVAS accepts commands in either upper or lower case. Upper case is used in the command descriptions only for clarity. Definition Syntax /../ Text enclosed by slashes is typed by REVAS. Other parts of the commands are typed by the user. ^ (up-arrow) means "depress the ctrl key and keep it depressed while typing the next character". + The logical "inclusive-or" function. "a+b+c" means "one or more of the parameters listed". "one and only one of the parameters listed". !cp 8 % Means "enter a space or comma from the console keyboard". I.e., %=! @ Means "enter a carriage return by depressing the console keyboard return key". <..> Text enclosed by "<" and ">" is a symbolic representation of a keyboard entry. The actual entry, if not self evident, is explained in the command description. [..] The expression(s) enclosed by square brackets may be included in or excluded from the command at the user's option. The command processor in REVAS will recognize the intent of the command either way. Furthermore, the brackets also imply that the contents may be repeated an indefinite number of times. ? Means "Enter any printable character". A space is considered a printable character. (..) Parentheses are used to group elements of a command in the command descriptions to avoid ambiguity of interpretation. The parentheses are not part of the actual command. Immediate Commands The next three commands may be used at any time during a disassembly activity (even when printout has been suppressed). R Return to command mode. This command causes an abort of the current listing and an immediate return to the command mode. The prompt character will be printed and a new command sequence is expected. S Suspend printout at the end of this line. This command causes the disassembly to pause at the end of the current line. Escape from this pause (or wait) state is via any keyboard entry. The next command may be used at any time: ^C (control/C) this command causes an immediate trap to the monitor. It may be used at any time during the disassembly or command phases. If you are using a monitor from Technical Design Labs, then a return via the monitor 'G' command without an argument will result in resumption of the interupted activity if none of the registers has been changed. Note that if ^C is executed during the pause after the 'S' command, return will be to the pause state and a keyboard entry will be needed to continue the disassembly. Disassembly Display & Analysis Commands /#/ D? /addr range=/ % @ 'D' means "display the object code as mnemonic assembly instructions". This command results in disassembly of the object code specified by the start and end addresses. If the character is a 'T' then the object code is interpreted as data tables and printed in .BYTE format. When mode information is encountered in the Index table, that mode automatically takes precedence and subsequent printout is controlled by the flag in the Index table. If the character following the 'D' or 'DT' is a HEX digit then the prompt message (ADDR RANGE=) is suppressed, and you may continue with the address entries. Any other character in this position causes printing of the prompt message. /#/ F [?]%/addr range=/ %@ Find all statements in the address range specified that reference as a 16 bit number. These would be calls, jumps, LXI statements, etc. Each such statement is printed out in the normal disassembly format. The starting address must be the start of an instruction to avoid an initial phase problem and an inaccurate disassembly. This instruction loads the HEX number into the index table before starting its search, so the command may be used even before tables have been built. You can remove the number from the tables later on with the 'K' command if you wish. You could use this command to find all the locations in the object program that call a particular subroutine. /#/ P @ Print out the symbol table. Only those symbols (and their addresses) to which you have assigned a name will be printed. Synthetic symbols are not printed, since their addresses are part of the symbol. /#/ X /addr range=/ % @!% /sym val range=/ % @ This command searches repeatedly through the address range specified, printing out those instructions that reference symbols whose addresses are in the range of addresses requested by /sym_val_range/. The instructions that reference the smallest address value are listed first; then the next value is used; the process is repeated for each value in the range. This command uses the information in the symbol tables, so it will only be useful after the symbol address values have been entered by the B,L,S, or T commands. EXAMPLE: /#/XADDR RANGE=100 51E SYM VAL RANGE=100 115 Index & Symbol Table Control Commands /#/ B? /addr range=/ , @ The form of this command is exactly the same as that of the 'D' command. You may avoid the prompt message the same way. 'B' means 'build the Index table'. When the instruction mode is specified(B? is anything except BT), each 2-byte argument encountered during the disassembly is assigned a synthetic symbol name which is the hex value preceeded by 'S'. This synthetic symbol is placed in the label field of the listing when the corresponding address is encountered in the disassembly. When the table mode is specified (BT) the object code is listed in ".BYTE" format as data. The mode of any labels encountered is changed to 'T' and the synthetic symbol prefix is changed from 'S' to 'T'. When building tables, the 'B?' command should not be used until the instruction code sequences have been disassembled. Then use the BT command to identify the table area labels. This will avoid the need to re-build tables for some areas of the object program. Note that there is no problem with using this command repeatedly on the same or overlapping address ranges. Symbols already entered are retained; only the mode flag associated with the symbol is affected. /#/ L [%]
/ =/ @!% Create a label in the symbol table. The alpha string specifies the label name. If more than 6 characters are typed, only the first 6 will be stored and used. the mode flag is not affected. /#/ S [%]
/ =/ @!% Same as 'L', except mode flag is reset to indicate that this is an instruction. /#/ T [%]
/ =/ @!% Same as 'L', except mode flag is set to indicate that this is a label for data. L,S, and T may be used to replace a label and change its mode as often as required. These commands may be used even before the symbol tables have been built with the 'B' command. /#/ M [%]
% (0 ! 1) (@!%) 0 means 'the address specified is an instruction'. 1 means 'the address specified is a data byte'. This command permits marking of data or instructions in the program for which there is no label. It is typically used to mark the beginning of a table of data whose first byte is not referenced directly. Likewise, it might be used to mark the first instruction following a table, where no direct reference is made (reference might be by means of a jump table, for example). When the delimiter (%) is used to terminate the L,S,T, or M commands, the next prompt (#) will be on the same line as the last one. These commands can be 'strung out' across the page using this feature. /#/ K [ [%]
% ] @ Kill a symbol table entry. This command removes all reference to the address given from the symbol tables. It's most important use is to remove 16 bit constants from the tables so that they will print out during disassembly as constants (numbers) rather than synthetic labels. You may also use 'K' to remove labels assigned by the L,S, and T commands. When a delimiter is used after the address, another address may be entered, and another, etc until a carriage return is entered to terminate the Kill mode. For example, "/#/K0,1,2,4,8,A00@" would result in deletion of 0000, 0001, 0002, 0004, 0008, and 0A00 from the tables. Utility Commands /#/ I^F^F This command initializes the symbol tables by assigning initial values to the Symbol Table Pointers corresponding to empty tables located at the end of REVAS. It is typically used to start a new disassembly. ************************************* ** DO NOT USE THIS COMMAND ** ** IF YOU WANT TO SAVE THE SYMBOLS ** ** YOU HAVE ALREADY ENTERED! ** ************************************* /#/ A^F^F [%]
@ Assign the start of the symbol tables to the memory address specified. The tables are moved to the new location and the Symbol Table Pointers are adjusted to correspond to the new table location. The Symbol Table Pointers are the sole link between REVAS and the tables, and their location is not changed. Copies of REVAS at two different locations could use the same tables if you were to copy the ST Pointers from one REVAS copy to the other. Normally you would use this command at the start of a session to place the tables advantageously in your memory space. Tables are built at the end of REVAS if not otherwise assigned with this command. NOTE The two ^F characters immediately following the 'I' and 'A' commands are included as a safety feature to prevent inadvertant issuance of these commands. You can change these 'lockout' characters by changing the contents of two memory locations. (see Patch Locations below) Note that the parity bit of the second byte must be SET (=1). Thus, if you selected 'PE' as the two (ASCII) characters, the entries would be 50 and C5. /#/ O [ [?] (C!P!L) [?] % ] @ The output device(s) for the disassembly listing are determined by this command. Note that all but the CR(@) may be ommitted. In that case, only the command dialog will be printed on the console. This option is useful when you wish to build ('B' command) tables without wasting time with the listing. /#/O C Assigns disassembly listing to the console /#/OL Assigns listing to the list device (56 lines per page) /#/OP Lists the label, operator, and operand fields on the punch device. (suitable for reassembly!) /#/0ut Console,List,Punch This is an acceptable command which will result in listing on all 3 devices. Note that, for this command, words may be substituted for the single letters that REVAS recognizes. The first letter should be O,C,L, or P as implied in the example. G [?] @ This is the 'GO' command that allows you to transfer to your own subroutine. If the subroutine terminates with a 'RET' statement and the stack pointer has the same value as it had at the start of your routine, then return will be to the REVAS command processor after your routine has done it's job. One use for this command in my system is to run a routine that closes a disc file after REVAS has finished writing a disassembly listing to it. /#/ C Comment field control...This command switches the comment field on and off. If the last output included the comment field, then execution of this command will inhibit printing of the comment field until the command is given again. If you have already made use of the data in the comment field, then you can inhibit it's printout with the 'C' command and considerably increase the printout speed and get cleaner copy in the bargain. (The printer doesn't have to print all those spaces between the operand field and the comment field) /#/ H HALT at the top of the each page of the logical list device. This command may be used at any time, even while listing is in progress. Listing is resumed when any keyboard entry is detected. If the entry is a ^C, then that function is performed first and listing will resume immediately on return from the monitor. By assigning the logical list device to a CRT or TV display and setting the top margin, lines/page, and bottom margin appropriately, the HALT function can be used to step through a complete disassembly one screen-full at a time. /#/^H The ^H character cancels the HALT mode, resulting in continuous paginated listing without pause at page boundaries. This is the default mode for REVAS. /#/ E The 'E' command causes the '.END' Pseudo-op to be output to the active (assigned by 'O') output devices. This Pseudo-op is required by most assemblers at the end of the source listing. /#/ ^L Control-L, the ASCII Form Feed, causes the logical list device to space to the top of the next page. It may be used at any time, even when the list device is unassigned by the 'O' command. This completes the description of the REVAS commands. Experiment with them until their nuances become familiar to you, and you will then get the most benefit from your REVAS disassembler.