SOME INFORMAL NOTES ON RES86 V2.2 W. Earnest 11/20/84 Here are a few of the changes made to a venerable program that has served well for many. Written by Ward Christensen for the 8080, it was modified several times for the Z-80, and had many other features added. Recently I got a copy that had been converted to the 8086, and naturally started to see what I might add. Here are the results to date. It seems useful (to me) and may help someone else. To bring it up to a level similar to recent 8080 and Z-80 versions, an online HELP screen was added, multi- column listing of the control and symbol tables, and optional file load and save with the .ALL key to save on typing. Also, the 'ALL' option is automatic if the filename is given on the command line (assuming .CMD for the image). Automatic deletion of replaced symbols was added, as well as protection against accidental duplication of symbols. The comment capability was expanded to include both appended comments and ones that replace instructions. Many of these ideas were lifted from ZESOURCE and other such variations of the original RESOURCE. When I started, RES86 loaded the whole image file as one block, with no processing. I extract the header record data and place it in tables, then load the rest so the image starts at relative 0, with no 80h offset. Each segment is recognized, and the size, starting point, and offset retained for use and display with the '?' function. An added flag byte to each entry of the symbol table retains the segment and size information of the symbol, much as done by the assembler. This is used to decide whether to append a colon, and to resolve usage where offsets of 2 symbols in different segments are the same. This byte is forced to a printable ASCII value for saving and restore in the .SYM file, and is displayed in the symbol table listing. When defining a symbol, the offset is assumed to be in the current segment, and will be copied from any symbol being replaced, or the user may set it with the syntax: Ennnn,.symbol,m where m is the ASCII character desired. To control the segment being worked on, I added the syntax of segment registers to several commands, such as the D, L, ;, O, C, and others. Used as in the following example: DCS:0,7F it selects the segment to be processed, sets the "current" segment, places the segment letter in the command prompt, and modifies the offset to match the base of the right segment. If working with an 8080 model file, it recognizes the fact and makes all segments equivalent. The control table was handled a bit differently. Rather than add a byte to each entry, the control table internally uses addresses as if the file was one large block, and the routines that address it correct by the difference between the current segment base and the file base. The 'C' command will display the whole table while one of the form: CDS: will show only those control entries belonging to the data segment, corrected in value to be relative to the segment base. Entry of a control value is also done relative to the current base, the correctin being internal. A few bugs were cleaned up in the instruction disassembly area, opcodes for the 80186 added (not yet finished), and one change made that may not agree with all. I prefer instructions of the form: MOV reg16,constant to use symbols where the offset matches, rather than a hex value. I find it easier to remove excess symbols than to post-edit constants to symbols, and find it more error-free. If you don't agree, feel free to change it back (at the KIND03 area of the code). Well, I'm probably not done, but maybe someone else can add some more, or make use of it at this point. If you have any good ideas, please pass them back, so it can continue to improve. Don't expect it to be bug-free, everyone needs a challenge. Bill Earnest, Allentown PA SYSOP (215) 398-3937 RCPM 24hr (215) 398-1634 Voice before 10PM RD 1, Box 830, Orefield PA 18069