HP Forums
[71B] How to make a lex file - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: General Forum (/forum-4.html)
+--- Thread: [71B] How to make a lex file (/thread-1291.html)



[71B] How to make a lex file - caloubugs - 05-11-2014 02:53 PM

Hello,

I'm a newbie here but i own a 71b, 15c, 48g.
The fact is that i want to make a lex file in my 71b (using the forth ROM). A real one, not an emulator.

Just for testing the process, i used edtext to write the code (an exemple given by HP in the manual with the pseudo-ops wanted) and the ASSEMBLE word after in the forth mode.

But everytime i have the error message : "missing/multiple file type".

I dont see what is wrong.
And, can i find any "howto" to make this.

Tanks a lot for help !


RE: [71B] How to make a lex file - Vagn Anderssen - 05-11-2014 03:03 PM

I thought T-Lex was extinct?


RE: [71B] How to make a lex file - J-F Garnier - 05-11-2014 04:16 PM

(05-11-2014 02:53 PM)caloubugs Wrote:  i used edtext to write the code (an exemple given by HP in the manual with the pseudo-ops wanted) and the ASSEMBLE word after in the forth mode.
But everytime i have the error message : "missing/multiple file type".

From the Forth/Assembler manual:
missing/multiple file type error:
The first line in the source file isn't LEX, BIN, or F0RTH (fatal to assembly); or one of these pseudo-
ops appears a second time; or any pseudo-op of the wrong type appears (such as WORD within a LEX
file). Check that the source file begins with LEX, BIN, or FORTH pseudo-op and contains pseudo-
ops suitable for that type of file.


Please post your assemby code (at least the first lines with the pseudo-ops).

J-F


RE: [71B] How to make a lex file - caloubugs - 05-11-2014 05:13 PM

Thanks for answering !

I have this manual and try to make lex with the sample "Keyword" in it.

Here's the code in a file KEYTXT (opened with edtext) :

LEX 'KEYWORD'
ID #5D
MSG 0
POLL 0
FNRTN1 EQU #0F216
ENTRY FNCT
CHAR #F
KEY 'ONE'
TOKEN 1
ENDTXT
NIBHEX 00
FNCT
C=0 W
P= 14
LCHEX 1
GOVLNG FNRTN1
END


Then, in Forth module, i send :

" KEYTXT" ASSEMBLE


And i have this message...

I don't see what is wrong with that and pseudo-ops problems...

(are you french ??) au cas où :-)



RE: [71B] How to make a lex file - J-F Garnier - 05-11-2014 06:15 PM

(05-11-2014 05:13 PM)caloubugs Wrote:  
LEX 'KEYWORD'
ID #5D
MSG 0
POLL 0
FNRTN1 EQU #0F216
...
END

Seems to me that the assembler line format is wrong.
It should be:
Code:

  LEX 'KEYWORD'
  ID #5D
  MSG 0
  POLL 0
FNRTN1 EQU #0F216
...
  END
with at least 2 spaces before the assembler opcode to differenciate it from a label.

Quote:(are you french ??) au cas où :-)
Yes :-)


RE: [71B] How to make a lex file - caloubugs - 05-11-2014 06:34 PM

Thanks a lot !!!

It works, i read there was no matter with spaces...
I can go to the end of process now !


RE: [71B] How to make a lex file - caloubugs - 05-11-2014 06:56 PM

Just for fun, i take the ULAM LEX source (see http://en.wikipedia.org/wiki/Collatz_conjecture for maths explanations) and compare it to the other langages on 71B.

In BASIC, ULAM(77031) = 350 takes 14,67s
In FORTH, it takes 9,42s
In LEX, it takes 0,08 s !!!