Re: Compile LEX with HPTOOLS Message #2 Posted by EX-PPC member on 28 Feb 2003, 9:39 a.m., in response to message #1 by Alain (Canada)
Alain wrote:
"1) HPTOOLS doesn’t recognise the “LEX “ opcode, although in the source file, there is a constant called “LEX”."
I think I can shed some line on this point. "LEX" isn't a valid CPU opcode, it's a pseudo-opcode only recognized by the Assembler program in the FORTH/Assembler ROM. The Assembler recognizes this pseudo-opcode and emits the actual opcodes needed to create a LEX file. Other pseudo-opcodes which would be equally problematic are "FORTH" (to create primitive FORTH words in assembly) and "BIN" (to create binary BASIC subprograms). Those pseudo-opcodes are included as a very convenient feature to save the user from having to insert the real opcodes by hand.
You would need to consult documentation in order to see what the Assembler program does with the "LEX" pseudo-opcode, i.e.: how does it process it and what opcode stream does it emit to the object code file. I guess it probably creates a properly filled header for the resulting LEX file, as well as a number of data structures/tables needed to interface the native operating system to the LEX file (keywords, polls, error messages, etc), and pointers to them.
|