From meh Wed Sep 25 16:09:32 1985
To: arnold craig davel ed kehoe leith mcatee rand-b rob russ tom
Status: RO

Folks,

I have finished the tools which will allow us to build code and copy
it into a ROM.  The tools are all located under /usr/contrib/bin.  Below
is the list of the tools and what they do.  Before using these tools 
there are some things that you should know:

	First, the scc compiler is used to generate the assembly code.
	However, the -E option is used which does the C code to assembly
	code compiliation and does the macro expansion.  The -E does NOT
	supply the .equ statements for the assembly code for control
	registers and space registers.  Hence, if it is the first time
	that you use these tools, you may get error about undefined labels.

	To get around the errors add the following to your source:

	#ifdef ROM

	; the labels which are giving me trouble and their .equ statements

	#endif

	The ROM label is defined by my scc command line and will be 
	expanded such that the control registers and space registers are
	defined.  When using scc for generating code for the simulator,
	the code within the #ifdef will be ignored.

	Next, the only command that you need to use is /usr/contrib/bin/mkrom.
	This command is a shell script which uses the remaining tool to
	get the code and executable images into the correct format.  mkrom
	uses about 5 temporary files during its execution, however, these
	are removed before completion.  The temporary files are created in
	the current working directory.

mkrom 	- This tool does scc compiles, followed by the assembler, the rom
	loader, byte switching (to get into the format expected by the SIU)
	and the down load into the PROM programmer.  This tool does expect
	that the PROM programmer is set up with 'SELECT F1 START START' and
	with the PROM in the correct holder.  To go from source to the PROM
	programmed type the following:

		mkrom <file> ROM

	If all you want is the image ready for the PROM programmer do the
	following:

		mkrom <file>

	Since the ROM is missing a <file>.done will be generated which is
	ready for the PROM programmer.

byteswitch - This utility takes as standard input the executable image and
	writes to standard output the four bytes in the word switched such
	the SIU-F will fetch them in the correct order.

romld	- This is the rom loader which takes the output from the assembler,
	/spectrum/bin/assem, and converts it into a ROM load format.  The
	program queries for the file to process and creates a new file which
	is the ready-to-load format.



