I have uploaded
RM/RMIR v2.02 Alpha 12. Greg has made the changes to Import Protocol and to the selection of Primacy that were requested and I have made a first attempt at adding Protocol Builder facilities.
There are bound to be many bugs and other issues with the assembler/builder facilities but I feel that it is time that it got a public airing. Here are some comments on its operation, otherwise just try it and see!
* The assembler listing is editable and has insert/delete and copy/paste buttons. Use Shift/Click to select a rectangular block of cells. The editing buttons work on the entire rows containing the selected block, it is not necessary to select the whole row. "Insert" inserts above the block a number of rows equal to the number of selected rows (just as in Excel). When entering data into the listing, it always maintains a blank row at the bottom, inserting a new one as necessary.
* The data in the Protocol Data, PF Details and PD Details panels are editable. Any change in one panel is immediately reflected in the others, they are always kept in step. Changes, however, are not incorporated into the assembler listing until the Build/Get Data button is pressed. This is a single button with two functions. If there is already protocol code in the assembler panel then the button legend is "Get Data" and it brings the data bytes into line with the data panels. If there is no protocol code then its legend is "Build" and it builds a basic protocol from the data panel info including the necessary assembler instructions.
* In either mode, Build/Get Data does not change the hex data in the Protocol Code panel. To update this with the built/amended protocol you need to press the Assemble button. This generates the hex data and enters the result in the Protocol Code panel as new code (if a new manual protocol is being created) or custom code (if a protocol is being edited) as appropriate.
* The assembler listing is not saved in a .rmdu or .rmir file but it may be saved to, and loaded from, a plain text file with the Save and Load buttons. A saved file has the fields tab-separated but any white space may be used to separate them in a file that is to be loaded. A label needs a colon to terminate it and a comment needs a semi-colon to begin it. These semi-colons do not appear in the RM/RMIR assembler panel but they are needed for parsing and are inserted and removed by the save/load processes.
* The Build/Get Data button operates in two slightly different modes, depending on which tab is selected when it is pressed. If either the PF Details or PD Details tabs is selected then no consistency checking is performed. The intention is that this mode can be used to set the data when assembler code is to be written to make use of the data in some non-standard way. If the Protocol Data tab is selected then inconsistent or missing data will be modified to create a valid protocol. I expect this to be the normal mode of operation.
* The mnemonic labels listed in the Functions tab may be used in assembler code without requiring an explicit EQU directive.
* By default the S3C80 assembler creates S3C8 (old-style) code. To build a protocol for the S3C8+ or S3F8 processor, put an ORG FF00H directive in the listing before running the assembler. This directive is automatically added by the disassembler when it disassembles a protocol it recognises as new-style code.
* The assembler will handle standard arithmetic expressions involving +, -, *, /, % and brackets ( ). The / operation is integer division (remainder is ignored), % is the modulo operation, i.e. it returns the remainder on division. Hexadecimal numbers can be preceded with $ or followed by H or h. Both forms are accepted for all processors.
* Relative addresses are most easily given by using labels, but an explicit form is also accepted in which $ denotes the address of the next instruction, so that for example an S3C80 instructions JR $ - 2 is an infinite loop since JR is a two-byte instruction.
One further comment on S3C80 old versus new code. RM/RMIR automatically converts between the two as required when exporting protocol code, testing the code to see which style it is written for and checking to see which processor version is used by the remote. So it does not matter which processor format a protocol is assembled for, as it will be converted to the one required by the remote concerned when it is used.