Loading REVAS From Cassette The standard REVAS cassette is recorded in straight Tarbell format. It starts with a 25 second sync stream that you can use to adjust your interface. Following the sync stream is 15 seconds of carrier, and then the first load module. The cassette contains 3 load modules; the first module is 1400H bytes long and is named REVAS. If you do not have the CPM system, this is the only module of interest to you. The second module is 400H bytes long, and is named REVAS.COM. The third module is 1400H bytes long and is named REVAS.LOD. REVAS (the first module) may be loaded anywhere you wish in memory and executed by jumping to the load address. During first execution, the relocating code is destroyed and the resulting copy of REVAS is no longer relocatable. Thus, to make I/O patches to the jump vectors, the modifications must be made to the copy immediately after loading. The modified copy can be saved (on tape, for example, or on disc); the relocatability feature will still be valid if you have done no more than change the arguments of the I/O jump vector. Once executed, REVAS is exactly 1000H bytes long. REVAS.COM and REVAS.LOD should be loaded into memory one at a time and saved from location 100H (the CPM tpa) using CPM commands. More details are given in the appended REVAS/CPM guide. Before loading REVAS, insert the cassette in your recorder with the interface disconnected so you can hear the data. Play the tape from the beginning. The first sound you hear will be that of the sync stream, then the carrier tone. Note the places where the steady tone of the carrier is replaced by the 'noise' sound of the recorded data. The programs are recorded in the order listed above, with about 15 seconds between copies. Now position the tape a few seconds ahead of the copy you want, reconnect the Tarbell interface, and copy the program into memory. I/O Interface Description REVAS is designed to support one logical input device (the console) and 3 logical output devices (console, punch, and printer). The physical devices referenced by the logical names (console, punch, and printer) are determined by your driver routines and the jump vectors in REVAS that point to them. You could, for example, have the punch actually write on a disc file. All I/O transactions take place through the jump vectors located near the beginning of the REVAS program. These vectors are shown in the listing below. You must verify that these jumps point to the proper driver routines in your system. If you are using a monitor from Technical Design Labs and it is located at 0F000H, then no changes will be necessary. Otherwise, you must change the jump arguments so that they point to your own driver routines. The driver routines must observe the following register usage conventions: A byte to be output is transmitted in the 'C' register and will be in the 'C' and 'A' registers on return from the output driver. An input byte (from the console) is expected to be in the 'A' register. The content of all other registers must be returned unchanged during an I/O operation. REVAS Entry & I/O Vector ADDR CODE LABEL OPR OPA COMMENTS 0020 31 XXXX REVAS: LXI SP,STACK ;LOCATE STACK ;ADDR is the address relative to the load ;address BEFORE execution. During execution, ;all of this code is moved down 20H bytes, ;so that the instruction labeled REVAS is ;located at relative address 0000. ;XXXX depends on Version number of REVAS 0023 C3 XXXX JMP START ;GO TO WORK 0026 C3 12F0 CSTS: JMP 0F012H ;CONSOLE STATUS ;RETURNS WITH 0FFH IN ACCUMULATOR IF THERE IS ;CONSOLE INPUT WAITING, 00 IF NOT. 0029 C3 03F0 CNSLIN: JMP 0F003H ;CONSOLE INPUT 002C C3 09F0 CSLOUT: JMP 0F009H ;CONSOLE OUTPUT 002F C3 0FF0 LPOUT: JMP 0F00FH ;PRINTER OUTPUT 0032 C3 0CF0 POUT: JMP 0F00CH ;PUNCH OUTPUT 0035 C3 1EF0 TRAP: JMP 0F01EH ;RETURN TO MONITOR ;RETURN FROM THE MONITOR WITH ALL REGISTERS ;(INCLUDING THE STACK PTR AND THE PC) ;RESTORED TO THEIR STATES AT THE TIME OF THE ;JUMP TO TRAP WILL PERMIT CONTINUED EXECUTION ;OF REVAS WHERE IT LEFT OFF. IF YOUR MONITOR ;ROUTINES DO NOT INCLUDE THIS FACILITY, THEN ;RETURN SHOULD BE THROUGH A JUMP TO REVAS ;(I.E. JUMP TO RELATIVE LOCATION 0000) Symbol Table Pointers after execution REL ADDR CONTENT DESCRIPTION 0FF5 TFLAG: 0=EMPTY TABLE; 1=NOT EMPTY 0FF6 A1: ADDR OF FIRST ENTRY OF INDEX TABLE 0FF8 A3: ADDR OF LAST ENTRY OF INDEX TABLE 0FFA A4: ADDR OF FIRST ENTRY IN LABEL TABLE 0FFC A2: POINTER TO NEXT AVAILABLE LOCATION FOR LABEL ENTRY (RELATIVE TO FIRST ENTRY) 0FFE A5: POINTER TO LAST LOCATION IN THE LABEL TABLE RELATIVE TO THE FIRST ENTRY 1000 DEFAULT LOCATION OF INDEX TABLE (THIS ADDR WOULD BE IN A1: ABOVE) Patch Locations after execution REL ADDR CODE REMARKS 0850 3B Comment Field Delimiter 0908 AE Right Justify Label Field EE=Left Justify Lbl Field 091C 3A Label Terminator 0EA1 2E 42 59 54 C5 '.BYTE' Pseudo-Op For Tables 0EA6 2E 45 4E C4 '.END' Pseudo-Op 0EAA 0D 0A 00 80 00 CRLF For List Device 0EAF 0D 0A 00 80 00 CRLF For Other Devices 0ECE 06 86 Lockout bytes, ^F^F (To change an ASCII string such as this to some other string such as 'DB', observe the following two rules: 1. You must use the same number of characters, filling out with blanks if necessary. 2. The last byte in the string must have bit 7 set. I.e., the parity bit must be equal to one.) 0037 38 LC: Line Counter 0038 5 TM: Top Margin 0039 5 BM: Bottom Margin 003A 38 LP: Text Lines/Page Immediate command characters 0445 52 R=RET to Command Mode 0187 53 S=Suspend Disassembly Line Format Modification The line buffer is 60 bytes long and is divided into 6 fields. The length of each field is specified in a format list starting at 0018H. It contains 7 words, each of which is the absolute address of the start of a field. The field starting with the seventh address is not used. The first address in the list is the start of the line buffer after execution. Format List REL HEX SYMBOL FIELD FIELD DESCRIPTION ADDR WORD 0018 D40E LB 1 address field 001A D90E LB+5 2 object code 001C E50E LB+17 3 label field 001E ED0E LB+25 4 operator field 0020 F30E LB+31 5 operand field 0022 080F LB+52 6 comment field 0024 0D0F LB+57 defines end of field 6 Page Format Control Page format for the list device output is controlled by TM, LP, and BM. TM specifies the number of blank lines at the top of the page, LP specifies the number of text lines per page, and BM specifies the number of blank lines at the bottom of the page. Total page length is thus the sum of these three constants. You can change TM or BM to any 8_bit value, including zero. LP may be assigned any 8_bit value except zero. These assignments are made by modifying the appropriate patch locations. Nulls After CRLF The CRLF-Nulls sequence is separately specified for the List Device and for all other output devices. (See Patch Locations) As supplied, REVAS outputs 2 nulls after a line feed. You can change this to from zero to three nulls by changing the byte in the sequence for which bit 7 is set. For zero nulls, the sequence must be changed to 0D_8A_00_00_00; for 3 nulls change to 0D_0A_00_00_80. REVAS COMMAND SUMMARY A Assign location of symbol tables B Build internal tables C Control output of comment field D Disassemble using tables if present E Insert '.END' pseudo-op into output stream F Find all instructions that use the given address H Halt at top of list page ^H Don't halt at top of list page G Go to a user routine and execute it I Initialize tables to empty state K Kill table entries L Label assignment for any object program location ^L (ASCII Form Feed) advances to top of page M Mark a location as instruction or table O Output device assignment P Print the symbol table S Symbol assignment for instructions T Symbol assignment for table locations X Produce a cross reference listing Immediate Action Commands ^C Trap to monitor (and return from TDL Monitor) R return to command mode S stop disassembly, wait for keybd entry