Compile LEX with HPTOOLS
#1

In an earlier thread in this forum, someone mentioned the existence of a possibly very interesting LEX called “RPNLEX”. So I searched my hard disk an found only the source file: “No problem, I have HPTOOLS, I will just compile it – piece of cake!” I told myself. Well, after a little bit of experimentation, I found three possible problems :

1) HPTOOLS doesn’t recognise the “LEX “ opcode, although in the source file, there is a constant called “LEX”. ;
2) If I get to the point of being able to compile the source, I get a object code. Is there an additional step to make it look like a LEX or is the object code a LEX file ?
3) Once I have the LEX on my hard disk, how do I send it to my HP9114 floppy drive not knowing the correct FILE IMPLEMENTATION. Is there . Is there program that calculate the file implementation ?

I’m sure this is all newbie stuff… oh well…

BTW I found a compiled verion of RPNLEX but I still want to know.

Alain

#2

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.

#3

Another thing to notice:

If you use the HPTools for creating HP-71 binary files,
be sure to use level 0 instructions only.

For more info: SASM.DOC


Raymond

#4

Regarding the support of the 'LEX' pseudo opcode, the Forth/Assembler Rom manual says :

----

LEX 'name'

Assemble a new LEX file called 'name'. This pseudo-op must be the first line in the source file. The LEX file will have the correct header. The initial data for this file is defined by the ID, MSG, and POLL pseudo-ops, wich must be present in that order.

----

It seems that the LEX pseudo-op does two actions, 1) gives the generated file the 'name' name. 2) Generate proper 'header' for that file.

I will have a look a the IDS manual to see if it gives more details.

Alain

#5

After a check in the IDS vol. 1, a possible description of what does the 'LEX' pseudo-ops is to construct the following structure as a file header :

RDSYMB SB%RAM * ??
RDSYMB TI%EQU * Equal sign for before the title ??
NIBASC \'name'\ * Then lex file name
CON(4) =lLEX * The lex file type
NIBHEX 00 * Flags ??
NIBHEX xxxx * Time (File attribute ??)
NIBHEX xxxxxx * Date (File attribute ??)
REL(5) EOF (label)* File Length

Anybody can confirm or comment ??

Alain

#6

I'm not sure, but weren't the file formats of (LEX, BIN, FTH) documented in the Assembler ROM manual?
I have one, but it's packed away very deep,
so no chance to look yet...

Raymond

#7

I finally compiled the RPNLEX with AREUH compiler wich support the 'LEX' pseudo-ops. The object file is a lex file. I'm still missing the tool to get the 'File Implementation' information from the object file. Any idea ?

p.s. The LEX file header is described in the IDS volume 1.

Alain



Possibly Related Threads…
Thread Author Replies Views Last Post
  New compile-time options for WP-34S Nigel J Dowrick 15 4,584 01-29-2013, 03:25 PM
Last Post: Stephan
  Getting 71B Lex files ebsanford 4 1,636 03-25-2012, 11:52 AM
Last Post: Egan Ford
  Poking a string directly into the 71B as a lex file problems Jerry Raia 3 1,268 08-25-2010, 05:54 PM
Last Post: Jerry Raia
  HP71B LEX files P.Hart 2 979 09-05-2009, 06:11 PM
Last Post: P.Hart
  HP 71b Working with LEX files Sean Connor 1 856 05-11-2008, 05:47 PM
Last Post: George Bailey (Bedford Falls)
  HP 71B: Input LEX files without HP-IL? Meenzer 8 2,241 11-26-2007, 03:12 AM
Last Post: Meenzer
  Transporting lif (lex) files from PC to hp71b C. Dehnke 2 1,046 10-15-2007, 01:26 AM
Last Post: C. Dehnke
  Lex Files HP-75C gileno 5 1,656 08-03-2007, 03:26 PM
Last Post: Eric Smith
  Differences - Lex 75C gileno 0 659 02-05-2007, 01:59 PM
Last Post: gileno
  Commands LEX HP-75C Part - I gileno 0 628 01-29-2007, 06:08 PM
Last Post: gileno

Forum Jump: